Test in-app purchases before launch: sandbox and testers
· 9 min read
Your app sells a subscription or a one-time unlock. You need to know that buying works, that renewing works, that cancelling takes the feature away, and that "restore purchases" brings it back. You also want to do all of this without spending real money, and let a few beta testers try it too. Both stores have a test mode for exactly this. This post walks through Apple's three options, Google's license testers, what to test, and what to watch on your server.
Apple: three ways to test
I read Apple's App Store Connect Help pages on 10 November 2026. Apple gives you a sandbox, a local tool in Xcode, and a built-in behavior for TestFlight. Each one fits a different stage.
1. Sandbox Apple Accounts
The overview of testing in sandbox says Apple "provides a sandbox environment that lets you test In-App Purchases and Apple Pay transactions using test accounts without incurring charges". It "returns transactions as if payments were successfully processed instead of processing actual payments."
You create test accounts in App Store Connect. The create a Sandbox Apple Account page gives these steps:
- Select Users and Access, then click Sandbox in the top navigation and click the add button.
- Enter a name, an email address and a strong password.
- Choose an App Store country or region, then click Create.
A few rules from the same page are worth knowing before you start.
- Use an email address "that hasn't been used as Apple Account or to purchase iTunes or App Store content".
- "Once you create a tester, you can't edit the name, email, or password."
- The accounts "can't be used to sign in to or make purchases on the App Store".
- You can create up to 10,000 Sandbox accounts.
On the phone, you need Developer Mode turned on. Then, for In-App Purchases, "Sign in with a Sandbox account in the App Store on your test device. You don't need to sign out of your personal Apple Account at the device level." The page also says to use the Sandbox sign-in option in Settings, not your main Apple Account settings. And it says sandbox accounts are for devices "running a development-signed version of your app".
2. Renewal speed in the sandbox
You do not wait a month to see a renewal. The sandbox account settings page says "By default, accounts are set to a speed equalization of 1 month = 5 minutes". Its default table lists these renewal speeds.
- 1 week: 3 minutes
- 1 month: 5 minutes
- 3 months: 15 minutes
- 6 months: 30 minutes
- 1 year: 1 hour
You can change the speed per tester. The page says "Subscriptions automatically renew up to 12 times before auto-renewal turns off on the thirteenth renewal attempt." The same page lets you clear a tester's purchase history ("This action can't be reversed") so you can buy the same product again. It also has a setting to interrupt purchases, which lets you test what your app does when the customer must do something outside your app first, such as accept new terms.
3. StoreKit testing in Xcode
This one needs no App Store Connect setup and no network. The overview page calls it "a local test environment that doesn't require a connection to App Store servers to test In-App Purchases". Apple says to use it "to test In-App Purchases before you configure them in App Store Connect or to test your code when a network connection isn't available." Apple's Xcode guide Setting up StoreKit testing in Xcode has the steps for creating the StoreKit configuration file. It is the fastest way to build and debug your purchase screens. Use the sandbox afterwards, because it goes through real App Store infrastructure.
4. TestFlight builds
Apple's page on testing subscriptions and In-App Purchases in TestFlight says "Apps downloaded from TestFlight will automatically operate in a sandbox environment." So your testers do not pay. The renewal speed is different from the sandbox default: "Each subscription is renewed daily, up to 6 times within a 1-week period, regardless of the subscription's duration." For a 1-month subscription started on 1 February, that means six renewals on 2 to 7 February, and auto-renewal is disabled on 8 February.
Two more lines from that page. To test billing retry, "you must test with a Sandbox Apple Account". And "You can only use a Sandbox Apple Account to test apps within your own developer account." For how to get testers into a build, see TestFlight external testers and the public link.
Google Play: license testers
I read Google's test your Google Play Billing integration page and its license testing help page on the same day. Google recommends "leveraging license testers and Play Billing Lab" during development.
You add testers in Play Console. The help page gives the path "Manage account > Play apps settings > Monetization settings > License testing". You pick an email list or create one, and each list "can contain up to 2,000 email addresses". Your own publishing account is always a license tester. The page also says "You must publish your one-time products and subscriptions before they can be tested."
License testers get three things.
- Sideloading. They can bypass the check that blocks the billing library for unsigned apps, so you can test debug builds. The package name must match the app in Google Play.
- Test payment methods. They avoid "charging the testers real money". The page names them: "Test instrument, always approves" and "Test instrument, always declines". There are also slow cards that approve or decline after a few minutes, and "Test card, approves then charges back".
- Fast subscriptions. Test subscriptions renew faster than real ones.
Test purchases "use the same app purchase flow used by actual purchases", and "Google Play indicates a test purchase by displaying a notice across the center of the purchase dialog."
Test tracks and who pays
The page says to use test tracks for pre-distribution checks. Its steps start with "Publish your app to a test track", and it warns that it can take a few hours before testers can get the app. Then comes the warning that matters for beta: "Users incur actual charges for their test track purchases unless the user is a license tester." So a normal tester on your closed test does pay real money. Add them as license testers first. Apps that are drafts or on the internal test track also have spend limits. The track setup is covered in adding testers to a Google Play closed test.
Renewal speed on Google Play
The page says "test subscriptions can renew a maximum of six times, not counting free trials and introductory periods". Its table lists these approximate times.
- 1 week: 5 minutes
- 1 month: 5 minutes
- 3 months: 10 minutes
- 6 months: 15 minutes
- 1 year: 30 minutes
A second table shortens other features. A free trial lasts 3 minutes, a grace period 5 minutes and account hold 10 minutes. Google's example for a failed payment is simple. You subscribe with "Test instrument, always approves", then in the Play app under Account and Subscriptions you change the payment method to "Test instrument, always declines". The subscription enters grace period, then account hold, and the user "should lose access" at that point. Change the card back to approve to test recovery.
One more rule saves a lot of confusion. For license testers, "a purchase will be refunded after 3 minutes if your app does not acknowledge the purchase". You also get an email. If your test purchases keep disappearing, this is the reason. Google also advises testing "using non-license tester accounts, either occasionally or when making large changes", so your app does not depend on test-only behavior such as short renewal times.
What to test
Both stores document the first half of this list. The rest is plain advice.
- Buy. A successful purchase unlocks the feature right away. A declined one unlocks nothing.
- Pending. Use Google's slow test cards. Restart the app and check you do not unlock early.
- Renew. Wait through a few of the fast renewals and check access continues.
- Expire. Let the last renewal pass. Access must switch off. Both stores cap test renewals, so you will get to see this.
- Cancel. Cancel in the store settings. The user should keep access until the paid period ends, then lose it.
- Upgrade and downgrade. Switch between plans and check which plan your app shows.
- Failed payment. Test grace period and account hold on Google. On Apple, use the sandbox settings, since TestFlight cannot do billing retry.
- Restore. Install on a second device or reinstall, sign in with the same store account, tap restore, and confirm access returns.
- Refund. Google has the "approves then charges back" card. The Apple pages read for this post do not describe simulating a refund, so test your refund handling on the server with sample events.
- Lock again. After every change, check the app both unlocks and locks the right features, including after a force quit and offline.
Server side: sandbox events are separate
If your server checks receipts or listens for store events, test events will reach it. Apple lists "Testing App Store Server Notifications" as a sandbox scenario: "Test that your server receives App Store Server Notifications and notifications for the sandbox environment." Google's real-time developer notifications reference has a test notification, "sent only through the Google Play Developer Console". It also says you must call the Google Play Developer API after a notification to get the full status, because notifications "tell you only that the purchase state changed".
The plain advice: never let a sandbox or test purchase grant production access or count as revenue. Check the environment on Apple events and the license-tester state on Google purchases, and route them to a test database or a log (look up the exact field in each store's server docs). Also make your handler safe to run twice, since Google recommends checking message IDs "to avoid processing duplicate notifications".
App Review
I read Apple's App Review Guidelines too. Guideline 3.1.1 says "If you want to unlock features or functionality within your app, (by way of example: subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use in-app purchase." Guideline 2.1(b) says "If you offer in-app purchases in your app, make sure they are complete, up-to-date, visible to the reviewer and functional." If a configured item cannot be found in your app, "explain the reason in your review notes." For other common causes of a first rejection, read first App Store rejection: common issues.
The checklist
- Build your purchase screen against a StoreKit configuration file in Xcode (Apple only).
- Create a Sandbox Apple Account and sign in with the Sandbox option, on a Developer Mode device.
- Add your testers' Google accounts as license testers, and publish your products first.
- Buy, decline, cancel, renew, expire, restore and upgrade on each store.
- Acknowledge every Google purchase, or it is refunded after 3 minutes for license testers.
- Test a failed payment with grace period and account hold.
- Send test notifications to your server and keep them out of production data.
- Run at least one pass with a normal, non-test Google account.
- Make sure every product is visible and works for the App Review team, or explain it in the review notes.
Where TestSwap fits
TestSwap is a free site where app makers review each other's apps: you test someone's app, they test yours. You can post web, iOS and Android apps, and link to wherever testers can open or install it, such as a TestFlight link or a Google Play testing link. Testers use their own phones, and that includes the purchase screen on a real store account. Remember the Google rule above: on a test track, a tester who is not a license tester pays real money. Ask testers to stop at the paywall, or add them as license testers first. TestFlight purchases run in the sandbox.
TestSwap does not handle purchases or set up sandbox accounts for you. Do that in App Store Connect and Play Console first. Then write a test task such as "open the paywall and tell me if the price and the restore button make sense". You can add a test login, which only signed-in testers can see. A review also has an optional private bug notes box that only the maker sees, which is a good place for "the unlock did not show after buying".
Try it
Set up one sandbox tester and one license tester today, and run the full list on a single product. Then post your app on TestSwap with a test task about the purchase flow. Reviewing someone else's app first is the quickest way to see how it works. Tell me what's missing or broken (@dizid on X).