Amazon Pay is a service that lets your customers use the payment methods already associated with their Amazon account to pay for goods and services. To perform a payment, users can use any of the payment methods registered in their Amazon account.
The necessary operations to integrate Amazon Pay are:
- Sign in on Amazon Pay SellerCentral
- Configure Amazon Pay
- Generate a MWS Token
- Use Amazon Pay credentials to set up your Axerve account, first in sandbox then in production
- Integrate Amazon Pay button in the list of the available payment methods on your website, to agree with Amazon
- Execute the payment:
- Execute the encryption of the data
- redirect the user to the payment page
- Read of the result and decrypt of the response
- If you’re using Amazon Pay with the shipping address selection mode, you have to read the shipping and billing address by calling
1. Sign in on Amazon Pay SellerCentral
To use Amazon Pay you must register and follow the instructions.
2. Configure Amazon Pay
To communicate with Axerve Ecommerce Solutions sandbox and production environments, you need to access to this page https://sellercentral-europe.amazon.com/external-payments/amazon-pay/integration-central/lwa and follow the following instructions:
- From the Seller Central home page, in production or sandbox view, select “Integration - Integration Central” from the navigation bar on top-left side.
- From Integration Central page, scroll down to the “Manage client ID/store ID(s)” section, and click “View client ID/store ID(s)”.
- If you have an existing Client or Store ID registered yet, review the configuration of the selected store. You can click on the “Edit” link on the right side to edit information.
- If you click on the “Edit” button, you can edit all the details of the client.
- From STEP 3, if you click on the “Create new configuration” link on top, you will be able to create a new client configuration providing all the relevant information.
|Allowed Return URLs||
|Allowed Return URLs Mobile||
|Allowed Return URLs||
|Allowed Return URLs Mobile||
3. Generate MWS Token
The MWS Token is needed to delegate Axerve Ecommerce Solutions to operate on your behalf.
To generate the MWS Token:
- From your seller account dashboard, click on the Settings menu and then User Permissions.
- On this page you’ll see all MWS developer permissions. Click on Authorise a Developer button to generate a new one:
- In the next window, set this data:
- Once you’ve saved the developer info in Amazon, you’ll see the MWS token in the table “Amazon MWS Developer Permissions” on the previous page (see the second step).
4. Axerve Ecommerce Solutions Configuration
In Axerve backoffice, insert Amazon Pay credentials received when signed in:
The Show Address Widget checkbox allows the selection of the address from Amazon Pay during the payment by showing the widget; This setting can be disabled if the merchant sells non-shippable items (e.g. non physical goods).
Amazon Pay payment flow with the Payment Page
To use Amazon Pay:
- start the payment process by calling
Encryptwith mandatory data
- redirect the user to the payment page, passing the
CryptDecryptStringreceived in response.
- Axerve Ecommerce Solutions will call the merchant’ Positive (or Negative) Response URL to acknowledge the status of the transaction; Axerve Ecommerce Solutions will also call the merchant’ Server-to-Server URL. The merchant has to decrypt the parameters and read the transaction status.
- To retrieve the buyer’s address, you have to call
Encrypt example is available in our API section.
If you want to use the
paymentType tag for this method, the value to use is
AMAZONPAY. See the section How to redirect the customer to a payment method to learn how to use the
With Amazon Pay the
ShopTransactionIdmust be unique.
ShopTransactionId can contains only the following characters:
- lowercase a-z
- uppercase A-Z
- numbers 0-9
- dash (-)
- underscore (_)
Maximum: 32 characters
2. Redirect the user
Axerve Ecommerce Solutions will answer to your request with an
EncryptResponse, that will contain a field
For test environment, redirect the user to
For production environment, the url is
More info on this can be found in Using Axerve payment page.
Once the buyer is redirected, and if he is not authenticated, Amazon will show a login form:
Once the buyer is logged, he will see a page where he can choose the shipping address from Amazon saved addresses:
Then he can choose a credit card amongst the saved amazon credit cards.
At the end, Axerve Ecommerce Solutions will perform an authorization request on the selected credit card, and the buyer will be redirected to the merchant website (positive or negative response URL).
3. Read response from Axerve Ecommerce Solutions
After the payment has been acknowledged, Axerve Ecommerce Solutions will
- redirect the user to the url specified in URL for positive (or negative) response
- asynchronously call the URL Server to Server with the transaction data.
This process is described in the docs for the payment page, step 3.
The payload of this call are two query parameters, the first being the shopLogin and the second being a encrypted string.
4. Get the buyer’ shipping and billing address
The relevant data is contained in the
OrderReferenceDetails tag; here we’ll report an example of the response relevant data:
<callReadTrxS2SResponse xmlns="https://ecomms2s.sella.it/"> <callReadTrxS2SResult> <GestPayS2S xmlns=""> ... <OrderReferenceDetails> <OrderReferenceStatus> <State>Draft</State> </OrderReferenceStatus> <OrderLanguage>it-IT</OrderLanguage> <Destination> <DestinationType>Physical</DestinationType> <PhysicalDestination> <StateOrRegion>BI</StateOrRegion> <Phone>33333333</Phone> <City>BIELLA</City> <CountryCode>IT</CountryCode> <PostalCode>13900</PostalCode> <Name>Marco Rossi</Name> <AddressLine1>via Gobe 15</AddressLine1> </PhysicalDestination> </Destination> <ExpirationTimestamp>2018-05-13T07:24:02.186Z</ExpirationTimestamp> <IdList/> <SellerOrderAttributes> <SellerOrderId>4354395804398dkfjlhsdfk</SellerOrderId> </SellerOrderAttributes> <OrderTotal> <CurrencyCode>EUR</CurrencyCode> <Amount>10.00</Amount> </OrderTotal> <Buyer> <Name>Ale</Name> <Email>firstname.lastname@example.org</Email> </Buyer> <ReleaseEnvironment>Sandbox</ReleaseEnvironment> <AmazonOrderReferenceId>S02-0319513-4657042</AmazonOrderReferenceId> <CreationTimestamp>2017-11-14T07:24:02.186Z</CreationTimestamp> <BillingAddress> <PhysicalAddress> <City>Neunkirchen</City> <CountryCode>DE</CountryCode> <PostalCode>66538</PostalCode> <Name>Liam Barker</Name> <AddressLine1/> <AddressLine2>Meininger Strasse 58</AddressLine2> </PhysicalAddress> <AddressType>Physical</AddressType> </BillingAddress> <RequestPaymentAuthorization>false</RequestPaymentAuthorization> </OrderReferenceDetails> ... </GestPayS2S> </callReadTrxS2SResult> </callReadTrxS2SResponse>
Amazon Pay via S2S call
If you wish to implement your custom payment page by loading AmazonPay widgets, you can directly call Axerve Ecommerce Solutions
callPagamS2S (the webservice that allows to pay via server-to-server) with this data:
||the Amazon Order Reference Id field received by Amazon|
An example call can be found in the API.
Recurring payments via Amazon Pay
With Amazon Pay you can set up recurrent payments. To do this, in the Encrypt method you can use the option
<Encrypt> <shopLogin>9000001</shopLogin> <uicCode>242</uicCode> <amount>100</amount> <shopTransactionId>34az85ord20</shopTransactionId> <paymentTypes> <paymentType>AMAZONPAY</paymentType> </paymentTypes> <!-- use this tag for recurring payments --> <amazonPayBillingAgreementDescription> paynowandrecurring </amazonPayBillingAgreementDescription> ... </Encrypt>
Possible values for
- Empty - no token is returned.
- ©paynowandrecurring` - a payment is performed instantly and a token is generated for subsequent payments.
onlyrecurring- only a token is returned.
An example can be found in the API docs.
To use the token for repeated payments, see