Amazon Instant Access Integration Guide

Test Setup

Every integration partner must sign up for a developer account on the Amazon developer portal. After providing information such as web service URL for Link and Purchase calls, the developer portal requires the vendor to run the integration suite of tests before moving on to production. These tests can be run for either Subscriptions or One-Time Purchases, depending on the type of product to be sold. Running the tests from the developer portal ensures the system will be tested with properly formatted messages and will help resolve any networking and security issues. The developer cannot continue to production without first passing all tests.

  1. Navigate to and create a new developer account.
  2. Click the Apps & Services tab and click the “PC/Mac Instant Access” sub tab.
  3. Enter your endpoint information and you are ready to test the Link and Purchase API calls

Test Cases

The following test scenarios will be run to verify that the integration has been completed appropriately:

Test CaseDescriptionExpected behavior
LinkLink request with a valid user identifier(s).Positive test. The “response” should be OK and a valid user identifier returned.
Link DuplicateLink request with the same valid user identifier(s).Your system should return exactly the same “userId” as the previous test for the same user identifier
Link badEnter an invalid user identifierThe “response” field is “FAIL_ACCOUNT_INVALID”. The “userId” field can be left out or be populated with an empty value.
FulfillValid userId and productID are sentThe item is fulfilled and an ‘OK’ is sent in the response.
Fulfill - DuplicateAn identical fulfill message is sent as in the previous exampleThe “purchaseToken” is recognized and item is not fulfilled a second time since it was fulfilled previously. Response should still be ‘OK’ and NOT an error code.
Fulfill - Invalid userAn invalid userId is passed in the fulfill messageReturn a FAIL_INVALID_USER (error code) or FAIL_OTHER
Fulfill – Invalid ProductIdAn invalid productId is passed in the fulfill messageReturn a FAIL_OTHER in the response code.
RevokeA revoke for a previously fulfilled message is sentThe item is revoked and an ‘OK’ is sent in the response.
Revoke DuplicateA duplicate revoke message is sentDon’t revoke the item again and send a ‘OK’ in the response code.
Subscription CreationValid Create SubscriptionActionThe subscription is fulfilled and ‘OK’ is sent in the response
Subscription DeactivationValid Deactivate SubscriptionActionAccess to the subscription is revoked and ‘OK’ is sent in the response
Subscription - duplicateDuplicate message for action that already happenedNo action necessary. ‘OK’ is sent in the response
Subscription – invalid userAn invalid userId is passed in the SubscriptionAction messageReturn ‘FAIL_INVALID_USER’
Subscription – invalid productIdAn invalid productId is passed in the SubscriptionAction messageReturn ‘FAIL_OTHER’

Additional Testing Note

Amazon does not provide a testing stage outside of the tools provided in the developer portal and our live production stage. Amazon can still index suppress and remove buyability from any products that a developer wishes to test, but there is no strict development environment to test products in.

You Might Also Like