Generate a key and configure offers for auto-renewable subscriptions in App Store Connect.
Framework
- Store
Kit
Overview
You can offer a discounted or free period of service for auto-renewable subscription products on macOS, iOS, and tvOS using subscription offers. Limited-time, discounted subscription offers can be effective in winning back lapsed subscribers or retaining current subscribers.
Before you can provide subscription offers in your app, you must first generate a subscription key and set up the offers in your App Store Connect account.
Note
If your goal is to attract new users, use introductory offers and promote the in-app purchase on the App Store. Redeeming an introductory offer does not affect a user’s eligibility for a subscription offer. For more information, see Implementing Introductory Offers in Your App.
Generate a Private Key
You generate a private key in App Store Connect that you use on your server to sign subscription offers. This key allows Apple to authenticate and validate subscription requests.
Keys do not expire, and you can use them with any apps in your account. To get started, generate a subscriptions access key in App Store Connect.
Download and Store the Private Key
Once you've generated your subscription key, you are given the opportunity to download the private half of the key. You can only download this key one time.
The keys are provided in base64-encoded PEM format. Apple does not keep a copy of the private key.
Important
Store your private subscription key in a safe place. You should never share your keys, store keys in a code repository, or include keys in apps or client-side code.
If the key becomes lost or compromised, revoke it immediately and update your subscription offers. See Revoke a subscription key for more information.
Configure Subscription Offers
You configure subscription offers in App Store Connect, providing details such as a reference name, payment mode, duration, and price. To configure your offer, see Set up subscription offers for auto-renewable subscriptions. You can have up to 10 subscription offers active at any given time per subscription.
For business guidance on using subscription offers, see Auto-renewable Subscriptions > Subscription Offers.