Step 1. Use the Button Generator to create Amazon Pay Sandbox buttons
To test your integration and to ensure that your buttons work correctly, Amazon Pay provides a Sandbox environment for testing. When you test your Amazon Pay buttons in Sandbox mode, you can simulate your buyer's experience, making as many purchases as needed without incurring any charges.
You need to set up a test account in Sandbox. For instructions on how to do that, see Set up an Amazon Pay Sandbox test account.
To use the Button Generator to create test buttons:
- Log on to Seller Central.
- Use the Marketplace Switcher dropdown box to select Amazon Pay Advanced (Sandbox View).
The Marketplace Switcher appears as a dropdown box in the center of the menu located at the top of the screen:
If your screen is minimized the Marketplace Switcher dropdown box is replaced with this icon:
Note: The buttons that you generate in Sandbox mode are specific to the sandbox test environment and cannot be used in a production environment.
- Go to the Express Integration Button Generator by clicking Integration and then Integration Central. The Button Generator is located in the Express Integration Button Generator section.
- Click Create, enter the applicable values, and then generate the HTML. An advantage to using the Button Generator is that it automatically generates the signature for your request. For parameter values that change, such as with a shopping cart, you would need to regenerate the signature for each request. For more information, see Custom integration.
Example: Using the Button Generator HTML
The parameters in the example below are described in the Custom integration section.
<script async src="https://static-na.payments-amazon.com/OffAmazonPayments/us/sandbox/js/Widgets.js"></script> <div data-ap-widget-type="expressPaymentButton" data-ap-signature="gv5L4ElwMvMWUs1Q2huderKpOF6Fv4ulkL55Jh5B3YE%5D" data-ap-seller-id="SELLER_ID" data-ap-access-key="ACCESS_KEY" data-ap-lwa-client-id="amzn1.application-oa2-client.yourclientID" data-ap-return-url="https://www.example.com/order_complete.html" data-ap-cancel-return-url="https://www.example.com/order_canceled_or_failed.html" data-ap-currency-code="USD" data-ap-amount="30.00" data-ap-note="Thank you for your order" data-ap-shipping-address-required="true" data-ap-payment-action="AuthorizeAndCapture" > </div>