App Store Credentials (In-App Purchase Key)
Overview
The In-App Purchase Key in the App Store is a cryptographic key used to validate and verify in-app purchases made within your iOS app. It is required for:
- Verifying purchases made using StoreKit2, e.g., when using the
await Product.purchase()
syntax. - Decoding App Store Server Notifications.
Fallback to Shared Secret
If you make purchases using StoreKit2 (using the await Product.purchase()
syntax) but the In-App Purchase key is missing, we will fallback to the legacy validation method using the Shared Secret. However, receipt validation with the Shared Secret is deprecated. To ensure optimal performance and better tracking accuracy, we strongly recommend generating an In-App Purchase Key.
How to Generate an In-App Purchase Key
Follow these steps to create and use your In-App Purchase Key:
-
Log in to App Store Connect as an Admin or theAccount Holder role.
-
In App Store Connect, go to Users and Access > Integrations > In-App Purchase.
-
Generate and Download the Key
- Click Generate Key to create a new In-App Purchase Key.
- Download the key file to a safe place.
Note
Once downloaded, Apple does not provide an option to re-download the key.
-
Copy the Issuer ID
- On the same page copy the Issuer ID. You’ll need it along with the key file for integration.
Important
The IAP Key file is named in the format:
SubscriptionKey_[KEY_ID].p8
, where[KEY_ID]
is your Key Identifier. Do not rename the file.
For more details, refer to Apple’s official documentation on creating API keys.
Verify App Store Server Notifications Version
To ensure you are using the latest version of App Store Server Notifications, follow these steps:
-
Go to App Information
- In App Store Connect, navigate to your app’s page and select App Information.
-
Scroll down to the App Store Server Notifications section.
-
Check the Notification Version
- If an option to choose between V1 and V2 is available, select V2.
- If no option is available, the system is already using V2.
Note
If App Store Server Notifications block is missing in App Store Connect, try to create in-app purchases first.
By using Server notifications V2 and In-App Purchase Key, you gain access to improved performance and subscription tracking accuracy.
Updated 17 days ago