Set Up Sandbox Testing

7 min

Before shipping your app to production, you'll want to test the complete purchase flow. Apple provides a Sandbox environment that simulates the App Store without charging real money. This section covers everything you need to make a successful test purchase.

Understanding the Sandbox Environment

The Sandbox is Apple's testing environment for in-app purchases. Key characteristics:

  • No real charges — All transactions are simulated
  • Accelerated renewals — Subscriptions renew faster for testing (see table below)
  • Separate from production — Sandbox purchases don't affect your real App Store data
  • Requires a Sandbox Apple ID — You cannot use your regular Apple ID

Sandbox Subscription Renewal Schedule

Subscriptions renew much faster in Sandbox to allow rapid testing:

Production DurationSandbox Duration
1 week3 minutes
1 month5 minutes
2 months10 minutes
3 months15 minutes
6 months30 minutes
1 year1 hour
📘 Note: Sandbox subscriptions automatically renew up to 6 times (for weekly/monthly) or 12 times (for longer durations), then they expire.

1. Create a Sandbox Tester Account

You need a dedicated Sandbox Apple ID to test purchases. This is different from your regular Apple ID.

  1. Go to App Store Connect.
  2. Click Users and Access in the top navigation.
  3. Select the Sandbox tab.
  4. Click the + button to add a new tester.
  5. Fill in the required information:
    • First Name / Last Name — Can be anything (e.g., "Test User")
    • Email — Must be a real email you can access, but it cannot be an existing Apple ID
    • Password — Create a password for this test account
    • Secret Question/Answer — For account recovery
    • Territory — Select a country (affects currency and pricing)
  6. Click Create.
⚠️ Important: The email you use cannot already be associated with an Apple ID. Consider using email aliases (e.g., yourname+sandbox1@gmail.com) if your email provider supports them.

2. Configure Your Test Device

To use the Sandbox account on your iOS device:

Option A: iOS 14 and Later (Recommended)

  1. Open Settings on your device.
  2. Navigate to App Store.
  3. Scroll down to the Sandbox Account section.
  4. Tap Sign In and enter your Sandbox tester credentials.

This keeps your regular Apple ID signed in while using the Sandbox account specifically for testing purchases.

Option B: iOS 13 and Earlier

  1. Open Settings > iTunes & App Store.
  2. Sign out of your regular Apple ID.
  3. When prompted during a purchase in your app, sign in with the Sandbox account.
📘 Tip: On iOS 14+, you can have both your regular Apple ID (for the App Store) and a Sandbox account (for testing) signed in simultaneously.

3. Make a Test Purchase

With your Sandbox account configured, you can now test the complete purchase flow:

  1. Build and run your app on a physical device (Sandbox doesn't work reliably on Simulator).
  2. Navigate to your paywall and select a product to purchase.
  3. Complete the purchase — You'll see "[Environment: Sandbox]" in the confirmation dialog.
  4. Verify in RevenueCat — Check the customer's profile in your RevenueCat dashboard to confirm the purchase was recorded.

What to Test

  • Initial purchase — Complete a subscription or one-time purchase
  • Restore purchases — Sign out and back in, then restore
  • Subscription renewal — Wait for automatic renewal (based on Sandbox timing)
  • Cancellation — Cancel via Settings and verify entitlement is removed
  • Upgrade/Downgrade — Switch between subscription tiers

4. Verify in RevenueCat Dashboard

After making a test purchase, verify it appears correctly in RevenueCat:

  1. Go to your RevenueCat dashboard.
  2. Navigate to Customers in the left sidebar.
  3. Search for your test user (by App User ID or email if you've set one).
  4. Verify:
    • The purchase appears in the transaction history
    • The correct entitlement is active
    • The product and offering information is accurate
📘 Sandbox vs Production: In the RevenueCat dashboard, Sandbox transactions are clearly labeled. You can filter to see only Sandbox or only Production transactions.

5. Testing with TestFlight (Optional)

For more realistic testing with external testers, you can use TestFlight:

  • Internal testers — Uses Sandbox environment automatically
  • External testers — Also uses Sandbox environment
  • TestFlight builds use Sandbox for purchases, never charging real money

This allows you to get feedback from beta testers without worrying about real transactions.

Common Sandbox Issues

IssueSolution
Purchase dialog doesn't appearEnsure you're on a physical device, not Simulator
"Cannot connect to App Store"Check network connection; try signing out and back in
Purchases not showing in RevenueCatVerify Bundle ID matches; check credentials are configured
Asked for regular Apple ID passwordEnsure Sandbox account is configured in Settings (iOS 14+)
"This Apple ID has not yet been used"Normal for first purchase; follow prompts to accept terms

Once you've successfully completed a test purchase and verified it in RevenueCat, you're ready to ship your app with confidence! 🚀