Integrate Hosted Checkout
Copy page
Copy page as Markdown for LLMs
Open in ChatGPT
Ask questions about this page
Open in Claude
Ask questions about this page
This guide walks you through implementing Hosted Checkout integration with Amazon Payment Services.
Prerequisites
Before starting your integration, ensure you have:
-
Test Account Access
Contact merchantsupport-ps@amazon.com to obtain access to our test environment for testing and development. -
Security Credentials
Retrieve your integration credentials from the merchant dashboard:- Log into your Amazon Payment Services test account
- Navigate to Merchant Management → Security Settings
- Save the following values:
- Access Code - Authentication token for API requests
- Merchant Identifier - Your unique merchant ID
- SHA Request/Response - Keys for signature calculation
Integration Steps
Payment Request
Create Payment Request
Send a POST request to the hosted checkout endpoint with the required parameters. The request must be sent from the frontend as an HTTPS POST form.
Use the appropriate endpoint based on your environment:
https://sbcheckout.payfort.com/FortAPI/paymentPage
Never embed the hosted checkout page within an iframe. This will cause integration failures.
Sample Request
<form method="post" action="https://sbcheckout.payfort.com/FortAPI/paymentPage"
id="paymentForm" name="paymentForm">
<input type="hidden" name="command" value="PURCHASE">
<input type="hidden" name="access_code" value="s4lwuuoY5upZlZY5D6dr">
<input type="hidden" name="merchant_identifier" value="WeVJHPYm">
<input type="hidden" name="merchant_reference" value="ORD-12345-2024">
<input type="hidden" name="amount" value="2000">
<input type="hidden" name="currency" value="AED">
<input type="hidden" name="language" value="en">
<input type="hidden" name="customer_email" value="customer@example.com">
<input type="hidden" name="return_url" value="https://yoursite.com/payment-result">
<input type="hidden" name="signature" value="calculated_signature_here">
<input type="submit" value="Pay Now" class="pay-button">
</form>
Make sure merchant reference value is unique value per request.
Refer to our Signature Calculation Guide for detailed implementation instructions and code examples.
Payment Response
Handle Payment Response
After payment processing, customers are redirected back to your return_url
with the transaction results.
Sample Response
{
"command": "PURCHASE",
"access_code": "s4lwuuoY5upZlZY5D6dr",
"merchant_identifier": "WeVJHPYm",
"merchant_reference": "ORD-12345-2024",
"amount": "2000",
"currency": "AED",
"language": "en",
"customer_email": "customer@example.com",
"fort_id": "149295435400084008",
"response_message": "Success",
"response_code": "14000",
"status": "14",
"signature": "calculated_response_signature"
}
For detailed parameter specifications, refer to our Hosted Checkout API Reference.
If you don't specify payment_option
, the hosted checkout automatically displays relevant local payment methods based on the transaction currency through the multi-select feature.
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 help with your integration? Contact our technical support team at merchantsupport-ps@amazon.com.