Get set up for integration

[Step 1 of 7] In this step, you will register for an Amazon Pay merchant account. After registration, you will create a sandbox buyer account for testing, and exchange your public key for a PublicKeyId to access Amazon Pay APIs.


1. Register for Amazon Pay

Sign up for an Amazon Pay merchant account on the Amazon Pay website. Select the correct region for your account from below.

To get started quickly, you can also create a developer account that can only access the Sandbox environment and complete registration later.

After registration is complete, return to this page.


2. Add domains to Seller Central

Add all the domains (including protocol and custom ports) that you plan on using for the Amazon Pay checkout to the JavaScript Origins in Seller Central: US, EU.

For example, ‘https://www.example.com/’ or ‘https://www.example.com:8000/’

All domains must be compliant with Amazon Pay Acceptable Use Policy: US, EU, UK. The Amazon Pay button may be inactive during review.


3. Create an Amazon Pay Sandbox test buyer account

You will use Sandbox to conduct end-to-end tests of your integration before going live. For details, see Amazon Pay Sandbox accounts. After creating an Amazon Pay Sandbox account, return to this page.


4. Download the Amazon Pay SDK

Download the Amazon Pay SDK if one is available for your programming language. Please reach out to your Amazon Pay account manager if you don’t see a SDK in your preferred language.

# Install using Composer
composer require amzn/amazon-pay-api-sdk-php
Source code: https://github.com/amzn/amazon-pay-api-sdk-php
The .NET SDK is currently only available on GitHub, NuGet release will be coming soon. You can download the latest version using this link. After download, use one of the following commands to install the package to your project (replace value for the -Source parameter with the location of the downloaded file).
# Install using Visual Studio Package Manager Console
PM> Install-Package Amazon.Pay.API.SDK -Version 2.3.2 -Source %USERPROFILE%\Downloads
# Install using .NET Core CLI
> dotnet add package Amazon.Pay.API.SDK -v 2.3.2 -s %USERPROFILE%\Downloads\
Source code: https://github.com/amzn/amazon-pay-api-sdk-dotnet
# Install using Maven
<dependency>
    <groupId>software.amazon.pay</groupId>
    <artifactId>amazon-pay-api-sdk-java</artifactId>
    <version>2.2.2</version>
</dependency>
# Install using Gradle
implementation 'software.amazon.pay:amazon-pay-api-sdk-java:2.2.2'
Source code: https://github.com/amzn/amazon-pay-api-sdk-java
// Install module as a dependency
npm i @amazonpay/amazon-pay-api-sdk-nodejs
Source code: https://github.com/amzn/amazon-pay-api-sdk-nodejs

5. Get your PublicKeyId

Amazon Pay uses asymmetric encryption to secure communication. You will need a public/private key pair and a corresponding Public Key ID (a unique Amazon Pay identifier for the key pair) to access Amazon Pay APIs. Exchange the public key from your key pair for a publicKeyId to access Amazon Pay APIs.

You will need two set of keys for the integration, one for the Sandbox environment and one for the Live environment. Generate two key pairs for the two environments, to exchange the two public keys with the two corresponding Public Key IDs.

You can manually generate a public/private key pair using these instructions:

Open Command Prompt or Terminal and use these commands to generate a public and private key pair:

openssl genrsa -out privateKey.pem 2048
openssl rsa -in privateKey.pem -pubout > publicKey.pub
        
Open a Windows command prompt or PowerShell and use these commands to generate a public and private key pair:

ssh-keygen -t rsa -b 2048 -f privateKey.pem
ssh-keygen -f privateKey.pem -e -m PKCS8 > publicKey.pub
        
You must install a shell program to generate the keys. Download Git Bash (or an equivilant emulation software) and use these commands to generate a public and private key pair:
          
openssl genrsa -out privateKey.pem 2048
openssl rsa -in privateKey.pem -pubout > publicKey.pub
          
        

Email the public key and the merchant identifier provided by your acquirer to your Amazon Pay account manager. They will respond with your publicKeyId. Never share your private key.


6. Complete set up with your acquirer

Make sure to complete all the steps needed to enable the integration and the payment option with your acquirer. Follow up with your acquirer contacts on the steps to be completed to enable Amazon Pay for your website.