Recurring
Amazon Pay supports recurring payments, and we streamline this process for you with Payment agreements.
Create the payment agreement
To create an Amazon Pay payment agreement, provide the following information when calling our payment agreements endpoint:
Data Field | Description |
|---|---|
|
|
| Full name of the consumer. |
| The country from which the consumer is shopping. |
authenticationSettings: REDIRECT
| Specify the URL to which the consumer should be redirected after completing the payment. This is required for the |
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.valueandamount.currencyof 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
POST /v1/payment-agreements
{
"paymentMethod": "AMAZON_PAY",
"consumer": {
"name": "John Smith",
"country": "US"
},
"authenticationSettings": [
{
"type": "REDIRECT",
"settings": {
"returnUrl": "https://www.webshop.com/order-results-page"
}
}
]
}{
"paymentMethod": "AMAZON_PAY",
"consumer": {
"name": "John Smith",
"country": "US"
},
"authenticationSettings": [
{
"type": "REDIRECT",
"settings": {
"returnUrl": "https://www.webshop.com/order-results-page"
}
}
],
"initialPaymentCharge": {
"amount": {
"value": 1000,
"currency": "USD"
}
}
}Response
You'll receive a response with the available authentication methods:
{
"id": "agr_kldVsUfaTdcCIpT8bBIWo",
"status": "AUTHENTICATION_PENDING",
"paymentMethod": "AMAZON_PAY",
"startDate": "2025-04-15T16:20:13.302Z",
"instrumentId": "instr_gQHo8F6xz3kOegCiaimw0",
"consumer": {
"name": "John Smith",
"country": "US"
},
"authenticationMethods": [
{
"details": {
"requestUrl": "https://redirection-target.ppro.com",
"requestMethod": "GET"
},
"type": "REDIRECT"
}
],
"history": [
{
"id": "ahist_mEs8D2aCSaoSgtex0gzWx",
"status": "AUTHENTICATION_PENDING",
"createdAt": "2025-04-15T16:20:13.951Z"
}
],
"createdAt": "2025-04-15T16:20:13.951Z",
"updatedAt": "2025-04-15T16:20:13.951Z"
}{
"id": "agr_gFCDp991mUCjWVypLEvfZ",
"status": "AUTHENTICATION_PENDING",
"paymentMethod": "AMAZON_PAY",
"instrumentId": "instr_hLOqf7bZvyo98kqT4Spio",
"consumer": {
"name": "John Smith",
"country": "US"
},
"authenticationMethods": [
{
"details": {
"requestUrl": "https://redirection-target.ppro.com",
"requestMethod": "GET"
},
"type": "REDIRECT"
}
],
"history": [
{
"id": "ahist_8WvsAUIuUR9lYCajdkPsv",
"status": "AUTHENTICATION_PENDING",
"createdAt": "2025-04-10T13:31:39.222Z"
}
],
"initialPaymentChargeId": "charge_QQu5vY0HQYKIvsa7OO6Hx",
"createdAt": "2025-04-10T13:31:39.222Z",
"updatedAt": "2025-04-10T13:31:39.222Z"
}Pick the desired authentication method
APP_NOTIFICATION
- Ask your consumer for the required identifier needed to initiate the push notification, often a consumer identifier like a phone, email address or tax identification.
- The consumer will receive a push notification to complete the payment process.
Handling the result
APP_NOTIFICATION
- The payment charge will remain in the AUTHENTICATION_PENDING state until the consumer confirms the payment.
- Webhooks are sent to inform you of the agreement and/or payment outcome.
- Alternatively, check the agreement and/or payment status and use the
Statusthat you received to display the outcome to the consumer.
GET /v1/payment-agreements/{agreement-id}
GET [/v1/payment-charges/{paymentChargeId}]([https://developerhub.ppro.com/global-api/reference/getpaymentcharge](https://developerhub.ppro.com/global-api/reference/getpaymentcharge). - Store the Payment Agreement ID for subsequent payments.
Create a recurring payment
To initiate a subsequent recurring payment, send a request against an active agreement using our payment agreements API.
Request
POST /v1/payment-agreements/{agreement-id}/payment-charges
{
"amount": {
"value": 1000,
"currency": "USD"
}
}Response
{
"id": "charge_WLnk5R2RKwzAinkEoAMm0",
"paymentMethod": "AMAZON_PAY",
"currency": "USD",
"country": "US",
"instrumentId": "instr_86xMmxSjrVafelQgtAXxr",
"status": "CAPTURED",
"consumer": {
"name": "John Smith",
"country": "US"
},
"authorizations": [
{
"id": "authz_nx4VgDiibOTPoYgXxQbrL",
"amount": 1000,
"status": "AUTHORIZED",
"createdAt": "2025-04-10T16:28:40.150Z",
"updatedAt": "2025-04-10T16:28:40.150Z"
}
],
"captures": [
{
"id": "capture_aJh1kGwLdwK8S3aFCeWFV",
"amount": 1000,
"status": "CAPTURED",
"createdAt": "2025-04-10T16:28:40.150Z",
"updatedAt": "2025-04-10T16:28:40.150Z"
}
],
"refunds": [],
"discards": [],
"voids": [],
"createdAt": "2025-04-10T16:28:38.716Z",
"updatedAt": "2025-04-10T16:28:40.150Z"
}Updated 2 months ago