In order to ensure that IAP (in-app purchases) are functioning properly, it is important to test both real product information and server-to-server transactions in the sandbox environment. By testing with real product information, you can verify that the purchase process is working as intended and that users are able to access the content they have purchased.
Server-to-server transactions provide a more realistic way to test in-app purchases, as they simulate the way that actual payments would be processed. In addition, testing server-to-server transactions can help to identify any potential issues with communication or compatibility between different systems.
By thoroughly testing IAP implementation in Google and Apple in the sandbox environment, you can ensure a smooth and successful launch for your app.
Overview of Apple Sandbox Environment
The Apple sandbox environment is a development tool that allows developers to test IAP using real product information from App Store Connect. This environment is used when signing in to the App Store is completed using a Sandbox Apple ID. By using the sandbox environment, any potential issues that might arise during the actual in-app purchase process can be caught and resolved ahead of time. In addition, this environment provides an opportunity to test different scenarios and fine-tune the user experience before release. As such, the Apple sandbox environment is an essential tool for any developer working on implementing IAPs.
Use Sandbox Apple ID to Sign In to the App Store
If you want to test in-app purchases in your development-signed app, you’ll need to use a Sandbox Apple ID. To create ID, just follow the step we are mentioning below:
- Open the App Store on your iOS or iPadOS device and go to your account page.
- Click on “Create New Apple ID” and follow the instructions to set up a new account. Make sure to use a different email address than your non-Sandbox Apple ID.
- Once you’ve created the account, sign in with it on your device. You can find the account under Settings > App Store.
- In macOS, open App Store > Preferences and click the Sign In button. Enter your Sandbox Apple ID credentials and click Sign In.
- Now you’re ready to test in-app purchases in your app! Keep in mind that any purchases made with a Sandbox Apple ID are for testing purposes only and will not be charged to your real account.
Make an In-App Purchase
When you’re ready to start testing in-app purchases, sign in to the App Store using your Sandbox Apple ID. This will allow you to access the test environment. You should see the text [Environment: Sandbox] appear, indicating that you’re connected to the right place. If you don’t see this text, you’re using the production environment and won’t be able to test purchases. After signing-in, you can begin making test purchases and evaluating how they work in your app.
Test In-App Purchases for All Regions
With a Sandbox Apple ID, you can test IAPs from any country or region without having to create another separate account. Simply change the setting under “App Store Country” when logged into App Store Connect and all of your tests will be available for sale across different languages too!
To make sure your storefront is activated after changing the region in App Store Connect, sign out of any sandbox Apple ID accounts on devices and then login back. The Tester should be able to see their appropriate app purchases under “In-App Region” when they’re signed into this specific account again or else you might have some confused customers!
Remove the Purchase History for a Sandbox Apple ID
Clearing your test purchase history in App Store Connect is a great way to make sure you don’t have any pesky files tying up space on an Apple device. The process of clearing the purchase history for Sandbox Apple IDs can take a while, but once it’s complete you’ll have empty transaction history and receipts. You’re also eligible to receive introductory offers on any subscriptions that were previously subscribed to!
Add Users for IAP Testing on Android
To get started, go to Google Play > All apps > Setup and Licence Testing. From there you can add the Gmail address(es) of each user who will be testing your app in order for them to join as testers on the testing stage!
Test In-app Purchase With Your Test Account on Android Device
You can test your subscriptions and their renewals by using the payment methods that are available for licence testers. Renewal periods: Test Subscriptions will renew more quickly than actual ones, with a maximum of 6 tries per period. You have control over how long each subscription lasts; you may want it only every week or month instead? The default option is one day but if desired then users could select longer durations such as 3 weeks, 1 Month, etc which would make sure they get feedback on what works best before committing fully!
Payment methods are available for licence testers. You can use it for testing your subscriptions and their renewals. The renewal period of test subscriptions is quicker and can be done a maximum of 6 times. By default, 1 renewal in a month or a week lasts for 5 minutes.
- Open the Google Play Store from an Android phone. The Android’s main account and tester’s Google Play should have the same Gmail address.
- Then, follow “Settings”> “About”. You will see a title named “Play Store version”, click on it 5 times continuously till you get the screen “you are now a developer”. The step is optional depending upon the Android device.
- Now, go to “Settings” > “General” and then activate “Internal App Sharing”.
- Accept the invitation sent by the developer by opening the link through Internal testing > Testers.
- Download the app using the download link in Google Play.
- Now, test IAP in the app.
Subscription Process and Duration for Devs/Testers:
The Android and iOS platforms both have a subscription testing facility that allows developers and testers to select a duration (e.g. 1 week, 1 month, 3 months, 1 year) without having to wait for the actual length of the plan. This is done in a Sandbox environment to make development and testing easier. The subscription testing facility is a great way to test the functionality of an app before it is released to the public. It also allows developers to test new features or updates in a controlled environment.
Subscription Duration in Android:
Production Subscription Period | Test Subscription Renewal |
1 Year | 30 Minutes |
6 Months | 15 Minutes |
3 Months | 10 Minutes |
1 Month | 5 Minutes |
1 Week | 5 Minutes |
Subscription Duration in iOS:
App Store Subscription/Trial Duration | Sandbox Duration |
1 Year | 1 Hour |
6 Months | 30 Minutes |
3 Months | 15 Minutes |
2 Months | 10 Minutes |
1 Month | 5 Minutes |
1 Week | 3 Minutes |
3 Days | 2 Minutes |
Auto-Renewal Process:
In both Android and iOS, auto-renewal of the subscription takes place as per the duration mentioned above. For testing purposes/on a sandbox environment, Auto-renewal of the subscription takes place a maximum of 6 times. After the 6th time renewal, the subscription will get cancelled automatically. In order to test if auto-renewal is working fine, it is suggested to check in the developer account-> manage your products-> select the product-> go to “In-App Subscriptions” and check the “Subscription Status”.
If it is showing as “Cancelled”, that means auto-renewal has taken place successfully. In case, it is still showing as “Active”, please try to wait for 24 hours and check again. If after trying for 24 hours also, the status does not change to “Cancelled”, then please contact customer support for further assistance.
When Tester purchases an Auto-Renewal subscription with a subscription validity of 1 month, they will receive an email notification after 5 minutes confirming the successful renewal of their subscription, in the case of Android. This process will be repeated 6 times until the subscription expires. If Tester does not cancel their subscription before the end of the plan, their subscription will get automatically renewed. Testers can cancel their subscription at any time by following the necessary steps. Once Tester has cancelled their subscription, they will no longer be charged for that subscription and will not have access to the corresponding service.
To get more information about our products and services, visit and checkout our expertise page.
Parag is working as Team Lead at SubcoDevs. With over 4.5 years of experience in the IT industry, he assures bug-free development and high-quality products. He has done B. Tech., and holds deep knowledge of mobile and web development, and several testing tools including Selenium, JMeter, etc
Parag Sisodia