In order to validate receipts from Apple, Iaptic requires two pieces of information from your App Store Account.
- The iOS Shared Key (or Shared Secret Key), which can be retrieved from App Store Connect.
- Your iOS Bundle ID, which you probably know, but can also be retrieved from the App Store Connect.
The steps below will show you how to do the setup for iOS.
Step 1: Login into your App Store Connect account.
Step 2: Select My Apps.
Step 3: Select the specific app for which you want to enable In-App Purchase.
Step 4: Check your Bundle ID (just in case), this has to match your Settings in Iaptic’s dashboard.
Step 5: On the same page, scroll down to App Specific Shared Secret, click Manage.
Step 6: A pop-up window will appear where you can Generate an App-Specific Shared Secret (or retrieve the existing one).
Step 7: Copy the Shared Secret Key, paste it into your Iaptic’s settings.
Notice: Your app sometimes has multiple valid keys, in that case you can define multiple values separated with a comma. For making requests to Apple servers, iaptic will use the first value in the list.
Step 8: If you are implementing subscriptions, you also have to setup the iOS Subscription Status URL. Check out the related documentation: How to setup iOS Subscription Status URL.
TestFlight and Sandbox Testing
When testing subscriptions in TestFlight or sandbox environment:
-
Subscription Management
- Subscriptions should appear in Settings > Apple ID > Subscriptions
- Users can manage subscriptions like production ones
- Make sure to use a sandbox Apple ID for purchases
-
Sandbox Environment Specifics
- Subscriptions renew at an accelerated rate for testing:
- 1 week -> 3 minutes
- 1 month -> 5 minutes
- 2 months -> 10 minutes
- 3 months -> 15 minutes
- 6 months -> 30 minutes
- 1 year -> 1 hour
- No actual charges are made
- Requires a sandbox Apple ID for purchases
- Create sandbox testers in App Store Connect
- Subscriptions renew at an accelerated rate for testing:
-
Common Issues
- If subscriptions don't appear in Settings:
- Verify App Store is using sandbox Apple ID when purchasing
- Check receipt validation status in Events
- Ensure the purchase was properly acknowledged
- Review validation logs in Events for troubleshooting
- If subscriptions don't appear in Settings:
-
Best Practices
- Test both sandbox and production flows
- Monitor receipt validation in Events
- Document sandbox behavior for testers
Setting Up Sandbox Testing
-
Create Sandbox Testers
- Log in to App Store Connect
- Go to Users and Access > Sandbox > Testers
- Click the + button to add a new tester
- Fill in the required information
- Save the credentials for testing
-
Making Test Purchases
- For purchases:
- Go to Settings > App Store
- Sign in with your sandbox tester account
- Make the purchase in the app
- The subscription should appear in Settings
- For purchases:
Important: Only the App Store account needs to be a sandbox account for testing purchases. TestFlight installation uses your regular Apple ID.