Subscription setup for iOS apps
In order for Adjust to communicate with Apple, you need to provide a set of credentials. In this article, learn how to:
- Set up server notifications in your App Store Connect account. When you set up server notifications, the Apple App Store notifies Adjust of updates to your app's subscriptions. This lets Adjust trigger subscription events on time.
- Generate an In-app Purchase key. The In-App Purchase key is required for all types of in-app purchases. Subscriptions are a type of in-app purchase.
- Retrieve values from App Store Connect. These values are required to connect your App Store Connect account to Adjust.
- Private key
- Key ID
- Issuer ID
- Connect your App Store Connect credentials in Adjust.
Before you begin
Here's what you need to know before getting started.
Subscriptions is available as an Adjust Growth solution. Speak with your Adjust representative or sales@adjust.com to get this added to your package.
Requirements
- App in App Store Connect
- Admin permissions in App Store Connect
- Admin, Editor, or Custom Editor permissions in Adjust to connect your App Store Connect credentials in Adjust
Set up server notifications in App Store Connect
You need to set up server notifications in your App Store Connect account. When set up, the Apple App Store notifies Adjust of updates to your app's subscriptions.
- Log in to your App Store Connect.
- Select My Apps.
- Select the app you want to set up.
- Select App Information.
- Under App Store Server Notifications > Production Server URL, select Set Up URL.
- In the Production Server URL field, enter
https://subscription.adjust.com/v2/appstore/
.- Apple only supports one server notification URL. If you want to receive Apple subscription data to your servers first, then proxy the notifications to our endpoint:
https://subscription.adjust.com/v2/appstore/
.
- Apple only supports one server notification URL. If you want to receive Apple subscription data to your servers first, then proxy the notifications to our endpoint:
- Select Version 2 Notifications.
- Apple has deprecated Version 1 notifications. If you were on a previous version of subscriptions in Adjust, update to Version 2 Notifications.
- Select Save.
Generate an In-app Purchase key
We recommend that you generate an In-App Purchase key for Adjust in-app revenue verification. This key authorizes access to your app data from the App Store Server API. If you've not already requested API access in your App Store Connect account, complete the request before you create a key.
- Log in to your App Store Connect.
- Select Users and Access.
- Select Integrations.
- Under Key Type, select In-App Purchase.
- Select the + icon to create an In-app Purchase key.
- In the Name field, enter a name for the key.
- Select Generate.
Your In-app Purchase key appears in the list of active keys.
Retrieve values from App Store Connect
- Log in to your App Store Connect.
- Select Users and Access.
- Select Integrations.
- Under Key Type, select In-App Purchase.
- Next to Issuer ID, select Copy.
- Example:
57246542-96fe-1a63-e053-0824d011072a
- Example:
- For the key you generated, hover over the value in the Key ID column. Select Copy Key ID to copy the key ID.
- Example:
2X9R4HXF34
- Example:
- For the same key, select Download In-App Purchase Key, and then select Download to proceed.
- Copy the entire private key from the downloaded
.p8
file.- Example:
-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgNxUqm0R2vt4IrLAQr9gfDPixwSxH9wJZ6NV3X0ax4eWgCgYIKoZIzj0DAQehasda2ANCAAQx53AlofI4Of54lbR04A6D2QMbe0mt8+JtRHkJJCEUesUfySoZsm2jeh3qodLE0pZ2Rayv26qFMKuKEwemB2Op
-----END PRIVATE KEY-----
Connect App Store Connect account in Adjust
You need to use the same App Store Connect account credentials in Adjust for all apps in your App Store Connect account. Follow these steps to add your App Store Connect credentials in Adjust.
- Under DataWorks, select Connections.
- Select + New Connection.
- Under Partner, select App Store Connect (In-App Purchase).
- Under Services, select Subscription.
- Provide the values that you retrieved in the previous step.
- Issuer ID
- Key ID
- Private key
- Select Connect.