Test in-app purchases with TestFlight
TestFlight lets you get feedback from members of your team. Testing is done on real devices, and the testers will need to use their real Apple accounts. Please note that TestFlight uses the sandbox environment for in-app purchases. Transactions and purchases don’t incur charges in this case.
Testing with TestFlight on a sandbox environment is the best choice when you want to let your team members test your app. For more details, you can refer to Apple's documentation on Beta testing with TestFlight.
Test on a real device
To validate the end-to-end purchase process, it's essential to conduct testing on a real device. While testing on a simulator allows you to examine paywalls, it does not enable interaction with the Apple server, making it impossible to test purchases.
Before you start testing
Before you start testing in-app purchases, make sure that:
- Your Apple Developer Program account is active. For more information, see Apple's What you need to enroll.
- Your membership Account Holder has signed the Paid Applications Agreement, as described in Apple's Sign and update agreements.
- You set up the product information in App Store Connect for the app you’re testing. At a minimum, set up a product reference name, product ID, a localized name, and a price.
- The Keychain Sharing capability is disabled. For more information, see Apple's article Configuring keychain sharing.
- You’re running a development-signed rather than a production-signed build of your app.
- You have completed all the steps outlined in the release checklist.
Prepare for testing with TestFlight
When conducting purchase testing with TestFlight, ensure you're using a real device and your genuine Apple account. Notably, transactions and purchases made during testing won't result in any charges when using the development-signed build of your app.
To test beta versions of apps using TestFlight:
- Build your mobile app version and send it to TestFlight without releasing it via App Store Connect.
- On your iOS device, install the TestFlight.
- Share the link to your app built into the device and tap it on your device.
- If you’re a new tester for the app, tap Accept.
- Tap Install to install the app on your device.
The app is installed and ready for testing.
Make purchase
Make a purchase in your mobile app via paywall.
Now you can validate that the test purchase is successful.