Display shipping and payment info

[Step 3 of 10] The buyer is redirected to checkoutReviewReturnUrl after they select their preferred shipping address and payment instrument. The Amazon Pay checkout session ID will be included as a query parameter.

In this step, you will use the checkout session ID to get checkout info (such as shipping address and payment instrument) and to enable checkout preference updates. At the end of this step, you will be able to present the buyer with an order summary and give them the option of updating their preferred shipping and payment instrument before they complete checkout.

1. Get shipping and payment info

Get Checkout Session to retrieve checkout info, such as buyer email, shipping address, and payment information. Use the response to display checkout information, offer shipping options if applicable, and calculate additional costs.

Note that you can only retrieve checkout info using Get Checkout Session while the Checkout Session object is in an Open state. Additionally, shipping address will only be returned if the Checkout Session has PayAndShip product type. After a successful checkout, you can use Get Charge Permission to retrieve checkout info.


  • For protection against buyer disputes, you should display the shipping address that you receive from Amazon Pay as read-only text. Enable shipping and payment updates so that buyers can select a different shipping address from their Amazon address book. More information about Amazon Pay Payment Protection Plan here: US, UK, EU, JP.
  • Use the paymentDescriptor value returned in Get Checkout Session response to represent the buyer-selected payment instrument. Amazon Pay may dynamically return a different value to optimize checkout conversion.
  • Verify the address returned in the Get Checkout Session is supported by your business requirements even if you use the deliverySpecifications parameter to limit which addresses your buyer can select from their Amazon address book. If the address returned is not supported, please ask the buyer to select a different one.
  • Do not display checkout info such as shipping address or buyer email to anyone besides the buyer who initiated checkout. Implement validation (for example: browser session verification) in case someone besides the buyer gains access to the Checkout Session ID.


Request parameters


Type: string
Path Parameter
Checkout session identifier


    "webCheckoutDetails": {
        "checkoutCancelUrl": null,
    "chargePermissionType": PaymentMethodOnFile, 
    "paymentMethodOnFileMetadata": {
        "setupOnly": false
    "paymentDetails": {
        "chargeAmount": null,
        "totalOrderAmount": null,
        "softDescriptor": null,
        "presentmentCurrency": null,
        "allowOvercharge": null,
        "extendExpiration": null
    "merchantMetadata": {
    "supplementaryData":null, // Amazon Pay system data 
    "buyer": {
        "buyerId": "buyerId",
        "name": "name-1",
        "email": "name@amazon.com",
        "phoneNumber": "800-000-0000",
        "primeMembershipTypes": null
        "name": "Work",
        "addressLine1": "440 Terry Ave",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Seattle",
        "county": "King",    
        "district": "Seattle",
        "stateOrRegion": "WA",
        "postalCode": "98121",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    "paymentPreferences": [
            "paymentDescriptor": "Visa ****1111 (Amazon Pay)"
    "statusDetails": {
    "shippingAddress": {  // Null for PayOnly product type
        "name":"Susie Smith",
        "addressLine1":"10 Ditka Ave",
        "addressLine2":"Suite 2500",
    "constraints": [
            "description":"chargeAmount is not set."
            "description":"checkoutResultReturnUrl is not set."
            "description":"paymentIntent is not set."
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPOBoxes"],
        "addressRestrictions": {
            "restrictions": {
                "US": {
                    "statesOrRegions": ["WA"],
                    "zipCodes": ["95050", "93405"]
                "GB": {
                    "zipCodes": ["72046", "72047"]
                "IN": {
                    "statesOrRegions": ["AP"]
                "JP": {}
    "providerMetadata": {

2. Enable shipping and payment updates

Use amazon.Pay.bindChangeAction() to bind click events to HTML elements, so that when the element is clicked, the buyer can select a different shipping address or payment method. Be sure to Get Checkout Session after the buyer returns to your site to retrieve updated checkout info.

Step 1. Add the Amazon Pay script to your HTML file. Be sure you select the correct region.

<script src="https://static-na.payments-amazon.com/checkout.js"></script>
<script src="https://static-eu.payments-amazon.com/checkout.js"></script>
<script src="https://static-fe.payments-amazon.com/checkout.js"></script>

Step 2. Use amazon.Pay.bindChangeAction() to bind click events to HTML elements on your page. You can specify whether the buyer is editing shipping address or payment method by using the changeAction parameter.

Changing address (only relevant if Checkout Session product type is PayAndShip):

<script type="text/javascript" charset="utf-8">
  amazon.Pay.bindChangeAction('#changeButton1', {
    amazonCheckoutSessionId: 'xxxx',
    changeAction: 'changeAddress'

Changing payment instrument:

<script type="text/javascript" charset="utf-8">
  amazon.Pay.bindChangeAction('#changeButton2', {
    amazonCheckoutSessionId: 'xxxx',
    changeAction: 'changePayment'

Function parameters


Type: string
Amazon Pay Checkout Session identifier

Type: string
Update requested by the buyer

Supported values: 'changeAddress', 'changePayment'

3. Update estimated order amount

This step is only required if you’ve set the estimatedOrderAmount parameter and if buyers can change the order total after starting checkout (for example, if they can remove items from the cart on the checkoutReviewReturnUrl page.

Use updateButtonInfo() to update the estimatedOrderAmount any time the estimated order amount changes.

<script type="text/javascript" charset="utf-8">