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:

  1. App bundle ID
  2. App ID
  3. App scheme
  4. Shared App Secret
  5. StoreKit 2 - Private key ID
  6. StoreKit 2 - Private key file
  7. StoreKit 2 - Issuer ID
  8. 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.

  1. Open App Store Connect, go to My Apps and select the desired app
  2. Navigate to the section General > App information
  3. Copy the value displayed in the field Bundle ID

2. App ID

It is required to set up promo code deeplinks in paywalls.

  1. Open App Store Connect, go to My Apps and select the desired app
  2. Navigate to the section General > App information
  3. 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.

4. Shared App Secret

The Shared App Secret is used by Purchasely Platform and required to decode and validate receipts for this specific app

  1. Open App Store Connect, go to My Apps and select the desired app

  2. Navigate to the section General > App information and browse down the screen

  3. Click on the link Manage in the section App-Specific Shared Secret

  4. 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:

  1. Open App Store Connect
  2. Go to the section Users and Access > Integrations > In-App Purchase
  3. Click on the + button to generate a new API key
  4. Choose a name for the key and click "Generate"
  5. 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:

  1. Paste the value of the Key ID generated in the field Private Key ID
  2. Upload the API Key file (.p8) previously downloaded in the field Private Key File
  3. Paste the value of the Issuer ID in the field Issuer ID

More details on StoreKit 2


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:

  1. Open App Store Connect,

  2. Go to My Apps and select the desired app

  3. Navigate to the section General > App information

  4. In the sub-section App Store Server Notifications, edit the Product Server URL

  5. 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


What’s Next

You can now proceed with the Google Play Store configuration