Configure App Store integration

To connect your iOS app to Adapty, enter its App Store credentials in App settings > iOS SDK. Adapty then:

  • Validates purchases.
  • Receives subscription events.
  • Keeps your products in sync with App Store Connect.

If purchases or subscription events stop reaching Adapty, check each credential.

Before you start:

  • You need access to the target application in App Store Connect. If the app isn’t there yet, Set up App Store Connect. If you don’t have access to the platform, request it.
  • Your team needs access to the App Store Connect API — it’s necessary to generate the required access key. If your team doesn’t have it yet, ask the Account Holder to request it. Apple reviews each request.
  • Open two browser tabs: your app in App Store Connect in one, and App settings > iOS SDK in Adapty in another. You will copy values between the two tabs throughout this guide.

Overview

Every credential in this guide is required. Adapty uses each one for a different part of the data exchange with the App Store. To complete the setup, follow these seven steps:

  1. Enter the Bundle ID and Apple App ID
  2. Enter the app-specific shared secret
  3. Enable App Store server notifications with the URL from Adapty
  4. Add the In-App Purchase key
  5. Add the App Store Connect API key
  6. Install the Adapty SDK and make a sandbox purchase
  7. Verify all the credentials

Enter the Bundle ID and Apple App ID

Two values identify your app in App Store Connect: the Bundle ID and the Apple ID, labeled Apple App ID in Adapty. Adapty needs the Bundle ID to process purchases. With the Apple ID, Adapty:

  • Finds your products in App Store Connect and creates new ones there.
  • Shows the App Store status and prices of your products.
  • Serves real-time messages for Retention Messaging.
  • Identifies your app to attribution integrations, such as AppsFlyer.

Apple assigns the Apple ID when you add the app to App Store Connect, so enter it even before your app is on the App Store.

  1. Open App Store Connect. Select your app and proceed to General > App Information section.

  2. Copy the Bundle ID in the General Information sub-section.

    Copy only the identifier — reverse-DNS format with no spaces, for example, com.company.app. App Store Connect shows the app name next to it in other views, like the apps list; pasting that instead of the identifier makes the connection between Adapty and the App Store fail to validate.

asc-app-information-bundle-id.webp
  1. Open the App settings > iOS SDK tab from the Adapty top menu and paste the copied value to the Bundle ID field.
app-settings-bundle-id.webp
  1. Get back to the App information page in App Store Connect and copy Apple ID from there.
asc-app-information-apple-id.webp
  1. On the App settings > iOS SDK page in the Adapty dashboard, paste the ID to the Apple App ID field.
app-settings-apple-app-id.webp

Enter the app-specific shared secret

Adapty needs the app-specific shared secret to validate purchase receipts and to create products in App Store Connect.

  1. In App Store Connect, open the App Information page of your app. In the App-Specific Shared Secret section, click Manage.

    App-Specific Shared Secret section on the App Information page in App Store Connect
  2. Copy the secret. If the app has no secret yet, click Generate first. To generate a secret, you need the Account Holder or Admin role in App Store Connect. Without either role, ask someone who has one to generate the secret and send it to you.

    Unless you received the app in an app transfer, don’t click Regenerate: the current secret then stops working everywhere it’s in use.

    App-Specific Shared Secret window with the secret
  3. In Adapty, paste the secret into the App Store Connect shared secret field.

    App Store Connect shared secret field in Adapty
  4. Click Save.

Enable App Store server notifications with the URL from Adapty

Apple sends server notifications to Adapty about renewals, refunds, and other subscription events as they happen. Adapty records these events even when your app reports no transaction.

If Apple already sends these notifications to a server, set up forwarding to that server before you replace its URL in App Store Connect. In Adapty, enter the URL of that server in the URL for forwarding raw Apple events field, and click Save. Adapty then forwards the notifications it receives from Apple to that server.

If your backend must keep its URL in App Store Connect, pass the notifications to Adapty from your backend instead.

  1. In Adapty, open the app you’re connecting: each Adapty app has its own notification URL. Go to App settings > iOS SDK. In the App Store server notifications section, copy the URL from the URL for App Store server notifications field.

    URL for App Store server notifications in the App Store server notifications section in Adapty
  2. In App Store Connect, open the App Information page of your app.

  3. In the App Store Server Notifications section, find Production Server URL. If a URL is already there, click Edit. Otherwise, click Set Up URL.

    App Store Server Notifications section on the App Information page in App Store Connect
  4. Paste the URL from Adapty, and click Save.

    Production Server URL dialog in App Store Connect with the URL from Adapty
  5. To have the notifications from your sandbox tests reach Adapty, repeat steps 3 and 4 for Sandbox Server URL.

Add the In-App Purchase key

Adapty uses the In-App Purchase key to validate purchases and to sign promotional offers. If you don’t have the key file yet, generate the key in App Store Connect first. To add the key to Adapty:

  1. To find the Issuer ID and the Key ID of your key, in App Store Connect, go to Users and Access > Integrations > In-App Purchase. If someone else generated the key and sent you its Issuer ID, Key ID, and file, skip this step.

    Issuer ID and the Key ID of an In-App Purchase key in App Store Connect
  2. In Adapty, go to App settings > iOS SDK. In the In-app purchase API (StoreKit 2) section, fill in the fields:

    • Issuer ID: Copy it from the In-App Purchase page in App Store Connect.
    • Key ID: Copy it from the Active list on the In-App Purchase page, next to the key you downloaded.
    • Private key (.p8 file): Upload the file you downloaded.
    Issuer ID, Key ID, and Private key (.p8 file) fields in the In-app purchase API (StoreKit 2) section in Adapty
  3. Adapty signs promotional offers with the In-App Purchase key. In the App Store promotional offers section, enter the key again:

    • Subscription key ID: The Key ID from step 2.
    • Subscription key (.p8 file): The file from step 2.
    Subscription key ID and Subscription key (.p8 file) fields in the App Store promotional offers section

    A different key saves without an error, but users then can’t receive promotional offers.

  4. Click Save. Adapty verifies the key in the In-app purchase API (StoreKit 2) section with Apple before it saves the page. If Apple rejects the key, the page shows “The provided field values are incorrect”: review the values.

Add the App Store Connect API key

Adapty uses the App Store Connect API key to create products in App Store Connect and to keep their status and prices in sync. It’s a different key from the In-App Purchase key, though the two share the field names Issuer ID and Key ID.

Adapty needs a team key with Admin access. If you don’t have one yet, generate it in App Store Connect first. To connect the key in Adapty:

  1. To find the Issuer ID and the Key ID of your team key, in App Store Connect, go to Users and Access > Integrations > App Store Connect API, and open the Team Keys tab. If someone else generated the key and sent you its Issuer ID, Key ID, and file, skip this step.

    Issuer ID and the Key ID of a team key on the Team Keys tab in App Store Connect
  2. In Adapty, go to App settings > iOS SDK. In the App Store Connect API key section, click Connect API Key.

    App Store Connect API key section in Adapty, with the Connect API Key button
  3. Fill in the fields:

    • Issuer ID: Copy it from the Team Keys tab in App Store Connect.
    • Key ID: Copy it from the Active list on the Team Keys tab, next to the key you downloaded.
    • Private key (.p8 file): Upload the file you downloaded for the team key.
    Issuer ID, Key ID, and Private key (.p8 file) fields in the window for the App Store Connect API key
  4. You can replace a connected key later, but you can’t remove it. Make sure the key comes from the App Store Connect team that owns this app, and click Connect. From then on, you select each App Store Product ID from your products in App Store Connect, rather than type it.

    Adapty doesn’t verify the key with Apple when you connect it. A wrong key fails with no message about the key: products show no App Store status, and the App Store Product ID dropdown stays empty. To fix a wrong key, replace it.

Check that each credential works

To confirm that Adapty validates purchases, install the Adapty SDK in your app and make a sandbox purchase.

The sandbox purchase only uses some of the credentials. Verify each one after the purchase, and again whenever purchases or subscription events stop reaching Adapty:

  • Bundle ID, Apple App ID, and App Store Connect shared secret: Compare the three values with the Bundle ID, the Apple ID, and the secret under App-Specific Shared Secret on the App Information page in App Store Connect.
  • App Store server notifications: The status in this section reads Active once a notification about a purchase or a renewal reaches Adapty. If it reads anything else, check the server URLs.
  • In-app purchase API (StoreKit 2): Adapty verifies the key with Apple when you save it. If purchases in your app later unlock no access, the key may have stopped working: replace the key.
  • App Store promotional offers: Make sure the Subscription key ID matches the Key ID in the In-app purchase API (StoreKit 2) section. If they differ, enter the same key in both sections.
  • App Store Connect API key: Each App Store product shows a status in the App Store status column on the Products page. If a product shows a dash or Not Connected, check the key and the Apple App ID.

Right after setup, Analytics can count more trials and purchases than installs, and more than the Event Feed shows. The difference is transactions without profiles: purchases of users who haven’t opened a version of your app with the Adapty SDK yet.

Other differences between Adapty and store reports come from how each one counts purchases, not from the credentials.

Next steps

To prepare your app for release, go through the release checklist.

If your app is also on Google Play, connect that store.