In-App Purchase Programming Guide

About In-App Purchase

Important: This document is no longer being updated. For the latest information about Apple SDKs, visit the documentation website.

In-App Purchase allows you to embed a store inside your app using the StoreKit framework. This framework connects to the App Store on your app’s behalf to securely process payments from users, prompting them to authorize payment. The framework then notifies your app, which provides the purchased items to users. Use In-App Purchase to collect payment for additional features and content.

For example, using In-App Purchase, you can implement the following scenarios:

A basic version of your app with additional premium features

A magazine app that lets users purchase and download new issues

A game that offers new levels to explore

An online game that allows players to purchase virtual property

At a Glance

At a high level, the interactions between the user, your app, and the App Store during the In-App Purchase process take place in three stages, as shown in Figure I-1. First, the user navigates to your app’s store and your app displays its products. Second, the user selects a product to buy and the app requests payment from the App Store. Third, the App Store processes the payment and your app delivers the purchased product.

Figure I-1 Stages of the purchase process

You Create and Configure Products in App Store Connect

Understanding what kinds of products and behaviors are supported by In-App Purchase lets you design your app and in-app store to make the best use of this technology.

Your App Interacts with the App Store to Sell Products

All apps that use In-App Purchase need to implement the core functionality described in these chapters to let users make purchases and then deliver the purchased products.

These development tasks need to be done in order. The relevant chapters introduce them in the order you implement them, and they’re listed in full in Implementation Checklist. To help plan your development, you may want to read the full checklist before you begin.