How to Test In-App Purchases in Sandbox Mode on iOS and Android

DavidDavid August 11, 2026 8 min read
A smartphone showing a subscription confirmation screen next to a laptop with code, representing in-app purchase sandbox testing
Original image, App Store Launch Club

The Short Answer: What Sandbox Mode Actually Checks

Sandbox mode is a test environment inside Apple's and Google's real payment systems that lets you run a complete purchase, from tapping subscribe to the app unlocking paid features, without spending real money. It is not a mock or a fake screen. It calls the same StoreKit and Play Billing code your real customers will hit, using a designated test account instead of your personal one. If sandbox testing passes, the paywall itself is not the reason a launch fails.

The reason sandbox testing trips up so many first-time builders is not the concept. It is three specific setup steps that are easy to skip or get wrong, and each one produces a confusing, generic-looking error instead of a clear message telling you what to fix. The rest of this covers each one directly.

Test on a Real Build, Never Inside Expo Go

This is the mistake that stops purchases before sandbox testing even becomes the issue. Expo Go is a pre-built container app that runs your JavaScript, and it does not include native billing code. RevenueCat, StoreKit, and Google Play Billing all require native modules that only exist in a real build of your own app, so a purchase button tapped inside Expo Go either does nothing or throws an error that has nothing to do with sandbox setup at all.

  • Create a development build with EAS Build (`eas build --profile development`) and install it on a real device, or run a full production-profile build if you are close to submission.
  • Install the build directly on the device, not through Expo Go, and open your app from its own icon on the home screen.
  • Confirm your app.json or app config includes the in-app purchase entitlement and the RevenueCat or native billing package before you build.

Set Up an iOS Sandbox Tester in App Store Connect

iOS sandbox testing runs through a dedicated tester account, separate from both your developer account and your personal Apple ID, that Apple's servers recognize as a test purchaser.

  1. In App Store Connect, go to Users and Access, then the Sandbox Testers tab, and add a new tester.
  2. Use an email address that has never been used for any Apple ID before, sandbox or otherwise. A real inbox you can access is fine; the account itself must be brand new.
  3. Do not sign into this account through Settings on the device. On iOS 13 and later, you sign in with the sandbox account only when the in-app purchase prompt itself asks for it, inside your app.
  4. Tap subscribe in your app, and when the system purchase sheet appears, sign in with the sandbox tester's Apple ID and password at that prompt.

Set Up License Testers on Google Play

Google Play uses a different mechanism: license testers, which are Google accounts you explicitly authorize to make test purchases against your app's real listing without being charged.

  1. In Google Play Console, go to Setup, then License Testing, and add the Gmail addresses you want to test with.
  2. Upload your app to an internal testing track and add the same accounts as internal testers.
  3. Install the app from the internal testing opt-in link on a device signed into a license tester's Google account.
  4. When you tap subscribe, Google Play shows a visible test-purchase banner confirming the card will not actually be charged.

Wait for Your Products to Finish Propagating

This is the setup step that produces the most confusing error, because it looks like your code is broken when the real cause is timing. After you create a new subscription product in App Store Connect, it needs to reach 'Ready to Submit' status before sandbox purchases will work at all, and that can take anywhere from a few minutes to a few hours the first time.

Google Play has the same delay after you first publish a subscription product to an internal testing track. If everything in your build and tester setup looks correct and purchases still fail, check the product status in the console before you touch any code.

Fix 'Cannot Connect to iTunes Store' and Other Sandbox Errors

A handful of specific errors cover most sandbox failures. Each one traces back to one of the three causes above rather than a bug in your paywall code.

Error or symptomUsual causeFix
"Cannot connect to iTunes Store"Product not yet Ready to Submit, or agreements/tax/banking incomplete in App Store ConnectCheck product status; confirm your Paid Apps agreement is active
Purchase sheet never appearsRunning inside Expo Go instead of a native buildInstall a real development or EAS build on the device
Sandbox purchase succeeds but app does not unlockRevenueCat entitlement not linked to the product, or app checking the wrong entitlement keyRe-check the entitlement mapping in the RevenueCat dashboard against your app code
"This In-App Purchase has already been bought"Sandbox account reused a consumable or non-consumable product from a prior testUse a fresh sandbox tester account or clear prior purchases in App Store Connect's sandbox tools
Google Play purchase shows real pricing, no test bannerAccount is not added as a license tester, or app was not installed via the internal testing linkAdd the Google account under License Testing and reinstall through the internal testing opt-in link

Confirm RevenueCat Is Reading the Right Environment

If you are wiring your paywall through RevenueCat, its dashboard shows every purchase event with a Sandbox or Production tag, which is the fastest way to confirm the whole chain actually worked. Open the Customer History for your sandbox tester's app user ID after a test purchase and look for the event to show up tagged Sandbox within a minute or two.

If the purchase went through on-device but never appears in RevenueCat, the most common cause is an API key mismatch: a production key wired into a build you are testing with a sandbox account, or the reverse. Match the key in your Expo app's RevenueCat configuration to the environment you intend to test.

Test the Full Flow, Not Just the Tap

A purchase that completes is only half the test. Run the entire sequence a real customer will hit: open the paywall, start a free trial if you offer one, complete the sandbox purchase, close and reopen the app, and confirm the paid features are still unlocked after a fresh app launch. Sandbox subscriptions also renew on an accelerated schedule, so you can watch a trial convert to a paid period and confirm your app still recognizes an active subscription after that renewal, all inside a single testing session.

Passing sandbox testing before submission is what turns a paywall from a guess into something you know works. Join the App Store Launch Club at applaunchclub.co for $9/month for the full RevenueCat and Expo paywall setup, including the exact entitlement and product configuration members use before their first submission.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

Why does my in-app purchase button do nothing when I tap it?

The most common cause is testing inside Expo Go, which does not include the native billing code that RevenueCat, StoreKit, and Google Play Billing all require. Build a development build or a full EAS build, install it on a real device outside of Expo Go, and test from there instead.

Do I need a real credit card to test in-app purchases?

No. Sandbox testing on iOS uses a dedicated sandbox tester Apple ID created in App Store Connect, and Google Play uses license tester Google accounts added in Play Console. Both let you run a complete purchase flow through the real payment systems without any card being charged.

Why do I get 'Cannot connect to iTunes Store' when testing?

This usually means your subscription product has not finished propagating to Ready to Submit status in App Store Connect yet, which can take a few hours after you first create it, or that your Paid Apps agreement and banking information are not complete. Check the product status and agreement status before assuming your code is broken.

How long does a sandbox subscription take to renew for testing?

Apple and Google both accelerate sandbox subscription periods so you do not have to wait a real month to test a renewal. A weekly subscription might renew every few minutes in sandbox, which lets you confirm your app still recognizes an active subscription after a renewal in a single testing session.

How do I know if RevenueCat actually received my sandbox purchase?

Open the Customer History for your test user's app user ID in the RevenueCat dashboard after completing a sandbox purchase. The event should appear tagged Sandbox within a minute or two. If it never shows up, check for an API key mismatch between the environment your build is configured for and the account you tested with.

Last reviewed by David on August 11, 2026

David

Written by

David

Founder and app builder

Keep reading

App StoreMonetization

App Store Promo Codes vs Offer Codes: How to Give People Free Access to Your Expo App

App Store promo codes give someone a free download of your paid app. Offer codes give someone a free or discounted in-app purchase or subscription. Since March 26, 2026 Apple no longer lets you create promo codes for in-app purchases, so an Expo app with a subscription paywall hands out offer codes, and a paid-up-front app hands out promo codes. Here is what each one does, the limits Apple publishes, how to create them in App Store Connect, and how to redeem them from a RevenueCat paywall.

David 9 min
Read article
Apple App ReviewGuideline 3.1.2

Guideline 3.1.2 Rejection: How to Fix Your Subscription Paywall for App Review

A Guideline 3.1.2 rejection means App Review found your auto-renewable subscription missing something Apple requires before a user can subscribe: the full renewal price shown prominently, the subscription name and length, what the user gets, a restore path, or working Terms of Use and Privacy Policy links. Here is what each 3.1.2 clause targets and the exact paywall checklist that clears it.

David 9 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog