This section provides task-oriented descriptions of how to create Amazon Simple Pay buttons, and how to use and implement Amazon Flexible Payments Service (FPS) actions. For a description of Amazon FPS actions that are appropriate to use with Amazon Simple Pay, see the API Reference.
The following table explains how you can find the information you need in this guide.
| If you want to... | Relevant Sections |
|---|---|
|
Learn the basics of Amazon Simple Pay | |
| Learn how to create a signed button of any type | Creating Button Forms Dynamically |
| Modify the sample code to create a standard, donation, marketplace, or subscription button | Understanding the Amazon Simple Pay Button Samples |
|
Use the response and transaction content returned by your buttons and by Amazon Payments | |
|
Validate responses for the Return URL and Instant Payment Notification | |
|
Understand subscription button particulars | |
|
Use Amazon Flexible Payments Service actions available with Amazon Simple Pay | |
|
Use Instant Payment Notification (IPN) |
Using Instant Payment Notification, How to Verify the IPN Signature and Verifying the IPN |
|
Settle or refund money | |
|
Work with signatures |
Creating Button Forms Dynamically, How to Generate a Signature, and About Signature Version 2. |
|
Get sample code for signing buttons, verifying return data, and generating a button request |
Topics
The Amazon Simple Pay Getting Started Guide describes accessing the Amazon Payments business account sandbox and provides an overview of its features. For more information about the sandbox, go to https://payments-sandbox.amazon.com.
With the Amazon Payments developer sandbox you can test the more advanced features of your button applications.
![]() | Note |
|---|---|
You cannot port the code for the buttons you create in the sandbox to the production environment. When you are satisfied that your button works correctly in the sandbox, make careful notes and recreate it in the production environment. For best results, test the button again in the production environment. |
The Amazon Payments developer sandbox enables you to try the following:
Use credit cards and bank accounts in your test transactions without any prior verification and without incurring charges.
Simulate certain errors, such as temporary declines, that could appear in a real transaction. This simulation can help you test the error handling capabilities in your application.
You can test the following user experiences in the sandbox:
View changes to the test account balance from test button operations you generate
View the transaction activity updates from test button operations you generate
The Amazon Simple Pay Getting Started Guide has instructions on testing basic button features using the Amazon Payments business sandbox.
You can easily test your signature creation code using any of the examples in Amazon Simple Pay Button Input Reference. Each example contains a signature calculated from the values in the rest of the example.
To test a signature
Copy any one of the HTML examples in Amazon Simple Pay Button Input Reference.
Remove the enclosing FORM element from your copy.
Remove the Signature field and the HTML comments from your copy.
Create a signature using the instructions in How to Generate a Signature
Compare the output from your signature creation code with the value you removed from the HTML example. They should be identical.
When using the Amazon Payments developer sandbox, you can use a test account for payment simulations.
To create a test account balance
Log in to payments-sandbox.amazon.com with your username and password.
On the Your Account tab, click Add a Bank Account in the Enhance your account area.
Provide following test information
Routing#: 123456789
Account#: 11122233344
Driver license: 123; WA
Add the bank account
On the Deposit tab, use the deposit form to add money to your account.
Click the Your Account tab. Your balance will be displayed.
In 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 Condition | Error Forced | Simulation |
|---|---|---|
| The amount includes a decimal value between .60 and .69 | Temporary Decline | Occurs when a downstream process is not available. |
| The amount includes a decimal value between .70 and .89. | Payment Error | Insufficient 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. |