Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

Amazon Pay for API-only

Add Amazon Pay to an existing API-only integration.

These instructions explain how to add Amazon Pay to your existing API-only integration. The API-only integration works the same way for all payment methods. If you haven't done this integration yet, refer to our API-only integration guide.

Before you begin

Before starting your Amazon Pay integration:

  1. Make sure that you have set up your back end implementation.
  2. Add Amazon Pay in your test Customer Area.
  3. Register with Amazon for an Amazon Pay account.
  4. Follow the steps on Amazon Pay's documentation to integrate with Amazon Pay.

Build your payment form for Amazon Pay

Show Amazon Pay as an available payment method in countries where Amazon Pay is supported. When the shopper selects Amazon Pay, they are presented with the payment form.

We provide logos for Amazon Pay which you can use on your payment form. For more information, refer to Downloading logos.

You can also submit a /paymentMethods request specifying:

  • countryCode: Country where Amazon Pay is supported. For example, NL.
  • amount.currency: You can only accept payments in the currency that you used when you registered with Amazon Pay. For example, EUR.

In the response, you receive paymentMethod.type: amazonpay.

/paymentMethods response
    "configuration": {
          "merchantId": "YOUR_AMAZON_PAY_MERCHANT_ID",
          "storeId": "YOUR_AMAZON_PAY_STORE_ID",
          "publicKeyId": "YOUR_AMAZON_PAY_PUBLIC_KEY_ID"
    "details": [
            "key": "amazonPayToken",
            "type": "text"
    "name": "Amazon Pay",
    "type": "amazonpay",

Make a payment

Refer to Amazon Pay's documentation to integrate with Amazon Pay.

  1. Start a checkout session and follow all subsequent steps as described in Amazon Pay’s documentation.
  2. Make a Get Checkout Session call to get the  amazonPayToken from the response.
  3. From your server, make a /payments request, providing:

    • paymentMethod.type: amazonpay
    • paymentMethod.amazonPayToken: This is the amazonPayToken that you obtained from the Get Checkout Session response.
curl \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
  "amount": {
    "currency": "EUR",
    "value": 1000
  "reference": "YOUR_ORDER_NUMBER",
  "paymentMethod": {
    "type": "amazonpay",
  "returnUrl": "",
  "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
# Set your X-API-KEY with the API key from the Customer Area.
adyen =
adyen.api_key = "YOUR_X-API-KEY"

response = adyen.checkout.payments({
  :amount => {
    :currency => "EUR",
    :value => 1000
  :reference => "YOUR_ORDER_NUMBER",
  :paymentMethod => {
    :type => "amazonpay",
    :amazonPayToken => "160583287597AMZN"
  :returnUrl => "",
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
// Set YOUR_X-API-KEY with the API key from the Customer Area.
// Change to Environment.LIVE and add the Live URL prefix when you're ready to accept live payments.
    Client client = new Client("YOUR_X-API-KEY", Environment.TEST);
    Checkout checkout = new Checkout(client);

    PaymentsRequest paymentsRequest = new PaymentsRequest();

    String merchantAccount = "YOUR_MERCHANT_ACCOUNT";

    Amount amount = new Amount();

    DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();



    PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area.
$client = new \Adyen\Client();
$service = new \Adyen\Service\Checkout($client);

$params = array(
  "amount" => array(
    "currency" => "EUR",
    "value" => 1000
  "reference" => "YOUR_ORDER_NUMBER",
  "paymentMethod" => array(
    "type" => "amazonpay",
    "amazonPayToken" => "160583287597AMZN"
  "returnUrl" => "",
  "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
$result = $service->payments($params);
#Set your X-API-KEY with the API key from the Customer Area.
adyen = Adyen.Adyen()
adyen.client.xapikey = 'YOUR_X-API-KEY'

result = adyen.checkout.payments({
   'amount': {
      'value': 1000,
      'currency': 'EUR'
   'reference': 'YOUR_ORDER_NUMBER',
   'paymentMethod': {
      'type': 'amazonpay',
      'amazonPayToken': '160583287597AMZN'
   'returnUrl': '',
   'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
// Set your X-API-KEY with the API key from the Customer Area.
var client = new Client ("YOUR_X-API-KEY", Environment.Test);
var checkout = new Checkout(client);

var amount = new Model.Checkout.Amount("EUR", 1000);
var details = new Model.Checkout.DefaultPaymentMethodDetails{
  Type = "amazonpay",
  AmazonPayToken = "160583287597AMZN"
var paymentRequest = new Adyen.Model.Checkout.PaymentRequest
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
  PaymentMethod = details

var paymentResponse = checkout.Payments(paymentsRequest);
const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
const config = new Config();
// Set your X-API-KEY with the API key from the Customer Area.
config.apiKey = '[API_KEY]';
config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
const client = new Client({ config });
const checkout = new CheckoutAPI(client);
    amount: { currency: "EUR", value: 1000 },
    paymentMethod: {
        type: 'amazonpay',
        amazonPayToken: '160583287597AMZN'
    reference: "YOUR_ORDER_NUMBER",
    merchantAccount: config.merchantAccount,
    returnUrl: "adyencheckout://"
}).then(res => res);

If the shopper used a card that requires 3D Secure authentication, you need to handle the corresponding 3D Secure flow.

The /payments response contains:

  • pspReference: Adyen's unique reference for the payment.
  • resultCode: Authorised
/payments response
   "pspReference": "881539337151149C",
   "resultCode": "Authorised"

Present the payment result

Use the resultCode that you received in the /payments or /payments/details response to present the payment result to your shopper.

The resultCode values you can receive for Amazon Pay are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment has been successful.
If you are using manual capture, you also need to capture the payment.
Cancelled The shopper cancelled the payment. Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.
Error There was an error when the payment was being processed. For more information, check the refusalReason field. Inform the shopper that there was an error processing their payment.
Refused The payment was refused. For more information, check the refusalReason field. Redirect the shopper back to the payment page and ask them to try the payment again using a different card. For more information on how to do this, check Amazon Pay's documentation.
Additional resultCode values are possible in case of the 3D Secure authentication flow. For more information, refer to Result codes.

Test and go live

To test Amazon Pay, you must follow the Amazon Pay testing guidelines.
You can check the status of an Amazon Pay test payment in your Customer Area > Transactions > Payments.

Before you can accept live Amazon Pay payments, you need to submit a request for Amazon Pay in your live Customer Area.

For more information, see Amazon Pay's test environment setup.

See also