New Customer
Before using Amazon Pay you need to register at https://pay.amazon.de/signup Â
An alternative is also the signup for Amazon based on country, the steps are the;
- follow the above URL
- choose the country needed, based on the country flag found at the top-right:
When logged in in the Amazon seller central, you should have 2 accounts, that you can toggle between:
- Sandbox
- Production
The needed data for the onboarding are the following:
Amazon Cv.2 | Comment |
---|---|
Country Code* | Code of the Amazon market used (DE=EU, UK, JP and US) |
MerchantID | taken from Amazon seller central |
MWS Authorization Token | Example: amzn.mws.a4a8d852-3d9e-f441-0674-d042baa3cf6452 |
merchant Store Name | Name of the store |
StoreID | Example: amzn1.application-oa2-client.7150fff45acf49f8acd519fa485142a2 |
- If you have more than one market this information needs to be given to us for each market needed.
Please follow the guide below to create the API keys necessary.
Important: If you don´t see the option to create the API keys, you need to create a store first and then create the API keys.
Under the "Integration central" at the bottom you can do this using the link found there:
MWS Authorization Token
One of the important piece of data needed is the MWS Authorization token from Amazon which gives Computop permission to conduct transactions for your shop.
The second step is generating a MWS Auth Token. This is the data needed:
German :
- Developer name: CT_Sandbox_EU (same for production)
- Developer account number: 0143-6461-8727
Guide
When logged in to the seller central of Amazon, go to the top right-hand side of the page and click on Settings and choose "User Permissions":
This leads you to the "User permissions" page which show you the current users, here you can add an external developer to your account, here please click on "Visit manage your apps":
This leads you to a new page were you can see developers that have access, here you can add, delete and renew permissions. Please click on "Authorise new developer":
On the new page you need to add the developer name and ID given above. Fill in the information and click on "Next":
The last page is were you need to agree to the terms and conditions of granting a developer access to the account.
When clicking on "Next", you are shown a success page with information:
With the last click on "Next", you are led back to the original "User Permission" were the developer is now shown.
Here you can now click on "View" and access the "MWS Authorization token" and can also copy it.
Then submit the received MWS Authorisation Token on a secure way to Computop Helpdesk for configuration.
Guide to create API keys
In order to create new API keys, choose one of your accounts, either Production or Sandbox on top of the page, process needs to be done for both accounts. Amazon description is found here.
Please click left-hand side on the symbol with the 3 horizontal lines.Â
On the menu that appears, please go to "Integration" and choose "Integration central".Â
On the Integration central, go to the section "Create API Keys" and click on the button there.Â
A Pop-up window appears where you need to choose "Generate API Credentials", here you also need to give the keys a unique name:Â
The newly created keys are immediately visible on the "Integration central". There you choose the option to "See Details":Â
When looking at the details, you can see the data or download the data in JSON format:Â
JSON example:
Important:Â
- This data is needed for your onboarding and needs to be sent in a secure way to Computop Helpdesk for configuration.
- The same process needs to be repeated for the second account depending on which one you did first
Notify URL
Customers will need to also to store/configure the following Paygate notify URL.
URL:Â https://www.computop-paygate.com/amazonpaycomplete.aspx
Go to the menu on the te top left-hand side:
On the menu that appears, please go to "Integration" and choose "MWD Access Key":
At the bottom of the page you can see the option for IPN (Instant Payment notification":
After clicking on the blue link another pages open with integration settings:Â
Here please click on the "Edit"-button:Â
- Here please add the fowllowing URL to the integrator URL and click on the "Update"-button
https://www.computop-paygate.com/amazonAPAV2Notify.aspx
     2. The merchant can also save his own notify URL if he so wishes. Computop will ask for the NotifyURL on the request as well.
Important: Please make sure to use the Notifies sent via server to server and not only rely on the SuccessURLs/FailureURLs.
Steps within the process
The basic payment process with Amazon consists of several steps:
Step | Description | |
---|---|---|
1 | Display Amazon Pay button | The Amazon Pay button must be properly implemented on the page of the webshop and must be called for each payment process. You can find below the example code snippet. |
2 | Initialize payment via amazonAPA.aspx (Server to Server) | You will call Paygate endpoint https://www.computop-paygate.com/amazonapa.aspx according to description below. Paygate will respond with parameters that you must use to update the Amazon Pay button. |
3 | Redirect to Amazon | After updating the Amazon Pay button, customer will be redirected to Amazon. |
4 | Redirect back to your webshop | After confirming customer's preferred payment instrument, and optionally shipping address on the Amazon Pay-hosted page, customer is redirected back to your webshop order review page. |
5 | Finalize the purchase | After customer confirms the order, you will redirect the client to Amazon URL received in response from Paygate. |
6 | Redirect back to your webshop | After customer finalizes the payment at Amazon side, customer will be redirected back to your defined URL based on result of payment (URLSuccess / URLFailure). |
7 | Notify from Computop is sent via S2S | Please make sure to setup and use the notifyURL to get final confirmation on the requests success/failure |
Important
Please make sure that you plan in the 2 main tasks for merchants:
- Add the new Amazon Cv.2 Button (Step 1)
- On the redirect back to the shop (Step 3) were changes may take place, merchant needs to make sure that address (if applicable) and payment method, can be changed. Also the possibility of changes to the amount should be pass with a call to the Paygate
Integrate Amazon Pay button
The following example code shows how to integrate the Amazon Pay button in your webshop.
When customer submits this button, you will call Paygate to obtain additional data, which are required for updating the Amazon Pay button.var amazonPayButton = amazon.Pay.renderButton('#AmazonPayButton', {
merchantId: 'xxxxx',
publicKeyId: 'SANDBOX-xxxxxxxxxx',
ledgerCurrency: 'EUR',
checkoutLanguage: 'en_GB',
productType: 'PayAndShip',
placement: 'Cart',
buttonColor: 'Gold'
});
amazonPayButton.onClick(function(){
const [payload, signature, publicKeyId] = your_call_to_paygate();
amazonPayButton.initCheckout({
createCheckoutSessionConfig: {
payloadJSON: payload,
signature: signature,
publicKeyId: publicKeyId
}
});
});
In this case the following parameters must be present within the Button:
Parameter | Description | Value |
---|---|---|
merchantId | SellerId issued by Amazon | |
ledgerCurrency | Your ledger currency. For EU/UK accounts a different presentment currency can be used on the auth/capture | Permissible values:
|
placement | Placement of the button | Permissible values: Cart |
buttonColor | The parameter buttonColor defines the color of the button | Permissible values: Gold, LightGray, DarkGray |
productType | The parameter productType defines if the transaction is done for physical or digital goods. PayAndShip is default. | Permissible values:
|
checkoutLanguage | The parameter checkoutLanguage is optionally used for defining the language of the checkout process. This is helpful especially within a multilingual shop environment. Without submitting the parameter Language Amazon automatically uses the most suitable language for checkout. | Permissible values:
|
estimatedOrderAmount | This is the estimated checkout order amount, it does not have to match the final order amount if the buyer updates their order after starting checkout. Amazon Pay will use this value to assess transaction risk and prevent buyers from selecting payment methods that can't be used to process the order Use updateButtonInfo() to update the estimatedOrderAmount if the estimated order amount changes; for example, if the buyer removes or adds something to their cart. This function may update the button UI and the new estimatedOrderAmount will be used to determine whether the order meets the installment provider’s minimum order price threshold. Example of the function <script type="text/javascript" charset="utf-8"> | Example: { "amount": "50.99", "currencyCode":"USD"}, |
Further information can be found in the documentation from Amazon Pay.
Review Page
When using the complete checkout of Amazon Pay v2, the review page is to be used on the side of the merchant to allow:
- change of address
- change of payment method
A change of either one or both is possible.
Review Page Example
Computop Data
This is the Computop data that is delivered to the merchant for the review page
- mid
- PayID
- XID
- TransID
- Status=REQUEST
- Code=0
- AmountAuth=0
- AmountCap=0
- AmountCred=0
- bdaddrstreet2
- bdaddrcity
- bdaddrcountrycode
- bdaddrname
- bdphonenumber
- bdaddrzip
- AddrStreet
- AddrCity
- AddrCountryCode
- addrname
- phonenumber
- AddrZip
- addrstate
- amazonmerchantid
- rtf=onetime
- amazonstatus=Open
- amazonpayredirecturl
- amazoncheckoutsessionid
- amazonpaymentdescriptor
JS example
This is an JS Example that merchants can use to accommodate changes if necessary
let session = document.getElementById('sessionId').value; let link = document.getElementById('redirectUrl').value; let buyNow = document.getElementById('buy-now'); buyNow.addEventListener('click', () => { window.location = link; }) amazon.Pay.bindChangeAction('#change-paymethod', { amazonCheckoutSessionId: session, changeAction: 'changePayment' }); amazon.Pay.bindChangeAction('#change-shipping', { amazonCheckoutSessionId: session, changeAction: 'changeAddress' });
The Amazon description can be found here:
Update Amount:
If the amount changes during the Review Process, then following amount update request need to be sent to Paygate.
Request URL:
https://www.computop-paygate.com/amazonAPA.aspx |
Â
Request Parameter: Amount=999& Currency=EUR& CountryCode=EU& eventToken=UpdateAuthorizeAmount& PayId=be30427125a94801a4c3757f4ea2111 Response Parameter: mid=ct_teamtest PayID=be30427125a94801a4c3757f4ea21111 TransID=n/a Status=AUTHORIZE_REQUEST Code=0 XID=d1708fcca09945e6b3e195156848b2f8 AmountAuth=0 AmountCap=0 AmountCred=0
Process flow chart
- Version with possibly changes done to delivery address, payment instrument or amount.
- Valid for OTP (One time payments) or for Recurring setup (RTF=I)
Recurring Subsequent
Subsequent actions
Capture a payment
Credit a payment
Reverse an order
Paygate interface
Format Description a alphabetical as alphabetical with special characters n numeric an alphanumeric ans alphanumeric with special characters ns numeric with special characters bool boolean expression (true or false) 3 fixed length with 3 digits/characters ..3 variable length with maximum 3 digits/characters enum enumeration of allowed values dttm ISODateTime (YYYY-MM-DDThh:mm:ss) Abbreviation Description CND condition M mandatory O optional C conditional Notice: Please note that the names of parameters can be returned in upper or lower case.Definitions
Data formats
Abbreviations
Comment If a parameter is mandatory, then it must be present If a parameter is optional, then it can be present, but it is not required If a parameter is conditional, then there is a conditional rule which specifies whether it is mandatory or optional
Initialize Amazon Pay interface
In order to initialize a payment with Amazon Pay, please use the following URL:
https://www.computop-paygate.com/amazonAPA.aspx |
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Encrypted parameters for initializing an Amazon Pay payment
Address Restriction
It is possible for the merchants to specify restrictions whether addresses that match restrictions configuration should or should not be restricted.
To send address restriction use parameter addressRestriction – json base64 encoded. Please find the overview of data elements and the schema below:
Schema
{ "type": "Allowed", "restrictions": { "US":{ "statesOrRegions": ["WA"], "zipCodes": ["95050", "93405"] }, "GB":{ "zipCodes": ["72046", "72047"] }, "IN":{ "statesOrRegions": ["AP"] }, "JP": {} } } The above data should be base64 encoded and passed in the parameter addressRestriction= eyAidHlwZSI6ICJBbGxvd2VkIiwgInJlc3RyaWN0aW9ucyI6IHsgIlVTIjoKCnsgInN0YXRlc09yUmVnaW9ucyI6IFsiV0EiXSwgInppcENvZGVzIjogWyI5NTA1MCIsICI5MzQwNSJdIH0KCiwgIkdCIjoKCnsgInppcENvZGVzIjogWyI3MjA0NiIsICI3MjA0NyJdIH0KCiwgIklOIjoKCnsgInN0YXRlc09yUmVnaW9ucyI6IFsiQVAiXSB9CgosICJKUCI6IHt9IH0gfQ==
Intermediate response with button additional parameters
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters after initializing an Amazon Pay payment
The following example code shows the updated and complete Amazon Pay button, which will redirect the client to Amazon.
<div id="AmazonPayButton"></div> <script src="https://static-na.payments-amazon.com/checkout.js"></script> <script type="text/javascript" charset="utf-8"> var amazonPayButton = amazon.Pay.renderButton('#AmazonPayButton', { merchantId: 'xxxxx', ledgerCurrency: 'EUR', checkoutLanguage: 'en_GB', productType: 'PayAndShip', placement: 'Cart', buttonColor: 'Gold' }); amazonPayButton.onClick(function(){ // Here you need to call your shop server, which creates the initial Call towards Paygate // and then returns the required data payloadJSON, signature, publicKeyId from the response var buttonData = getSignedButtonData() amazonPayButton.initCheckout({ createCheckoutSessionConfig: { payloadJSON: buttonData.payloadJSON, signature: buttonData.signature, publicKeyId: buttonData.publicKeyId } }); </script>
Intermediate response with customer information to your ShopUrl
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters after initializing an Amazon Pay payment
Amazon Pay capture a payment
In order to capture an authorized payment with Amazon Pay, please use the following URL:
https://www.computop-paygate.com/capture.aspx |
The following tables describe the transfer parameters and return values which are exchanged via the socket connection. The server-to-server communication process is described in the manual Programming basics.
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Encrypted parameters for capturing an authorized Amazon Pay payment
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters after capturing an authorized Amazon Pay payment
After a capture you get a notify to your specified URLNotify with following parameters:
Response parameters to URLNotify after capturing an authorized Amazon Pay payment
Amazon Pay credit a payment
In order to credit a captured payment with Amazon Pay, please use the following URL:
https://www.computop-paygate.com/credit.aspx |
The following tables describe the transfer parameters and return values which are exchanged via the socket connection. The server-to-server communication process is described in the manual Programming basics.
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Encrypted parameters for crediting an Amazon Pay payment
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters after crediting an authorized Amazon Pay payment
After a credit you get a notify to your specified URLNotify with following parameters:
Response parameters to URLNotify after credit of an Amazon Pay payment
Amazon Pay reverse an order
In order to reverse a complete order with Amazon Pay with the function „CancelOrderReference“, please use the following URL:
https://www.computop-paygate.com/reverse.aspx |
The following tables describe the transfer parameters and return values which are exchanged via the socket connection. The server-to-server communication process is described in the manual Programming basics.
Notice: For security reasons, Computop Paygate rejects all payment requests with formatting errors. Therefore, please use the correct data type for each parameter. The following table describes the encrypted payment request parameters:
Encrypted parameters for reversal of an Amazon Pay payment
The following table describes the result parameters with which the Computop Paygate responds to your system pls. be prepared to receive additional parameters at any time and do not check the order of parameters the key (e.g. MerchantId, RefNr) should not be checked case-sentive
Response parameters after reversing an Amazon Pay payment