Apple In-App Purchases and Subscription Development Guide

A guide for learning how Apple StoreKit 2 In-App Purchases and Subscriptions work and how to develop and test them.

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 03/27/2023 at 11:54
Last Updated on 03/27/2023 at 12:51
Three flowers that represent StoreKit, Swift and XCode side by side. Beneath them sits the text “In-App Purchases and Subscription Development Guide.”

A guide for learning how Apple StoreKit 2 In-App Purchases and Subscriptions work and how to develop and test them.

The following guide is aimed at developers or business folks who are seeking to learn about the secrets behind developing apps with Apple's StoreKit 2 framework, In-App Purchases and Subscriptions.

Subscribe

The guide comes with a free Swift Open-Source StoreKit 2 project which replicates the design and behavior shown in our iOS E-Commerce template that's available on the Figma Community.

Free Open-Source Apple StoreKit 2 Swift ProjectFree iOS e-commerce Figma design file

If you are seeking a business guide for In-App Purchases or Subscriptions, please consult the link below.

Apple App Store E-Commerce Business Guide

What are In-App Purchases and Subscriptions and how do I implement them ?

For a comprehensive guide about In-App Purchases and Subscriptions, please consult our guide below.

How to create a StoreKit offering in XCode or App Store Connect

In-App Purchases and Subscriptions produce transactions which grant customers entitlements (i.e. access to products).

To learn more about transactions consult the guides below.

What are Apple App Store Transactions ?What information comes with Apple App Store Transactions in an app?How do Apple App Store Transactions work?What are Apple App Store Entitlements and how to use them

How do I setup StoreKit 2 in XCode and Swift ?

To learn how to setup StoreKit 2 to work with your project with a coordinator that manages all transactions and updates your app when changes occur or to make purchases, consult the guides below.

How to setup StoreKit in XCodeHow to create a StoreKit Coordinator in SwiftHow to code and test StoreKit purchases in Swift and XCode

How do I make In-App Purchases and Subscriptions work internationally?

For localizing In-App Purchases or Subscriptions, please consult our guide below.

Within this guide, each tutorial for creating an In-App Purchase or Subscription demonstrates how to create a localization.

How to create a StoreKit offering in XCode or App Store Connect

For developing localized products and prices, consult the guides below.

How to code and test localized StoreKit product names and descriptionsHow to code and test international StoreKit product prices

How do I offer restore purchases or refund purchases ?

For guides on restoring purchases or refunding purchases, consult the guides below.

How to code and test restore purchases in Swift and XcodeHow to code and test refund requests in Swift and XCodeHow to simulate a StoreKit Transaction refund in XCode

How do I test all the scenarios that could occur with In-App Purchases or Subscriptions?

There is a wide range of scenarios that could occur with In-App Purchases or Subscriptions, from transactions being interrupted, to requiring to ask a parent or the bank or failing.

How to code and test StoreKit pending purchases in Swift and XCodeHow to test interrupted purchases in Swift and XCodeHow to test StoreKit failed purchases in Swift and XCode

If you're implementing a subscription, the subscription could enter a grace period or billing retry if a payment method fails.

How does Billing Retry and a Grace Period work in the Apple App Store?How to test Billing Grace Period and Billing Retry for a Subscription

What other things should I consider when developing Auto-Renewable Subscriptions?

Auto-Renewable Subscriptions are the most complex e-commerce StoreKit product.

What are Apple App Store Auto-Renewable Subscriptions?

Consult the guides to learn about each scenario.

How to get a StoreKit Subscription period in SwiftHow to get a Subscription Renewal or Expiration Date in SwiftHow to check if a Subscription is expiring or renewing in Swift?How to allow users to manage a Subscription in an app in SwiftHow to check if a Subscription is being upgraded in SwiftHow to get an Auto-Renewable Subscription's status in Swift

What should I consult for Auto-Renewable Introductory Offers?

Introductory Offers are a very powerful way to earn customers and operate in the way as Subscriptions.

It is important to note that custom logic must be created for customers to only have access to the offer once - if you do not do this, they will be able to cancel the subscription and access the offer indefinitely, leading to a loss in revenue.

To learn more about how to develop for them, consult our guides below.

What are Apple App Store Introductory Offers?How to create local introductory offers for subscriptions in StoreKitHow to create, edit and delete offers in App Store ConnectHow to get a StoreKit Subscription Introductory Offer period in SwiftHow to get the type of Introductory Offer in SwiftHow to determine if an introductory offer has been used in Swift?

What should I consult for Auto-Renewable Custom Offer Codes?

To learn more about how to develop custom offer codes, consult our guides below.

What are Apple App Store Custom Offer Codes?How to create, edit and delete offers in App Store ConnectHow to code and test custom offer code redemption in Swift and Xcode

How can be notified of events or create best in class customer support outside of an app ?

To be able to create best-in-class customer support or systems that allow you to send marketing to customers based on events that occur in-app in real time, you must use the Apple App Store Server API and App Store Server Notifications.

What is the Apple App Store Server API?What can I use the App Store Server API for?What are Apple App Store Server Notifications?

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe