Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

Apple App Store

Testing purchases in App Store Sandbox

This section assumes you've followed our Quickstart section of our Getting Started guide to install and configure our SDK.

Create a sandbox test account

In order to test your purchases, you'll need a sandbox test account. You can create test accounts from your App Store Connect dashboard > Users and Access > Sandbox Testers.

If you need help, you can refer to Apple's guide on creating sandbox testers here.

Valid email required for sandbox accounts

Keep in mind you'll need to create sandbox accounts with valid emails that you can verify you own.

Add the sandbox test account to your device

Even for sandbox purchases, you'll need to test on a real device. Starting in iOS 12, you're able to add a sandbox account to your device without having to sign out of your iTunes account.

Navigate to Settings > Your Account > iTunes & App Store > Sandbox Account. Add the sandbox account credentials that you previously created

Add your sandbox account under iOS settings to streamline testing

Add your sandbox account under iOS settings to streamline testing

Make a purchase

Build and run your app on your device. When you attempt to make a purchase, you may be still be prompted to sign in with the sandbox account you just created.

Apple may prompt you to sign into an iTunes account whenever you make or restore a purchase. When using Purchases, this could only happen when you call .makePurchase or .restoreTransactions. Developers don't have control over the type of prompt that is shown (Touch Id, password, etc.)

Verify transaction appears in dashboard

After a purchase is successful, you should be able to view the transaction immediately in the RevenueCat dashboard. If the purchase does not appear in the dashboard, it's not being tracked by RevenueCat.

Make sure Sandbox Data is enabled

Make sure the the View Sandbox Data toggle is enabled in the navigation bar.

Working with subscriptions

In the the sandbox environment, subscription renewals happen at an accelerated rate, and auto-renewable subscriptions renew a maximum of six times per day. This enables you to test how your app handles a subscription renewal, a subscription lapse, and a subscription history that includes gaps.

Because of the accelerated expiration and renewal rates, sometimes not all renewals are reflected in the RevenueCat customer dashboard.

Deleting test users

When testing, it may be helpful to delete a customer and all their receipts from RevenueCat to simulate a new installation. You can delete a specific user from the customer dashboard in RevenueCat. See our docs on deleting users for more information.

Next Steps

For more information, take a look at the official Apple documentation:
Apple App Store: Testing in-app purchases

Updated 8 days ago

Apple App Store

Testing purchases in App Store Sandbox

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.