The following values are required to set up AmazonPay via Amazon:
- MerchantId
- PublicKey see 'API Key für collana pay anlegen (PublicKey/PrivateKey)'
- PrivateKeyId see 'API Key für collana pay anlegen (PublicKey/PrivateKey)'
- StoreId
Configure Amazon notifications
- Integrator Url (STG-V2): https://sandbox.collanapay.com/v2/notifications/amazon
- Integrator Url (PRD-V2): https://live.collanapay.com/v2/notifications/amazon
The URLs for the notifications can be defined in Seller Central: Configuration -> Instant payment notifications (IPN) (https://developer.amazon.com/de/docs/amazon-pay-checkout/set-up-instant-payment-notifications.html ). The notifications are then sent to the URLs that are stored at the merchant url or integrator url (preferred).
Add Javascript Origin (only for productive environments and only for shop connection)
For checkoutReviewReturnUrl our collana pay URL must be added in productive use. To do this, the collana pay URL must be set as the JavaScript origin URL (see documentation).
Open JavaScript Origins:
Konfiguration -> Integration Central -> Client-IDs/Store-IDs verwalten -> Client-IDs/Store-IDs anzeigen -> Bearbeiten -> JavaScript Ursprünge
(https://developer.amazon.com/de/docs/amazon-pay-checkout/get-set-up-for-integration.html#2-add-domains-to-seller-central )
Enter the URL where the JavaScript will be executed. Usually this is the URL of the webshop.
Create API Key for collana pay (PublicKey/PrivateKey)
New API keys can be generated at Amazon in Integration Central. These contain the information we need as PublicKey and .pem file to set up our ProviderAccount. When creating an API key (the name can be chosen freely, e.g. "collana pay"), a .pem file is created, which should be saved, as this .pem file cannot be accessed afterwards. The StoreId and MerchantId information can also be read in the same place in Integral Central.
To generate the PrivateKeyId from the .pem file, the contents of the file must be Base64 encoded (highlight everything including -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----). To do this, you can use Notepad++ via Extensions -> MIME Tools -> Base64 Encode with padding.
Communication process (End-of-Checkout-Variant)
Transaction Api |
Amazon |
Create |
- |
Prepare |
- |
Reserve |
Create CheckoutSession Step 2: Add the Amazon Pay button Complete CheckoutSession Step5: Verify & complete checkout CreateCharge [AutoCapture durch PaymentIntent: AuthorizeWithCapture] |
Capture |
CaptureCharge |
Refund |
CreateRefund |
Void |
Close ChargePermission |
Communication process (Express-Variant)
Transaction Api |
Amazon |
Create |
- |
Prepare |
Create CheckoutSession (Step 2: Add the Amazon Pay button) |
Reserve |
Update CheckoutSession + Complete CheckoutSession [Step 4: Set payment info + Step 5: Verify & complete checkout ] |
Capture |
CaptureCharge bzw. CreateCharge [AutoCapture durch PaymentIntent: AuthorizeWithCapture] |
Refund |
CreateRefund |
Void |
Close ChargePermission |
Special aspects
Fixed billing customer data: In the sandbox, AmazonPay uses the user Liam Barker as a permanent billing customer. More information