Developer Console

IAP Testing Overview

Amazon provides several tools and services to help you test your IAP implementation. The following sections provide information about these tools and a suggested workflow for testing your app.

Test Tools

Use the following tools for testing IAP functionality.

App Tester

Use App Tester to test your IAP API code before you submit your app to the Amazon Appstore.

  • App Tester runs in sandbox mode to perform unit testing of the IAP API method calls in your app
  • App Tester intercepts the IAP API requests sent from your app.
  • App Tester generates the API responses, based on a JSON data file that you provide.

Receipt Verification Service

Receipt Verification Service (RVS) validates the purchase receipts that you upload to your app server. RVS provides a sandbox environment and a production environment.

  • Use the RVS Sandbox Environment along with the App Tester testing tool to verify your receipts in sandbox mode.
  • Use the RVS Production Environment to verify your receipts in production mode and for Live App Testing.

Live App Testing

Use Live App Testing (LAT) to beta test your app with a select group of users. The intent is to give you confidence that your app operates correctly in the production environment.

  • Before starting a LAT, make sure you have properly implemented the Appstore SDK. For instructions, see Integrate the Android IAP API.
  • Testers have access to the full suite of Amazon services in the Amazon production environment
  • Testers will not be charged for any purchases that they make.
  • To test the duration of a subscription in less time, you can set up accelerated subscriptions.
  • In a LAT, you can reset in-app entitlements and subscriptions for your testers as needed.

IAP Test Modes

In app development, the app progresses through the following testing modes.

Sandbox Mode

Before you publish your app to the Developer Portal, the app runs in sandbox mode.

  • Sandbox Mode is not automatically detected with the Appstore SDK. You need to set your app in debug mode to run sandbox mode. See App Tester User Guide.
  • The IAP API v2.0 detects this mode automatically. API requests are not sent to the Appstore; they are redirected locally to App Tester.
  • You use App Tester to perform unit testing of the IAP API method calls in your app.
  • You can also test receipt verification using the RVS sandbox environment.

Live App Testing (LAT) mode

Prior to publishing an app, you can run the app in the production environment, but with a restricted set of testers. For more details, see Live App Testing in the Test Tools section above.

  • Testers will not be charged for any purchases that they make.
  • You use the RVS Production environment to verify receipts.

Production Mode

After you publish the app, the app runs in production mode.

  • The IAP API requests from the app will interact with the live Amazon Appstore.
  • You use the RVS Production environment to verify receipts.
  • Any In-app purchases (that are not free) are charged to the user.

Suggested Testing Process

Use the Amazon test tools and services in the following order to ensure that IAP is functioning correctly in your app before you publish the app to the Amazon Appstore:

  1. If required, uninstall SDK Tester (the test tool for IAP v1.0). SDK Tester and App Tester are incompatible when installed on the same device.

  2. Download and install the App Tester. See Installing and Configuring the App Tester.

  3. Use App Tester to perform unit testing of the IAP API method calls in your app. See the App Tester User Guide and Designing and Executing Test Cases for IAP.

  4. Set up the Receipt Verification Service (RVS) sandbox environment. See Receipt Verification Service (RVS).

  5. Configure your server to use the RVS sandbox environment. Verify the receipts generated by your app via App Tester. See Receipt Verification Service (RVS).

  6. Submit your in-app items to the Amazon Appstore for publication. See Create and submit IAP items].

  7. Select a group of users to participate in beta-testing your app in a production environment through Live App Testing. See Live App Testing.

  8. After your app is published, verify purchase receipts from your app using the RVS production environment. See Receipt Verification Service (RVS).

Last updated: Jun 06, 2023