Amazon Flexible Payments Service
Basic Quick Start (API Version 2010-08-28)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

Testing Your Applications for Free

Amazon FPS provides a sandbox environment that you use to test your applications. In the sandbox you can try out your applications without incurring charges or making purchases. We recommend that you test all of your requests in the sandbox before exposing them on your web site.

The Amazon FPS Sandbox enables you to:

  • Make Amazon FPS web service and Co-Branded service requests

  • Make Pay requests to transfer money

  • Use credit cards and bank accounts in your test transactions without any prior verification and without incurring charges

  • Simulate errors

    You can simulate certain errors that could appear in a real transaction. This simulation can help you test the error handling capabilities in your application.

For information about signing up for an Amazon FPS Sandbox account, go to the Amazon Flexible Payments Service Getting Started Guide. For more information about the Amazon FPS Sandbox, go to https://payments-sandbox.amazon.com. You must be logged in to view this page.

Sandbox Endpoints

Sandbox endpoints are different from Amazon FPS production endpoints. The Amazon FPS Sandbox endpoints are as follows:

Sandbox Use

You can test the following user experiences in the sandbox:

  • Registering for a business or personal account via a Co-Branded service request

  • Depositing funds into a test account's Amazon Payments account using a Pay request

  • Checking the account balance for a test account

  • Checking the activity for a test account

  • Tracking the cumulative effect of a series of Pay calls. While you can't adjust the time/date of the call, you can check that the values change as expected in your test account(s) with each transaction.

Simulating a Mobile Client

You can easily test the CBUI pipeline that your customers experience when they use their mobile devices. Amazon FPS uses the value of the client browser's HTTP_USER_AGENT to route the request along the appropriate pipeline. If you set your development environment to report a value for HTTP_USER_AGENT reported by a mobile device, Amazon FPS will use invoke the mobile pipeline.

For example, the following value simulates an Apple iPhone 3G version 2.1, with Safari 3.1.1:

Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_1 like Mac OS X; en-us) 
AppleWebKit/525.18.1 (KHTML, like Gecko)
Version/3.1.1.1 Mobile/5F136 Safari/525.20

Error Simulation

The sandbox accepts any random number as a credit card and token ID in Pay and Reserve requests. However, you can simulate a variety of declines that occur by using specific token IDs and amounts in the Amazon FPS Sandbox, as shown in the following tables.

The following table shows the errors you can simulate by entering specific SenderTokenId values.

ErrorSenderTokenId Value
Closed account

Z1LGRXR4HMDZBSFKXELA32KZASGWD8IHMHZ

CK4DETR784LDLD1GMFW4P3WT8VTGX

Email address not verified

E3FR7BARJV3PB631PMKV74PGKCJLBHI1Q1K

MQN7BJ2JJICPDKN3N1CJIKFZ8D7NN

Suspended account

H216UECZ8ZM1G8G4QA3V7RKF8JDFZ9SI3SJA

FSGUKBBNDHX1NVM8GUQRZNRNAHER

With the Amazon Payments developer sandbox, you can force an error by placing certain decimal values in the amount. The following table details the values.

Force ConditionError ForcedSimulation
The amount includes a decimal value between .60 and .69Temporary DeclineOccurs when a downstream process is not available.
The amount includes a decimal value between .70 and .89.Payment ErrorInsufficient funds

Note

If you want your test transaction to be a success, avoid using amount values which contain decimal values between .60 and .89. For example, the following amounts all force errors: 0.61, 123.6522, 1.79. The following amounts do not force an error: 0.16, 123.56, 8.97.