Skip to main content

APB flow

Below is another checkout flow called APB (Additional Payment Button). APB fits following scenarios:

  • Amazon Pay is used for digital contents checkout
  • The buyer already logged in with your site, selected shipping address saved at your site, and selected Amazon Pay as a payment method
You should always choose the best solution for the buyer, and we don't recomment to use APB for cases other than above.

Flow diagram

Below diagram shows website page transitioning togehter with merchant and Amazon Pay processes involved. Diagram is horizontal, and flows from left to right. Scroll the diagram to the right to see all flow.

OneTime APB flow

Merchant siteAmazon Pay Hosted page for APBMerchant processingMerchant site
Merchant adds Amazon Pay button rendering script to show Amazon Pay button on merchant site.
The buyer clicks Amazon Pay button.
● ● ●
Cart page
Amazon Pay
▶︎
The buyer is redirected to Amazon Pay Hosted page, and sign-in with Amazon ID and Password.
▶︎
After sing in is complete, the buyer sees Amazon Pay Hosted page with shipping address and payment instrument, and clicks "Pay Now" button.
For APB
1. Show shipping address provided by merchant in payloadJSON.addressDetails.
2. Show amount provided by merchant in payloadJSON.paymentDetails.chargeAmount.
3. Show "Pay Now" button instead of "Continue to checkout"
It executes payment upon the buyer clicking "Pay Now" button.
Hosted Page for payment instrument selection
For productType="PayAndShip"
Merchant
Shipping address
Test Seimei 153-0064 Shimomeguro 1-8-1, Meguro, Tokyo
Shipping address is from input in [merchant-name] website.
Instrument
VISA xxxx1111
Amount
¥10,000

For productType="PayOnly"
Merchant
Payment instruyment
VISA xxxx1111
Amount
¥10,000

When the buyer clicks "Change" button
Please select payment instrument
◉ VISA xxxx1111
xxx
Expiry 05/2023
○ American Express xxxx0005
xxxx
Expiry 05/2023

▶︎

When process successfully completes, Amazon Pay redirects to checkoutResultReturnUrl set by merchant in payloadJSON. webCheckoutDetails.checkoutResultReturnUrl.
Amazon Pay adds amazonCheckoutSessionId as a URL parameter
i.e. https://anyurl.com/result/?amazonCheckoutSessionId=26be7331-7dc2-4722-be22-f7e75582d3ef
▶︎
Merchant then calls Complete Checkout Session API to complete checkout.
Amazon Pay returns chargePermissionId and maybe chargeId in API response.
Merchants needs these IDs for subsequent processes, so merchant needs to save them in their database linked to respective order information
Ref: Integration Guide - Complete Checkout Session response sample
There is a chance that payment process fails, so merchant needs to implement error handling properly.
Error handling
Re: Integration Guide - Manage erros
▶︎
Merchant shows order confirmation page.

● ● ●
Order confirmation page
✔️

Sequence diagram

Source: (Only available in Japanese) FAQ - I want to know about AdditionalPaymentButton(APB)


APB Integration Guide

Integration Guide - Additional payment button

More details are explained in Integration Steps - APB