Forward in-app purchases on iOS
When users make an in-app purchase, we receive data in three ways:
- The justtrack SDK, when properly configured, forwards the transaction to our backend.
- For one-time purchases, our backend uses an API request to verify the transaction.
- For subscriptions, Apple sends an in-app purchase event notification to our backend.
In this guide, you'll learn how to configure your accounts in justtrack and App Store Connect so we can receive the necessary data from each of these sources.
SDK setup
Read our iOS, React Native, or Unity SDK documentation for setup instructions.
Look up your shared secret
In order to verify one-time purchases, you need to configure a shared secret. This will allow us to make API calls on behalf of your app. There are two types of shared secrets you can configure for your iOS account:
- App-specific: This is used only for the app for which it's configured.
- Global: This is used if no app-specific secret is configured.
App-specific shared secret
If you prefer to use your global shared secret, you can skip this section.
- Click App Information
- Under App-Specific Shared Secret, click Manage
If you don't have an app-specific shared secret configured, generate one:
Now, you're presented with the 32-character, hexadecimal shared secret. Copy this so you can pass this to the justtrack platform in the next section.
Global shared secret
If you already have an app-specific shared secret, you can skip this section.
- Click Users and Access
- Click Shared Secret
- Generate a new shared secret or find your existing secret
Copy this so you can pass this to the justtrack platform in the next section.
Configure your shared secret in justtrack
Now that you have a shared secret, you need to enter it in justtrack.
In justtrack, navigate to Admin > Apps:
Here, you'll find the list of apps connected to your justtrack account. Next to the app for which you want to verify purchases, click See Details.
Now, you're in the App Hub. From here, you can configure how you monetize your app. On the Monetization card, click Manage Integration:
On the Monetization page, click Purchase verification credentials:
Here, you'll paste the secret you copied in the last section. In the App Hub, you'll see an indication that you've successfully set up in-app purchase tracking. You can now start forwarding in-app purchases from the iOS, React Native, or Unity justtrack SDKs, and you'll see the revenue you make from them on the justtrack dashboard.
Provide the notifications URL
For subscriptions, you need to give Apple a justtrack URL so we receive the in-app purchase notifications.
- In App Store Connect, navigate to General > App Information.
- Under App Store Server Notifications, click Set Up URL.
- Provide this URL:
https://iap.justtrack.io/appleappstore/v2
- Select V2 Notifications (This is important!)