---
title: In-App Purchase
framework: storekit
role: collectionGroup
role_heading: API Collection
path: storekit/in-app-purchase
---

# In-App Purchase

Offer content and services in your app across Apple platforms using a Swift-based interface.

## Overview

Overview With the In-App Purchase API, you can offer customers the opportunity to purchase digital content and services in your app. Customers can make the purchases within your app, and find your promoted products on the App Store. The StoreKit framework connects to the App Store on your app’s behalf to prompt for, and securely process, payments. The framework then notifies your app, making the transactions for In-App Purchases available to your app on all of the customer’s devices. For each transaction that represents a current purchase, your app delivers the purchased products. To validate purchases, you can verify transactions on your server, or rely on StoreKit’s verification.

The App Store can also communicate with your server. It notifies your server of transactions and auto-renewable subscription events through App Store Server Notifications, and provides the same transaction information, and more, through the App Store Server API. To learn how adding In-App Purchases fits in an overall app development workflow for the App Store, see App Store Pathway. For an overview of In-App Purchases and its features, including its configuration, testing capabilities, marketing for your products, and more, see Simple and safe In-App Purchases. For an overview on subscriptions, including creating subscription groups, Family Sharing, and more, see Auto-renewable subscriptions. Configure In-App Purchases To use the In-App Purchase API, you first need to configure the products that your app merchandises. In the early stages of development, you can configure the products in the StoreKit configuration file in Xcode, and test your code without any dependency on App Store Connect. For more information, see Setting up StoreKit Testing in Xcode. When you’re ready for sandbox testing and production, configure the products in App Store Connect. You can add or remove products and refine or reconfigure existing products as you develop your app. For more information, see Configure In-App Purchase settings. You can also offer apps and In-App Purchases that run on multiple platforms as a single purchase. For more information on universal purchase, see Add platforms. Support a store in your app The In-App Purchase API takes advantage of Swift features like concurrency to simplify your In-App Purchase workflows, and SwiftUI to build stores with StoreKit views. Use the API to manage access to content and subscriptions, receive App Store-signed transaction information, get the history of all In-App Purchase transactions, and more. note: Session 10114: Meet StoreKit 2 The In-App Purchase API offers: Transaction information that’s App Store-signed in JSON Web Signature (JWS) format. Transaction and subscription status information that’s simple to parse in your app. An entitlements API, currentEntitlements, that simplifies determining entitlements to unlock content and services for your customers. note: Session 110404: Implement proactive in-app purchase restore To support a store in your app, implement the following functionality: Listen for transaction state changes using the transaction listener, updates, to provide up-to-date service and content while your app is running. Use StoreKit views to merchandise your products; or request products to display from the App Store with products(for:) and enable purchases using purchase(options:). Unlock purchased content and services based on the purchase result, Product.PurchaseResult. Iterate through a customer’s purchases anytime using the transaction sequence all, and unlock the purchased content and services. Optionally, validate the signed transactions and signed subscription status information that you receive from the API.

## Topics

### In-App Purchase merchandising

- [StoreKit views](storekit/storekit-views.md)

### Product and subscription information

- [Implementing a store in your app using the StoreKit API](storekit/implementing-a-store-in-your-app-using-the-storekit-api.md)
- [Supporting monthly subscriptions with a 12-month commitment](storekit/supporting-monthly-subscriptions-with-a-12-month-commitment.md)
- [Managing the life cycle of monthly subscriptions with a 12-month commitment](storekit/managing-lifecycle-of-monthly-subscriptions-with-a-12-month-commitment-.md)
- [Product](storekit/product.md)
- [Product.SubscriptionInfo](storekit/product/subscriptioninfo.md)
- [SubscriptionInfo](storekit/subscriptioninfo.md)
- [SubscriptionStatus](storekit/subscriptionstatus.md)

### Purchase requests and results

- [PurchaseAction](storekit/purchaseaction.md)
- [purchase(options:)](storekit/product/purchase(options:).md)
- [Product.PurchaseResult](storekit/product/purchaseresult.md)

### Transaction history and entitlements

- [Transaction](storekit/transaction.md)
- [updates](storekit/transaction/updates.md)
- [all](storekit/transaction/all.md)
- [currentEntitlements](storekit/transaction/currententitlements.md)

### JWS verification

- [VerificationResult](storekit/verificationresult.md)
- [VerificationResult.VerificationError](storekit/verificationresult/verificationerror.md)

### Subscription status and renewal information

- [Product.SubscriptionInfo.Status](storekit/product/subscriptioninfo/status-swift.struct.md)
- [Product.SubscriptionInfo.RenewalInfo](storekit/product/subscriptioninfo/renewalinfo.md)
- [SubscriptionRenewalInfo](storekit/subscriptionrenewalinfo.md)
- [Product.SubscriptionInfo.RenewalState](storekit/product/subscriptioninfo/renewalstate.md)
- [SubscriptionRenewalState](storekit/subscriptionrenewalstate.md)
- [SubscriptionPeriod](storekit/subscriptionperiod.md)

### Offers

- [Supporting offer codes in your app](storekit/supporting-offer-codes-in-your-app.md)
- [Supporting win-back offers in your app](storekit/supporting-win-back-offers-in-your-app.md)
- [Merchandising win-back offers in your app](storekit/merchandising-win-back-offers-in-your-app.md)
- [Product.SubscriptionOffer](storekit/product/subscriptionoffer.md)
- [Product.SubscriptionOffer.OfferType](storekit/product/subscriptionoffer/offertype.md)

### Promoted In-App Purchases

- [Supporting promoted In-App Purchases in your app](storekit/supporting-promoted-in-app-purchases-in-your-app.md)
- [PurchaseIntent](storekit/purchaseintent.md)
- [Product.PromotionInfo](storekit/product/promotioninfo.md)
- [Testing promoted In-App Purchases](storekit/testing-promoted-in-app-purchases.md)

### App Store interactions

- [AppStore](storekit/appstore.md)
- [AppTransaction](storekit/apptransaction.md)

### Storefront information

- [Storefront](storekit/storefront.md)
- [current](storekit/storefront/current.md)
- [updates](storekit/storefront/updates.md)

### In-App Purchase Testing

- [Testing at all stages of development with Xcode and the sandbox](storekit/testing-at-all-stages-of-development-with-xcode-and-the-sandbox.md)
- [Testing In-App Purchases with sandbox](storekit/testing-in-app-purchases-with-sandbox.md)
- [Testing refund requests](storekit/testing-refund-requests.md)
- [Testing win-back offers in Xcode](storekit/testing-win-back-offers-in-xcode.md)
- [Testing Ask to Buy in Xcode](storekit/testing-ask-to-buy-in-xcode.md)

### Advanced Commerce API interactions

- [AdvancedCommerceProduct](storekit/advancedcommerceproduct.md)
- [Sending Advanced Commerce API requests from your app](storekit/sending-advanced-commerce-api-requests-from-your-app.md)
- [Generating JWS to sign App Store requests](storekit/generating-jws-to-sign-app-store-requests.md)

### Errors

- [StoreKitError](storekit/storekiterror.md)

### Deprecated

- [Choosing a StoreKit API for In-App Purchases](storekit/choosing-a-storekit-api-for-in-app-purchases.md)
- [Original API for In-App Purchase](storekit/original-api-for-in-app-purchase.md)

## See Also

### In-App Purchase

- [Understanding StoreKit workflows](storekit/understanding-storekit-workflows.md)
- [Getting started with In-App Purchase using StoreKit views](storekit/getting-started-with-in-app-purchases-using-storekit-views.md)
