Amazon Pay
Payment Process | Integration | ||
---|---|---|---|
Authorization | ✔️ | Payment Page* | ✔️ |
Deferred Settlement | ✔️ | Split Mode | ✔️ |
Refund | ✔️ | Mobile SDK | ❌ |
Cancel | ✔️ | ||
Alias | ❌ |
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
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>
Updated over 2 years ago