How can I test a real subscription purchase before releasing my app in the App Store?

I can test with some difficulty using sandbox test accounts, but I want to be absolutely sure that a real purchase works before putting my app in the App Store.

Has anyone done this?

Whatever you do, pls. don't re-invent the wheel...


Quoting the App Store docs...


Testing

Test Transactions

Use the Apple sandbox testing environment to test your in-app purchases without incurring charges.

App Store Connect Help: Create a Sandbox Tester AccountIn-App Purchase Programming Guide: Suggested Testing Steps


Test the Full User Experience

Use TestFlight to gain valuable feedback on your app and in-app purchases from a wider audience before releasing your app on the App Store. Invite users on your team in App Store Connect, and up to external 10,000 testers using a public link or their email address. All in-app purchases are free during the beta testing period, and will not carry over when the testing period is over.

Beta Testing Made Simple with TestFlight

You can almost do a 'real' test using TestFlight. The differences are quite small. They are:

1) the TestFlight sandbox doesn't care if your metadata for the IAP is not marked 'cleared for sale',

2) the TestFlight sandbox may not care if your developer documents (bank contracts) are signed and

3) the TestFlight sandbox uses a different website for verification - so, if you are using the Apple servers to verify a receipt, be sure that you first send them to the production website and then, if you get a 210007 error, you send them to the sandbox website.


edit add - and the TestFlight sandbox times for autorenewable subscriptions may be different that production.

You should be able to generate a promo code for a version of an app that has been approved but not yet released. Use the promo code to download the version with the IAPs, and you can test a real purchase.

How can I test a real subscription purchase before releasing my app in the App Store?
 
 
Q