Recurring Payments
Copy page
Copy page as Markdown for LLMs
Open in ChatGPT
Ask questions about this page
Open in Claude
Ask questions about this page
Recurring payments enable you to automatically charge customers over a set period whether daily, weekly, monthly, or on an unscheduled basis without requiring customer interaction for each transaction. This feature is ideal for subscription services, membership fees, and other recurring billing scenarios.
How Recurring Payments Work
The recurring payment process follows these steps:
Initial Payment Setup
Customer completes their first successful payment using any of our integration types.
Token Generation
Amazon Payment Services generates and returns secure tokens, merchant securely stores the tokens for future recurring transactions.
Automated Charging
Merchant uses stored tokens to process subsequent payments automatically without customer interaction.
Prerequisites
Before implementing recurring payments, ensure you have:
-
Initial Payment Integration
Implement one of our payment integration methods: -
Security Credentials
Retrieve your integration credentials from the merchant dashboard:- Access Code - Authentication token for API requests
- Merchant Identifier - Your unique merchant ID
- SHA Request/Response - Keys for signature calculation
Integration Steps
Process Initial Payment
Complete Initial Transaction
The customer must complete a successful initial payment using any of our integration methods to generate the required tokens.
After the successful initial payment, extract and securely store these critical parameters from the response:
Parameter | Description | Usage |
---|---|---|
token_name | Unique identifier for the customer's payment method | Required for all recurring transactions |
agreement_id | Agreement identifier linking the customer to recurring billing | Required for all recurring transactions |
Process Recurring Payments
Process Recurring Payments
Use the appropriate endpoint based on your environment:
https://sbpaymentservices.PayFort.com/FortAPI/paymentApi
Request Sample
Send a POST request:
{
"command": "PURCHASE",
"access_code": "s4lwuuoY5upZlZY5D6dr",
"merchant_identifier": "WeVJHPYm",
"merchant_reference": "REC-12345-2024",
"amount": "11050",
"currency": "AED",
"language": "en",
"customer_email": "customer@example.com",
"eci": "RECURRING",
"token_name": "abcdefgh12345678",
"agreement_id": "123",
"signature": "calculated_signature_here"
}
Make sure merchant reference value is unique value per request.
Before sending the transaction amount
, multiply it by the currency's decimal factor based on its ISO 3-letter code, e.g. AED (2 decimals): 500 AED should be sent in the request as 50000.
For currencies with 3 decimal places, VISA requires amounts to be rounded to end in zero, E.g 3.475 becomes 3480.
Handle Response
Response Sample
Process the response to determine transaction status:
{
"amount": "110500",
"response_code": "14000",
"card_number": "111111******8902",
"signature": "calculated_response_signature",
"merchant_identifier": "WeVJHPYm",
"access_code": "s4lwuuoY5upZlZY5D6dr",
"payment_option": "VISA",
"expiry_date": "2512",
"language": "en",
"eci": "RECURRING",
"agreement_id": "123",
"fort_id": "11111111111",
"command": "PURCHASE",
"response_message": "Success",
"merchant_reference": "REC-12345-2024",
"authorization_code": "162582",
"customer_email": "customer@example.com",
For complete parameter specifications and additional options, refer to our API Reference.
Check transaction status
To check the transaction status, check the Check a Transaction Status section.
Handling the response
If you have a webhook, check the webhook section to understand how we send transaction responses to your system.
Go-live
Test your integration using one of our testing cards.
Make sure to visit our go-live checklist to go live with your integration.
Support
Need assistance with recurring payments implementation? Contact our technical support team at merchantsupport-ps@amazon.com.