Apple App Store configuration
This section describes how to connect the App Store with the Purchasely Console
In order to connect your Apple App Store account with Purchasely, you have to provide the following parameters from your App Store Connect application's console:
- App bundle ID
- App ID
- App scheme
- Shared App Secret
- StoreKit 2 - Private key ID
- StoreKit 2 - Private key file
- StoreKit 2 - Issuer ID
- The Server to Server End point
1. App Bundle ID
The Bundle ID
is used by the Purchasely Platform to validate that receipts are indeed coming from your app.
- Open App Store Connect, go to My Apps and select the desired app
- Navigate to the section General > App information
- Copy the value displayed in the field Bundle ID
2. App ID
It is required to set up promo code deeplinks in paywalls.
- Open App Store Connect, go to My Apps and select the desired app
- Navigate to the section General > App information
- Copy the value of the field Apple ID
3. App scheme (optional)
The App scheme
is required to make the paywalls preview work and enable deeplink automations.
Enter your App scheme
(without the ://
) in the Purchasely Console in the field App Scheme
. A universal link can also be used.
- More details on how to configure it for your iOS app
- More details on how to manage deeplinks with the Purchasely SDK
4. Shared App Secret
The Shared App Secret
is used by Purchasely Platform and required to decode and validate receipts for this specific app
-
Open App Store Connect, go to My Apps and select the desired app
-
Navigate to the section General > App information and browse down the screen
-
Click on the link Manage in the section App-Specific Shared Secret
-
Copy the value displayed on the following screen
Don't forget to update the value in the Purchasely Console each time you regenerate a new App-Specific Shared Secret.
5, 6, 7. StoreKit 2 configuration
StoreKit 1 is deprecated
Since StoreKit1 is deprecated, please configure StoreKit2 and use it in your app.
To make StoreKit 2 work, you need to grant the Purchasely Platform with a specific access.
The Private key Id, Private key file and the Issuer Id are required by Apple APIs. We use them for :
- StoreKit 2 APIs: to allow our server to verify your purchases
- Promotional offers: to generate the signature allowing the purchase
The configuration of StoreKit 2 requires to follow a few steps:
- Open App Store Connect
- Go to the section Users and Access > Integrations > In-App Purchase
- Click on the + button to generate a new API key
- Choose a name for the key and click "Generate"
- Download the API key file (.p8), and note the Key ID and Issuer ID.
Keep the file secure, as you won't be able to download it again
Then, in the Purchasely Console:
- Paste the value of the Key ID generated in the field
Private Key ID
- Upload the API Key file (
.p8
) previously downloaded in the fieldPrivate Key File
- Paste the value of the
Issuer ID
in the fieldIssuer ID
8. The Server to Server End Point
This step is only available in the App Store Connect Console once you've created your first In-App Subscription.
To plug App Store Server Notifications with the Purchasely platform, follow these steps:
-
Open App Store Connect,
-
Go to My Apps and select the desired app
-
Navigate to the section General > App information
-
In the sub-section App Store Server Notifications, edit the Product Server URL
-
Paste the value from the field Server to server endpoint in the Purchasely Console
What are App Store Server Notifications used for?
App Store Server Notifications are used to receive real-time notifications about the lifecycle of your client's purchases.
They consist in messages, sent by the App Store, every time an event occurs on a subscription. For instance, a message is sent when a subscription :
- is purchased
- is renewed
- won't renew because the user as canceled the auto-renewal
- is refund
- gets expired
- encounters a billing issue
…
The server-to-server notifications are not mandatory for making subscriptions work, but they are very valuable in the sense that they bring a real-time and comprehensive vision for the app editor
What happens if I do not activate the S2S?
Until the expected renewal date of the original subscription, Purchasely won't be able to detect:
- a refund (which means users may have a 1-year free subscription if they immediately ask for a refund on a yearly subscription)
- a plan change (when they are bought outside the application)
- a cancellation of the renewal (we won't know the user will churn at the next renewal)
What if you are already using the App Store Server Notifications for your subscription infrastructure?
App Store Connect only allows setting one endpoint url for S2S in production and sandbox mode. To circumvent this limitation, you can enable our S2S Forwardings integration in Purchasely Console.
If you are already using S2S notification with your existing Subscription Infrastructure, you can activate Server to server notifications forwarding in the Purchasely Console.
More details on activating Server to server notifications forwarding
Updated 5 months ago
You can now proceed with the Google Play Store configuration