Set up purchase verification for your app
To start working with Purchase verification, you need to ensure you have correctly set up the Adjust SDK in your app and provided Adjust with the necessary credentials to authorize purchases from the relevant store.
Before you begin
Purchase verification is available as an Adjust Growth solution. Speak with your Adjust representative or sales@adjust.com to get this added to your package.
Requirements
- Admin, Editor or Custom Editor permissions in Adjust
- For creating and mananging app store credentials:
- Google Cloud:
Service Account Key Admin
role on the project or service account. - App Store Connect:
Admin
rights.
- Google Cloud:
What you need to know
- Purchase verification is intended only for in-app purchases made through the Google Play Store or Apple App Store. It does not work for the purchase of physical items.
- Available for iOS, Android and Unity apps.
1. Set up the Adjust SDK
To integrate Adjust Purchase Verification into your application, ensure you have the minimal required SDK version installed and complete the necessary implementation steps for sending purchase revenue events.
Optional: Set up verification SDK callbacks
Set up SDK verification callbacks to receive the verification status of a purchase directly in-app. With this information delivered to your app in real-time, you can then enable the automatic delivery of the purchased item to a user.
Be aware that in-app verification SDK callbacks are only available for iOS and Android apps using Adjust's native SDK v5. Use the links below to find out how to migrate to the SDK v5, and how to set up the verification callbacks.
Migrate to the Adjust SDK v5:
Set up verification SDK callbacks:
2. Find your app store credentials
To verify purchases with a store, you need to provide Adjust with certain credentials that allow us to match your account.
Android:
Auth Parameter | Definition | Example |
---|---|---|
JSON key | Your JSON key, downloaded from the Service accounts page in Google Cloud Console. | example_key_file |
iOS:
Auth Parameter | Definition | Example |
---|---|---|
Issuer ID | Your issuer ID from the Integrations tab in App Store Connect. | 57246542-96fe-1a63-e053-0824d011072a |
Key ID | Your private key ID from the Integrations tab in App Store Connect. | 2X9R4HXF34 |
In-App Purchase API Key | Your P8 API key, downloaded from App Store Connect. It authorizes access to your app data from the App Store Server API. | -----BEGIN PRIVATE KEY----- MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgNxUqm0R2vt4IrLAQr9gfDPixwSxH9wJZ6NV3X0ax4eWgCgYIKoZIzj0DAQehasda2ANCAAQx53AlofI4Of54lbR04A6D2QMbe0mt8+JtRHkJJCEUesUfySoZsm2jeh3qodLE0pZ2Rayv26qFMKuKEwemB2Op -----END PRIVATE KEY----- |
Follow the instructions for your store platform to find the necessary credentials.
For Android
To create a service account key for a project or service account, your user account must have the Service Account Key Admin role.
Enable the Google Play Android Developer API
- In Google Play Console, navigate to APIs & Services.
- Select + Enable APIs and Services.
- Under the
Mobile
area, select Google Play Android Developer API. - Select Enable.
- Set the necessary API credentials.
- From the Enabled APIs & Services area, select Google Play Android Developer API.
- Select Create Credentials.
- Under
Select an API
, select Google Play Android Developer API. - Under
What data will you be accessing?
, select Application data. - Select Next.
Create a service account
- In Google Cloud, go to Create service account
- Select your Google Cloud project.
- Enter a service account name.
- A service account ID is automatically generated.
- Optional: Provide a service account description.
- Select Create and continue.
- Give the service account access to a project
- Assign the service account the Pub/Sub Admin role.
- Select + Add another role.
- Assign the service account the Monitoring Viewer role.
- Select Continue.
- Optional: Grant users access to this service account
- Select Done.
Create a new API key
- In Google Cloud, go to IAM & Admin.
- Select Service Accounts to view the service accounts for your project.
- For the service account you created, select Actions (three dots icon).
- Select Manage keys.
- Select Add Key > Create new key.
- Under Key type, select JSON.
- The private key is automatically downloaded.
For iOS
You need to have Admin rights in App Store Connect to create and manage API keys.
Find your Issuer ID
- In App Store Connect, select the Users and Access icon.
- Select the Integrations tab.
- Under the Key Type menu on the left, select In-App Purchase.
- At the top of the page, next to Issuer ID, select Copy.
Generate a new API key
We recommend you generate an API key dedicated for Adjust in-app revenue verification.
- Select Generate API Key or + icon to create a new key.
- If you have not already requested API access in your App Store Connect account, complete the request to do so.
- In the Name field, enter a name for the key.
- Select Generate.
- Your new API key appears in the list of active keys with its Key ID.
- On the key you generated, hover over the value in the Key ID column. Select the Copy Key ID link that appears.
- Select Download In-App Purchase Key.
- Select Download to proceed.
- Copy the entire API key from the downloaded file.
3. For iOS: Connect Adjust to App Store Connect
Follow these steps to add the App Store Connect credentials in the Adjust dashboard:
- In Adjust, navigate to DataWorks > Connections.
- Select + New Connection.
- From the list, select App Store Connect (In-App Purchase).
- Under Services, select Purchase Verification.
- Enter your Issuer ID.
- Enter your Key ID.
- Open the .p8 file in a text editor and copy the whole of the Private key. Paste this into the Private key field.
4. Add Purchase verification to your app
Now, apply Purchase verification for your app:
- In Adjust, navigate to AppView and select your app.
- Navigate to the Protection tab.
- Under Purchase Verfication, select Edit ().
- Toggle ON Purchase verification.
- Provide platform-specific information:
- For iOS apps: If you have an iOS app, you need to select which App Store Connect account to use.
- For Android apps: Upload the JSON key file you previously downloaded.
- Select Save.
And that's it - you're all set up!
Share verified revenue data with partners
Adjust's purchase verification solution ensures that only verified revenue data is shared with your partners. This means that you can have confidence in the data that is shared and its use for campaign optimization.
If you have already set up in-app revenue sharing with partners in the Adjust dashboard, you do not need to make any changes. Adjust automatically only forwards the revenue data that carries the verified passed
status.
To set up a new partner, and enable verified in-app revenue sharing, follow the instructions for ad network setup in Campaign Lab. When you reach the step to choose your data sharing options be sure to select in-app revenue.
It is important that you ensure your setup is correct, as any incorrect credentials you have entered, double encoding, or other configuration issues will prevent events from passing verification.