Testing subscriptions end to end in App Store sandbox and Play internal testing
Official Apple, Google, and RevenueCat docs already cover sandbox testers and renewal timers. This piece is about the exact stack — React + Capacitor, Supabase Auth, Stripe on the web, RevenueCat on iPhone and Android — and the test founders skip after the first successful purchase() call: proving the store path on a real device, watching an accelerated renewal, and confirming the same App User ID in the RevenueCat dashboard before you trust production.
It follows why a Stripe subscriber hits a Capacitor paywall, mapping Supabase Auth user IDs to RevenueCat, and refunds, transfers, and which webhook actually updates access. Those cover attaching the web subscription, identifying the signed-in user, and the webhook file. This one is the device session that proves those pieces still agree after a real store purchase.
The failure mode
You bought a monthly product in RevenueCat’s Test Store, or in the iOS Simulator with a StoreKit configuration file, and the paywall unlocked. That is useful during development. It is not the same as a store purchase:
- Test Store never talks to App Store or Play Billing. Shipping with the Test Store API key means production purchases will not be tracked.
- StoreKit Testing in Xcode is a local environment. RevenueCat documents that cancel and refund actions you trigger there are not stored in the receipt and will not appear in the dashboard, even if the SDK later drops the entitlement after a restart.
- TestFlight uses a production Apple Account and sandbox purchases, but Apple currently renews every TestFlight subscription once per day, up to six times in a week, regardless of duration. That is the wrong clock if you want to watch a monthly renewal in the next five minutes.
- A Play internal test track purchase will charge a real payment method unless that Google account is also a license tester. Google is explicit: testers incur actual charges on a test track unless they are license testers.
- The Capacitor app can show “entitlement active” from cached
CustomerInfowhile RevenueCat never received the receipt — or received it under an anonymous App User ID instead of your Supabaseuser.id.
Each of those can look like a passing test. None of them is the pre-launch check.
A printable Capacitor + RevenueCat + Stripe entitlement checklist covers the cases in this article, as a free PDF.
What this test is
Use the platform sandbox, on a physical device, with the platform RevenueCat API keys (Apple and Google), after Purchases.logIn with the Supabase Auth user id. RevenueCat detects sandbox versus production automatically; you do not flip a project setting to “test mode.” You do turn on View Sandbox Data in the dashboard, or the transaction will look missing.
The goal is narrow: initiate a purchase, complete it, confirm the entitlement unlocks in the app, then confirm the same customer in RevenueCat. After that, wait through at least one accelerated renewal and, if your webhook file is already in place, confirm the server row still matches.
App Store sandbox on a real iPhone or iPad
Create a Sandbox Apple Account in App Store Connect under Users and Access → Sandbox. Use an email address that is not already an Apple Account. Enable Developer Mode on the device. Sign in with that sandbox account in the sandbox slot, not as the device’s personal Apple Account:
- On current iOS, Settings → Developer → Sandbox Apple Account.
- On earlier iOS, Settings → App Store → Sandbox Account.
If the field is missing, start a purchase in a development-signed build; Apple will prompt, and the sandbox account then appears in Settings. You do not sign out of your personal Apple Account to buy in sandbox.
Install a development-signed Capacitor iOS build — not an App Store production build, and not a TestFlight build if you want the minutes-scale renewal schedule. Apple’s sandbox can be slow; RevenueCat notes that a sandbox purchase may take upwards of 15 seconds. That is normal. In production, the same flow is usually a few seconds.
By default, a sandbox account uses a speed of 1 month = 5 minutes. You can change that rate per tester in App Store Connect or in the on-device sandbox settings. Subscriptions automatically renew up to 12 times, and auto-renewal turns off on the thirteenth renewal attempt. After that you can test expiration and a lapse without waiting a real month.
| Production duration | Sandbox renewal |
|---|---|
| 1 week | 3 minutes |
| 1 month | 5 minutes |
| 2 months | 10 minutes |
| 3 months | 15 minutes |
| 6 months | 30 minutes |
| 1 year | 1 hour |
Treat store metadata in sandbox as untrustworthy. Prices and currencies in getOfferings() are often wrong here and in TestFlight, even when the purchase sheet is right and the buy succeeds. Test the flow, not the label.
We ran this path on a real iPad with a development-signed Capacitor build and a Sandbox Apple Account. Before the buy, the monthly Pro product loaded a store price and the pro entitlement was not active. After the buy, the app showed the entitlement active and marked the purchase as sandbox. The on-device card only reported whether the entitlement was active — not the expiration — so the five-minute renewals were not something you could watch in the UI alone. That is a useful design constraint: if your paywall only prints “pro is active,” you still have to open RevenueCat (and your webhook log) to prove renewals. A missing URL for our own API did not block the store entitlement from becoming active. That is expected, and it is also the trap: a device flag is not proof that the Supabase row updated.
Play internal testing, plus license testers
Google’s test has two lists, and founders often complete only one.
- License testers — in Play Console, under license testing. License testers get test payment methods (“always approves,” “always declines,” and slower cards) and the accelerated renewal schedule. Google also lets license testers sideload a build whose package name matches the Play app. Your publishing account is already a license tester. Changes can take a while to propagate.
- A testing track — Google recommends publishing the app to a test track and having each tester open the opt-in URL. Internal testing is the usual first track for a new Capacitor app. A closed track also works; RevenueCat’s own walkthrough uses one. Products and subscriptions must be published before you can buy them. The package name of the build must match the Play application id. After you publish to a track, the release can take a few hours to become available.
Both matter. RevenueCat’s matrix is blunt: a tester who opted into the track but is not a license tester is offered a real card. Google says the same: users incur actual charges for test-track purchases unless they are license testers. Draft apps and internal-test releases also have spend limits.
While you are testing, use one Google account on the device — the license tester that opted in. RevenueCat warns that multiple accounts on the device are a sandbox-only source of failed purchases. Google notes that if several accounts are present, the purchase is made with the account that downloaded the app. If products do not load, the usual causes are a skipped opt-in URL, a mismatched application id, or a release that is not available in the tester’s country yet. Some devices also need a PIN before subscriptions will complete.
Play test subscriptions renew faster than production, and they renew a maximum of six times (not counting free trials and introductory periods). Times are approximate; Google tells you to re-read subscription state after each expected expiration.
| Production period | Test renewal |
|---|---|
| 1 week | 5 minutes |
| 1 month | 5 minutes |
| 3 months | 10 minutes |
| 6 months | 15 minutes |
| 1 year | 30 minutes |
A personal Play developer account must still complete identity checks, and public production has a closed-testing requirement (a group of testers for a stretch of days) before you can sell to everyone. That rule is about launching, not about whether an internal test purchase can go through. You can — and should — run license-tester purchases on an internal track before that production gate.
What to verify in RevenueCat
After a successful purchase, the transaction should appear immediately in the dashboard. If it does not, RevenueCat is not tracking it. Before you conclude that, turn on View Sandbox Data. There is no separate “sandbox customer” in RevenueCat; the same App User ID can hold sandbox and production receipts, and the toggle only changes which purchases the overview shows.
Check, in order:
- The App User ID is the Supabase Auth
user.idyou passed toPurchases.logIn, not a still-anonymous$RCAnonymousID. If it is anonymous, the buy worked for this install and will drift the first time someone signs in — the subject of the mapping article. - The purchase is marked sandbox, from App Store or Play, for the product you bought.
- The entitlement you gate on is active, with an expiration consistent with the accelerated period (about five minutes for a monthly product on the default Apple rate, or on Play).
- After a renewal window: the entitlement is still active. RevenueCat and Apple both warn that, because renewals are so fast, not every renewal is guaranteed to show in the customer dashboard. If you have webhooks, look for
RENEWALin the event log as well. - After you cancel in the device subscription settings: you should see
CANCELLATION, but access should remain untilEXPIRATIONat the end of the current (short) period — the same rule as production, described in the webhooks article. - After Apple’s twelfth renewal, or Play’s sixth, auto-renew stops. The next expiry should drop the entitlement in the app and in RevenueCat, and your Supabase row should follow if the webhook handler re-fetches the subscriber.
Do not use this session as a metadata test. Do not treat a deleted RevenueCat customer as a fresh store buyer: deleting the customer removes RevenueCat’s copy of the receipts, not the App Store or Play purchase history. Restoring will bring those purchases back. To reuse an Apple sandbox tester, clear that tester’s purchase history in App Store Connect. RevenueCat also caps App Store subscription receipts on one customer at 100, which is easy to hit in sandbox and will not happen in production; deleting the RevenueCat customer clears the cap.
A sequence that actually proves the path
Run this on iOS first, then the same checks on a real Android device.
- Sign in to the Capacitor app with Supabase Auth. Call
Purchases.logInwithuser.idbefore you show the paywall. - Confirm offerings load from the store (a price appears). Do not fail the test because the currency looks wrong in sandbox.
- Buy the monthly product. Wait through a slow Apple sandbox sheet if needed.
- In the app, the entitlement is active.
- In RevenueCat, with sandbox data visible, the same App User ID has a sandbox transaction and an active entitlement.
- Wait one renewal period. Confirm the entitlement is still active, and that a renewal appears in the dashboard or the webhook log.
- Cancel from the device subscription settings. Confirm
CANCELLATIONand that access remains until the short period ends. - After expiration — or after the last automatic renewal — the entitlement is gone in the app, in RevenueCat, and in the Supabase row.
- Restore as the same user and confirm the current state (active or expired) comes back under the same App User ID.
- Sign out, sign in as a second Supabase user on the same device, and confirm that user does not inherit premium.
If step 4 passes and step 5 fails, the store worked and RevenueCat did not see the receipt — usually the wrong API key, or a purchase that never reached the SDK. If step 5 shows an anonymous id, fix identity before you debug webhooks. If the device is entitled and RevenueCat is entitled but Supabase is not, the webhook file is the gap, not Capacitor.
A printable list of these cases lives on the free entitlement checklist.
Short checklist
- Use platform API keys, not the Test Store key, for this test.
- Identify the Supabase user before the purchase.
- Test on a real device: Sandbox Apple Account in the sandbox slot for iOS; license tester plus test-track opt-in for Android.
- Do not use TestFlight when you need five-minute monthly renewals; TestFlight currently renews once a day, up to six times.
- On Play, being on the internal track is not enough to avoid a real charge. Add the same account as a license tester.
- Turn on View Sandbox Data and confirm the transaction, the App User ID, the entitlement, and a renewal — not only a device flag.
- Cancel does not revoke early. Expiration does.
- Clearing a RevenueCat customer does not clear App Store or Play history.
- Stripe web attach is a different path; this test does not replace it. See why a Stripe subscriber hits a paywall.
Sources
- Apple, overview of testing in sandbox: https://developer.apple.com/help/app-store-connect/test-in-app-purchases/overview-of-testing-in-sandbox/
- Apple, create a Sandbox Apple Account: https://developer.apple.com/help/app-store-connect/test-in-app-purchases/create-a-sandbox-apple-account/
- Apple, manage Sandbox Apple Account settings (renewal rates): https://developer.apple.com/help/app-store-connect/test-in-app-purchases/manage-sandbox-apple-account-settings/
- Apple, testing an auto-renewable subscription: https://developer.apple.com/documentation/storekit/testing-an-auto-renewable-subscription
- Apple, testing subscriptions in TestFlight: https://developer.apple.com/help/app-store-connect/test-a-beta-version/testing-subscriptions-and-in-app-purchases-in-testflight/
- RevenueCat sandbox testing: https://www.revenuecat.com/docs/test-and-launch/sandbox
- RevenueCat Apple App Store and TestFlight: https://www.revenuecat.com/docs/test-and-launch/sandbox/apple-app-store
- RevenueCat Google Play Store: https://www.revenuecat.com/docs/test-and-launch/sandbox/google-play-store
- Google, test Play Billing: https://developer.android.com/google/play/billing/test
- Google, license testers: https://support.google.com/googleplay/android-developer/answer/6062777
Book a fit check
If sandbox purchases already disagree between the device, RevenueCat, and your Supabase row, start with the free entitlement checklist, or book a fit check if you want the Integration done on this stack. Related reading: why Play review says the item you were attempting to purchase could not be found, refunds, transfers, and which webhook actually updates access, mapping Supabase Auth user IDs to RevenueCat, and why a Stripe subscriber hits a Capacitor paywall.