These docs are for v1.0.1. Click to read the latest docs for v2.1.0.

Amazon Pay

120

paymentmethod=AZP

Payment ProcessIntegration
Authorization:heavy-check-mark:Payment Page*:heavy-check-mark:
Deferred Settlement:heavy-check-mark:Split Mode:heavy-check-mark:
Refund:heavy-check-mark:Mobile SDK:x:
Cancel:heavy-check-mark:
Alias:x:

Description

Amazon Pay is a service that lets you use the payment methods already associated with your Amazon account to make payments for goods, services, and donations on third-party websites, in apps, and using Alexa. To make a payment, you can use any of the payment methods on file in your Amazon account.

Payment Method provider website

Introduction

Amazon Pay consists of two steps. The first one is to log in with Amazon (LWA) and the second one is the Payment & Address selection through the widgets. The user first logs in with his Amazon Account and then selects the shipping address and payment instrument. Please bear in mind that if checkout process requires address data, as of now the merchant has to make this selection on his own page.

Payment Setup

To use Amazon pay you need to authorize Datatrans to make delegate calls. To find out on how to do so refer to your Amazon Contact or Amazon Pay Documentation. To authorize Datatrans you will need the following to values:
Name of the Developer: Datatrans
Developer-ID: 401165616950

Once you have authorized Datatrans, we need the following values to finalize the setup:

  • Amazon Merchant ID
  • Amazon Client ID
  • Amazon MWS Access Token
  • Amazon Region

Send those values to your Datatrans point of contact.

Alias

Not yet supported

Resources

Amazon Pay Developer Portal
Amazon Pay Sandbox Account 

📘

API Reference

For a more detailed description of the parameters please check the API Reference

Web payment flow

 1 
[Not supported by viewer]
Customer clicks Pay
Customer clicks Pay
Merchant Website
Merchant Website
Merchant Server
Merchant Server
Payment Page loaded from Datatrans
Payment Page loaded from Datatrans
Amazon
Amazon
 3 
[Not supported by viewer]
Customer selects Amazon Pay
[Not supported by viewer]
 2 
[Not supported by viewer]
Redirects to Amazon
Redirects to Amazon
User logs in to Amazon
User logs in to Amazon
Amazon redirects to Datatrans
Amazon redirects to Datatrans
Datatrans displays the payment widget
Datatrans displays the payment widget
User selects payment widget
User selects payment widget
9.1
[Not supported by viewer]
10
[Not supported by viewer]
Receives Result and Invokes merchant's
POST URL (Webhook)
[Not supported by viewer]
Receives Result 
Receives Result 
 11 
[Not supported by viewer]
Redirects customer back to merchant
Redirects customer back to merchant
Customer gets redirected to merchant page
Customer gets redirected to merchant page
Authorization
Authorization
 4 
[Not supported by viewer]
 5 
[Not supported by viewer]
 6 
[Not supported by viewer]
 7 
[Not supported by viewer]
 8 
[Not supported by viewer]
 9 
[Not supported by viewer]

Server to Server API calls

After a transactionId was received by completing the payment flow on the web, the following server to server API calls can be used to do other actions.

Authorization

Not yet supported

Settlement

Request

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_processor.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<paymentService version="2">
  <body merchantId="1100004624">
    <transaction refno="212323123">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>190815102259728740</uppTransactionId>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1100004624' status='accepted'>
        <transaction refno='212323123' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>190815102259728740</uppTransactionId>
                <reqtype>COA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>settlement succeeded</responseMessage>
            </response>
        </transaction>
    </body>
</paymentService>

Credit

Request

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_processor.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<paymentService version="2">
  <body merchantId="1100004624">
    <transaction refno="212323123">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>190815154315757912</uppTransactionId>
        <transtype>06</transtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1100004624' status='accepted'>
        <transaction refno='212323123' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>190815154315757912</uppTransactionId>
                <transtype>06</transtype>
                <reqtype>COA</reqtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>credit succeeded</responseMessage>
                <uppTransactionId>190815154406698015</uppTransactionId>
                <authorizationCode>407548017</authorizationCode>
                <acqAuthorizationCode>0</acqAuthorizationCode>
            </response>
        </transaction>
    </body>
</paymentService>

Cancel

Request

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_processor.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<paymentService version="2">
  <body merchantId="1100004624">
    <transaction refno="212323123">
      <request>
        <amount>100</amount>
        <currency>CHF</currency>
        <uppTransactionId>190815155053558680</uppTransactionId>
        <reqtype>DOA</reqtype>
      </request>
    </transaction>
  </body>
</paymentService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<paymentService version='2'>
    <body merchantId='1100004624' status='accepted'>
        <transaction refno='212323123' trxStatus='response'>
            <request>
                <amount>100</amount>
                <currency>CHF</currency>
                <uppTransactionId>190815155053558680</uppTransactionId>
                <reqtype>DOA</reqtype>
                <transtype>05</transtype>
            </request>
            <response>
                <responseCode>01</responseCode>
                <responseMessage>cancellation succeeded</responseMessage>
            </response>
        </transaction>
    </body>
</paymentService>

Status

Request

curl -v -X POST https://api.sandbox.datatrans.com/upp/jsp/XML_status.jsp \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d @- << EOF
<?xml version="1.0" encoding="UTF-8" ?>
<statusService version="5">
  <body merchantId="1100004624">
    <transaction>
      <request>
        <uppTransactionId>190815155053558680</uppTransactionId>
        <reqtype>STX</reqtype>
      </request>
    </transaction>
  </body>
</statusService>
EOF

Response

<?xml version='1.0' encoding='UTF-8'?>
<statusService version='5'>
    <body merchantId='1100004624' status='accepted'>
        <transaction trxStatus='response'>
            <request>
                <uppTransactionId>190815155053558680</uppTransactionId>
                <reqtype>STX</reqtype>
            </request>
            <response itemNr='1'>
                <responseCode>7</responseCode>
                <responseMessage>MOA Cancel</responseMessage>
                <refno>123456789</refno>
                <amount>1000</amount>
                <currency>CHF</currency>
                <authorizationCode>107198718</authorizationCode>
                <pmethod>AZP</pmethod>
                <uppTransactionId>190815155053558680</uppTransactionId>
                <maskedCC></maskedCC>
                <aliasCC></aliasCC>
                <expm></expm>
                <expy></expy>
                <trxDate>20190815</trxDate>
                <trxTime>155053</trxTime>
                <trtype>05</trtype>
            </response>
        </transaction>
    </body>
</statusService>