- Get Started
- Guides
- Integrations
- References
- API Reference
- Basic Payment
- Forex
- Authentication
- Card Account
- Apple Pay
- Virtual Account
- Bank Account
- Token Account
- Customer
- Billing Address
- Merchant Billing Address
- Shipping Address
- Merchant Shipping Address
- Merchant
- Corporate
- Recipient
- Marketplace & Cart
- Airline
- Lodging
- Passenger
- Tokenization
- Recurring Migration
- 3D Secure
- Custom Parameters
- Async Payments
- Webhook notifications
- Job
- Risk
- Point of Sale
- Response Parameters
- Card On File
- Chargeback
- Result Codes
- Payment Methods
- Transaction Flows
- Regression Testing
- Data Retention Policy
- API Reference
- Support
- Imprint
Amazon Pay
Introduction
Amazon Pay can be utilized as a checkout option on a payment page as well as a direct checkout option on the cart page. Loading the Amazon Pay button via COPY+PAY payment widget is just like loading any other brand, i.e. in step 2, AMAZONPAY must be specified as a brand. Once the Amazon Pay button will be used by the consumer, the Amazon Pay payment sheet will appear on the device.
Amazon Pay on the payment page
Loading the Amazon Pay button via COPY+PAY payment widget is just like loading any other brand, i.e. in step 2, AmazonPAY must be specified as a brand.
See an example below.
Amazon Pay on the cart page
Sometimes you might want to display the Amazon Pay button early on the payment workflow where you do not yet have a checkout ID. Usually, the shopper can decide whether to continue with the normal checkout, or to immediately pay with Amazon Pay.
It is possible to display the Amazon Button first and create a checkout ID later. In step 2:
- Use
paymentWidgets.js
without a checkout ID<script src="https://vr-pay-ecommerce.vr-pay-ecommerce.docs.oppwa.com/v1/paymentWidgets.js"></script>
- Define a callback function in
wpwlOptions.createCheckout
to create a checkout
Example:
var wpwlOptions = {
inlineFlow : ["AMAZONPAY"],
amazonpay:{
merchantId : "A2NLZLCXNBPPNB",
ledgerCurrency : "USD",
sandbox: "true",
checkoutLanguage: "en_US",
productType: "PayAndShip",
placement: "Cart",
buttonColor: "Gold"
},
createCheckout: function(additionalData) {
return $.post("https://your.server",{
"authentication.entityId": "ff80818176f1e2930176f1f9d6b10004",
"authentication.password": "ETN6Eh7Y8n",
"authentication.userId": "ff80818176f1a1bf0176f1ae9ef40005",
"amount": "2.53",
"currency": "USD",
"paymentType": "DB",
"testMode": "EXTERNAL",
"cart.items[0].name":"Battery Power Pack",
"cart.items[0].price":"10.12",
"cart.items[0].quantity":"1",
"cart.items[0].tax":"0",
"cart.items[0].totalAmount":"10.12",
"cart.items[0].totalTaxAmount":"0",
"customer.email":"john@doe.com",
"customer.givenName":"John",
"customer.surname":"Doe",
"shipping.street1":"Ship Street 1",
"shipping.street2":"Ship Street 2",
"shipping.city":"Ship City",
"shipping.state":"Ship State",
"shipping.country":"US",
"shipping.postcode":"30092",
"shipping.customer.email":"ship@email.com",
"shipping.givenName":"John",
"shipping.surname":"Doe",
"customer.ip":"127.0.0.1",
"merchantTransactionId":"fastCheckoutMerTxId",
"merchantInvoiceId":"fastCheckoutMerInvId"
}).then(function(response) {
return response.id;
});
}
};
Amazon Pay Options
As with other options, you can modify the Amazon Pay behavior by using wpwlOptions.amazonPay
. The full reference of all available options is shown below in this page.
References
The following table lists all available Amazon Pay options that you can use with wpwlOptions.amazonPay
.
Parameter | Description | Examples |
---|---|---|
merchantId | Merchant ID as registered in Amazon Seller Central application | merchantId: "A2NLZLCXNBPPNB" |
ledgerCurrency | Ledger currency provided during registration for the givenmerchant identifier. Any one of USD, EUR, GBP, JPY. | ledgerCurrency: "USD" |
sandbox | If true, Sets button to Sandbox environment | sandbox: "true" |
checkoutLanguage | Language used to render the button and text on Amazon Pay hosted pages. Any one of NONE, en_US, en_GB, de_DE, fr_FR, it_IT, es_ES, ja_JP | checkoutLanguage: "en_US" |
productType | This indicates the Product type selected for checkout. Supported values - 'PayAndShip', 'PayOnly' and 'SignIn' | productType: "PayAndShip" |
placement | This indicates the Placement of the Amazon Pay button. Supported values: ‘Home’, ‘Product’, ‘Cart’, ‘Checkout’, and 'Other'. | emailRequired: "true" |
buttonColor | Color of the Amazon Pay button. Supported values: 'Gold', 'LightGray', 'DarkGray' | buttonColor: "LightGray" |