Amazon Pay
Amazon Pay is a service offered to Amazon customers that allows shoppers to experience the convenience and security of Amazon wherever they shop. While shopping on Amazon, consumers can pay using any debit cards or credit cards. When customers choose Amazon Pay as their payment option, PPRO directs them to Amazon’s site. There, they can complete their purchase using the shipping and payment details saved in their Amazon account. Once the payment is processed, the customer will be redirected to a result page.
Payment Method Properties
Markets | US |
Processing currencies | USD |
Consumer currencies | USD |
Settlement currencies | USD |
Minimum payment amount | 0.5 USD |
Maximum payment amount | 20,000.00 USD (can vary by customer) |
Recurring payments | Yes |
Separate captures | Yes |
Refund | Full - Partial - Multiple Partial |
Refund validity | 6 months |
Chargeback | Yes |
Sandbox availability | Amazon Pay sandbox |
Make an Amazon Pay Payment
One-time Amazon Pay payments follow our standard redirect payment flow, so you can add Amazon Pay to your integration in seconds.
To make an Amazon Pay payment, you'll need to provide the following data at minimum when calling our /v1/payment-charges API:
Data Field | Required | Description |
---|---|---|
paymentMethod | Y | AMAZON_PAY |
amount.value | Y | The amount to be paid in the smallest units of the currency used. |
amount.currency | Y | USD |
consumer.name | Y | Full name of the consumer |
consumer.country | Y | The country where the consumer is shopping |
authenticationSettings: REDIRECT settings.returnUrl | Y | Add the URL where the consumer should be redirected after they complete the payment. |
merchantPaymentChargeReference | Y | (Recommended) add your internal reference ID for the payment in this field. |
webhooksUrl | If you want to override your pre-configured webhooks endpoint, you can receive webhooks for this payment here. |
Request
POST /v1/payment-charges
{
"paymentMethod": "AMAZON_PAY",
"amount": {
"value": 1000,
"currency": "USD"
},
"consumer": {
"name": "John Smith",
"country": "US"
},
"authenticationSettings": [
{
"type": "REDIRECT",
"settings": {
"returnUrl": "https://www.your-merchant-success-page.com/"
}
}
],
"merchantPaymentChargeReference": "YOURPAYMENTREFERENCEHERE",
}
Response
You'll receive one of our standard payment charge responses (see potential responses in the API Reference)
{
"id": "charge_X0O78tadFHrZCbGhkycPk",
"status": "AUTHENTICATION_PENDING",
// ...
"authenticationMethods": [
{
"type": "REDIRECT",
"details": {
"requestUrl": "https://redirection-target.com",
"requestMethod": "GET"
}
}
]
}
Consumer Authentication
Amazon Pay requires a consumer authentication step before the payment is authorized and captured.
In your response to your charge creation request, you will receive the authenticationMethods
list with an authentication method of standard type REDIRECT
Redirect the consumer to the page url specified in the requestUrl
field. The consumer will be taken to Amazon's pages to log in to their account and approve the payment.
The payment charge will remain in the AUTHENTICATION_PENDING
state until the consumer confirms the payment in their app. After this, the charge will transition to the CAPTURED
state.
Handling the Payment Result
The consumer will be redirected to the authenticationMethods.settings.returnUrl provided in the initial payment charge creation request, depending on whether the authorization is a success, a failure, or if the user cancelled/aborted the flow.
If the consumer fails to authenticate the payment within the timeout window, the charge will transition to the DISCARDED state.
You can receive webhooks for all changes to the payment charge state and use these to build business logic such as delivering the goods when the charge is CAPTURED.
Recurring Payments
Amazon Pay offers recurring payment support - we simplify this flow for you with our Payment Agreements API.
Create the Payment Agreement
To set up a recurring agreement for Amazon Pay, you'll need to provide at minimum the following data when calling our /v1/payment-agreements API:
Data Field | Required | Description |
---|---|---|
paymentMethod | Y | AMAZON_PAY |
consumer.name | Y | Full name of the consumer. |
consumer.country | Y | The country from which the consumer is shopping. |
startDate | Y | The date-time from which the recurring agreement is valid. |
You can also include the initialPaymentCharge
object in this agreement creation call to immediately initiate the first payment without making a separate call. If you include this object, you'll need to specify:
- The exact
amount.value
andamount.currency
of the first payment
If you don't include an initialPaymentCharge
during agreement creation, you'll need to make a separate API call to /v1/payment-agreements/{agreement_id}/payment-charges to create the first charge.
Request
{
"paymentMethod": "AMAZON_PAY",
"startDate": "2023-03-26T20:24:27Z",
"consumer": {
"name": "John Smith",
"country": "US"
},
"authenticationSettings": [
{
"type": "REDIRECT",
"settings": {
"returnUrl": "https://www.your-merchant-success-page.com/"
}
}
],
"initialPaymentCharge": {
"amount": {
"value": 1000,
"currency": "USD",
"merchantPaymentChargeReference": "YOURREFERENCEHERE"
}
}
}
Response
You'll receive one of our standard payment agreement responses (see responses in the API Reference)
{
"id": "agrmt_X0O78tadFHrZCbGhkycPk",
"status": "AUTHENTICATION_PENDING",
"startDate": "2023-03-26T20:24:27Z",
"initialPaymentChargeId": "charge_X0O78tadFHrZCasfhkycPk",
"authenticationMethods": [
{
"type": "REDIRECT",
"details": {
"requestUrl": "https://some-redirection-page.com",
"requestMethod": "GET"
}
}
]
}
Redirect the consumer to url specified in requestUrl
. The consumer will be taken to Amazon to log into their account and approve the payment agreement.
Once the consumer has confirmed the recurring agreement creation, the agreement status will transition to ACTIVE, and subsequent payments can be made without consumer interaction.
Make Subsequent Recurring Charges
Once you've set up a payment agreement, it's simple to create subsequent charges against it. In your /v1/payment-agreements/{agreement-id}/payment-charges/ request, you just need to include:
{
"amount": {
"amount": 9000,
"currency": "USD"
},
"paymentChargeMerchantReference": "external-identifier", //optional
"autoCapture": true
}
You will receive webhooks for all charges created under a Payment Agreement the same way you would for individual charges, and can respond accordingly.
Updated 4 months ago