The following is an overview of the typical process of using Amazon Pay on your website. The steps are grouped into two parts: enabling a purchase and processing payment.
Enabling a purchase with Amazon Pay and Login with Amazon
- Add the Amazon Pay button or the Login with Amazon button on the page where the buyer starts the checkout flow (for example, a create an account page, your shopping cart, or the product detail page). The Login with Amazon button enables a buyer to authenticate with Amazon; the Amazon Pay button can be used for authentication and payment.
- After the buyer has successfully authenticated, show the Amazon AddressBook widget on the page where you collect the shipping address and the Amazon Wallet widget on the page where you collect payment information.
- Get the shipping address by calling the GetOrderReferenceDetails operation to compute taxes and shipping costs. Show the shipping and tax amount to the buyer.
- (Optional) Show the read-only version of the AddressBook and Wallet widgets on your order review page.
- Provide the order total and other optional information to Amazon by calling the SetOrderReferenceDetails operation.
- After the buyer has placed the order, confirm the order to Amazon by calling the ConfirmOrderReference operation.
- If you are using the Amazon Pay button with a guest checkout option, get the full shipping address from Amazon by calling the GetOrderReferenceDetails operation.
- Thank the buyer for placing the order. Send an order confirmation email to the buyer.
Note: Amazon also sends a "Payment initiated" email to the buyer when you confirm the order reference to Amazon. This informs the buyer that they have authorized payment for a purchase made using Amazon Pay. This email is not related to the Authorize request that you submit at the time of the order or later.
The following image shows how to enable a purchase using Amazon Pay and Login with Amazon:
The following image shows how to enable a purchase using Amazon Pay:
- Request Amazon to authorise the buyer's payment by calling the Authorize operation.
- Listen for the Authorize Instant Payment Notification (IPN) for the processing status of your authorisation request. Note: Amazon provides both a synchronous and an asynchronous mode for the Authorize operation. With the synchronous mode, you receive an immediate processing status of Open or Declined. In the asynchronous mode, you first receive a Pending status for the authorisation object. After the asynchronous mode processing is complete, Amazon will notify you of the final processing status via an Instant Payment Notification (IPN). If you are using an asynchronous mode, you should not make the buyer wait for order confirmation on your site until you receive the final processing status from Amazon. You should show the order confirmation page to the buyer immediately after confirming the order to Amazon.
- Ship the order and capture payment by calling the Capture operation.
- Listen to the Capture IPN for the processing status of your capture request. Amazon sends a "Charge notification" email to the buyer when the capture is successfully processed.
- After you have captured the desired amount for the order, mark the Order Reference object as Closed by calling the CloseOrderReference operation. Amazon uses this information to indicate to the buyer that the payment for this order is complete.
- If you need to issue a refund, you can do so by calling the Refund operation.
- Listen to the Refund IPN for the processing status of your refund request. Amazon sends a "Refund notification" email to the buyer when the refund is successfully processed.
The following image shows how to process a payment: