---
title: Checkout Session
url: amazon-pay-api-v2/v1-checkout-session.html
---

A Checkout Session represents a single active session (or engagement) for a buyer on your website. The Checkout Session can be used to facilitate a new, one-time charge, or recovery from a declined payment.

The Checkout Session starts in an Open state and moves to a Canceled state, unless the buyer completes checkout within 24 hours. In the Open state, you can use the Checkout Session to retrieve checkout details such as buyer profile, shipping address, and payment info.

If the buyer completes checkout within 24 hours, the Checkout Session will move to either a Completed state or Canceled state, depending on whether or not the checkout was successful. In the Completed state, you can use the Checkout Session to retrieve references to a Charge Permission. If payment authorization was requested, the response will also include references to a Charge. In the Canceled state, you can use the Checkout Session to retrieve why Checkout failed. 

Note that Amazon Pay permanently deletes Checkout Session objects and any associated info after 30 days. 

Supported operations:

<ul id="profileTabs" class="nav nav-tabs">
  <li class="nav-item"><a class="active nav-link noExtIcon" href="#ustab" data-toggle="tab">US</a></li>
  <li class="nav-item"><a class="nav-link noExtIcon" href="#eutab" data-toggle="tab">EU / UK</a></li>
  <li class="nav-item"><a class="nav-link noExtIcon" href="#jptab" data-toggle="tab">JP</a></li>
</ul>
<div class="tab-content">
  <div role="tabpanel" class="tab-pane active" id="ustab" markdown="block">   
<div markdown="block">
* **Create Checkout Session** - POST https://pay-api.amazon.com/:environment/:version/checkoutSessions/
* **Get Checkout Session** - GET https://pay-api.amazon.com/:environment/:version/checkoutSessions/:checkoutSessionId
* **Update Checkout Session** - PATCH https://pay-api.amazon.com/:environment/:version/checkoutSessions/:checkoutSessionId
</div>
  </div>
  <div role="tabpanel" class="tab-pane" id="eutab" markdown="block">
<div markdown="block">
* **Create Checkout Session** - POST https://pay-api.amazon.eu/:environment/:version/checkoutSessions/
* **Get Checkout Session** - GET https://pay-api.amazon.eu/:environment/:version/checkoutSessions/:checkoutSessionId
* **Update Checkout Session** - PATCH https://pay-api.amazon.eu/:environment/:version/checkoutSessions/:checkoutSessionId
</div>
  </div>
  <div role="tabpanel" class="tab-pane" id="jptab" markdown="block">
<div markdown="block">
* **Create Checkout Session** - POST https://pay-api.amazon.jp/:environment/:version/checkoutSessions/
* **Get Checkout Session** - GET https://pay-api.amazon.jp/:environment/:version/checkoutSessions/:checkoutSessionId
* **Update Checkout Session** - PATCH https://pay-api.amazon.jp/:environment/:version/checkoutSessions/:checkoutSessionId
</div>
  </div>
</div>



***

* TOC
{:toc}
{::options toc_levels="3" /}

### Checkout Session object

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAAMa0J'>
            <td id='s:ERL9CAAMa0J;ERL9CA4JgH8' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAAMa0J;ERL9CA2UFx4' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAPW7YB'>
            <td id='s:ERL9CAPW7YB;ERL9CA4JgH8' style='vertical-align: top;'>checkoutSessionId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAPW7YB;ERL9CA2UFx4' style='vertical-align: top;'>Checkout Session identifier<br><br>
                <br /></td>
        </tr>
        <tr id='ERL9CAMHIJQ'>
            <td id='s:ERL9CAMHIJQ;ERL9CA4JgH8' style='vertical-align: top;'>webCheckoutDetail<br><br>Type: <a href="#type-webcheckoutdetail">webCheckoutDetail</a>
                <br /></td>
            <td id='s:ERL9CAMHIJQ;ERL9CA2UFx4' style='vertical-align: top;'>URLs associated to the Checkout Session used for completing checkout
                <br /></td>
        </tr>
        <tr id='ERL9CA5u29J'>
            <td id='s:ERL9CA5u29J;ERL9CA4JgH8' style='vertical-align: top;'>productType<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA5u29J;ERL9CA2UFx4' style='vertical-align: top;'>Amazon Pay integration type. You can not set this value via Checkout Session operations, you must set it using button <code>productType</code> parameter
                <br /></td>
        </tr>
        <tr id='ERL9CAW1ynS'>
            <td id='s:ERL9CAW1ynS;ERL9CA4JgH8' style='vertical-align: top;'>paymentDetail<br><br>Type: <a href="#type-paymentdetail">paymentDetail</a>
                <br /></td>
            <td id='s:ERL9CAW1ynS;ERL9CA2UFx4' style='vertical-align: top;'>Payment details specified by the merchant, such as the amount and method for charging the buyer
                <br /></td>
        </tr>
        <tr id='ERL9CAghftb'>
            <td id='s:ERL9CAghftb;ERL9CA4JgH8' style='vertical-align: top;'>merchantMetadata<br><br>Type: <a href="#type-merchantmetadata">merchantMetadata</a>
                <br /></td>
            <td id='s:ERL9CAghftb;ERL9CA2UFx4' style='vertical-align: top;'>Merchant-provided order info
                <br /></td>
        </tr>
        <tr id='ERL9CAzuBJe'>
            <td id='s:ERL9CAzuBJe;ERL9CA4JgH8' style='vertical-align: top;'>platformId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAzuBJe;ERL9CA2UFx4' style='vertical-align: top;'>Merchant identifier of the Solution Provider (SP)- also known as ecommerce provider <br><br>Only SPs should use this field
                <br /></td>
        </tr>
        <tr id='ERL9CAdYXcn'>
            <td id='s:ERL9CAdYXcn;ERL9CA4JgH8' style='vertical-align: top;'>providerMetadata<br><br>Type: <a href="#type-providermetadata">providerMetadata</a>
                <br /></td>
            <td id='s:ERL9CAdYXcn;ERL9CA2UFx4' style='vertical-align: top;'>Payment service provider (PSP)-provided order information<br><br>Only PSPs should use these fields
                <br /></td>
        </tr>
        <tr id='ERL9CA3mi12'>
            <td id='s:ERL9CA3mi12;ERL9CA4JgH8' style='vertical-align: top;'>buyer<br><br>Type: <a href="#type-buyer">buyer</a>
                <br /></td>
            <td id='s:ERL9CA3mi12;ERL9CA2UFx4' style='vertical-align: top;'>Details about the buyer, such as their unique identifier, name, and email<br><br>This info will only be returned for a Checkout Session in the Open state
                <br /></td>
        </tr>
        <tr id='ERL9CA8sy3y'>
            <td id='s:ERL9CA8sy3y;ERL9CA4JgH8' style='vertical-align: top;'>shippingAddress<br><br>Type: <a href="#type-address">address</a>
                <br /></td>
            <td id='s:ERL9CA8sy3y;ERL9CA2UFx4' style='vertical-align: top;'>Shipping address selected by the buyer
                <br /></td>
        </tr>
        <tr id='ERL9CA6b5JL'>
            <td id='s:ERL9CA6b5JL;ERL9CA4JgH8' style='vertical-align: top;'>paymentPreferences<br><br>Type: list&lt;<a href="#type-paymentpreferences">paymentPreferences</a>&gt;
                <br /></td>
            <td id='s:ERL9CA6b5JL;ERL9CA2UFx4' style='vertical-align: top;'>List of payment instruments selected by the buyer
                <br /></td>
        </tr>
        <tr id='ERL9CAQ5o5K'>
            <td id='s:ERL9CAQ5o5K;ERL9CA4JgH8' style='vertical-align: top;'>statusDetail<br><br>Type: <a href="#type-statusdetail">statusDetail</a>
                <br /></td>
            <td id='s:ERL9CAQ5o5K;ERL9CA2UFx4' style='vertical-align: top;'>State of the Checkout Session object
                <br /></td>
        </tr>
        <tr id='ERL9CAnr8vi'>
            <td id='s:ERL9CAnr8vi;ERL9CA4JgH8' style='vertical-align: top;'>constraints<br><br>Type: list&lt;<a href="#type-constraint">constraint</a>&gt;
                <br /></td>
            <td id='s:ERL9CAnr8vi;ERL9CA2UFx4' style='vertical-align: top;'>Constraints that must be addressed to complete Amazon Pay checkout
                <br /></td>
        </tr>
        <tr id='ERL9CAFxu2I'>
            <td id='s:ERL9CAFxu2I;ERL9CA4JgH8' style='vertical-align: top;'>creationTimestamp<br><br>Type: dateTime
                <br /></td>
            <td id='s:ERL9CAFxu2I;ERL9CA2UFx4' style='vertical-align: top;'>Universal Time Coordinated (UTC) date and time when the Checkout Session was created in ISO 8601 format
                <br /></td>
        </tr>
        <tr id='ERL9CAkNc6l'>
            <td id='s:ERL9CAkNc6l;ERL9CA4JgH8' style='vertical-align: top;'>expirationTimestamp<br><br>Type: dateTime
                <br /></td>
            <td id='s:ERL9CAkNc6l;ERL9CA2UFx4' style='vertical-align: top;'>UTC date and time when the Checkout Session will expire in ISO 8601 format
                <br /></td>
        </tr>
        <tr id='ERL9CAceihI'>
            <td id='s:ERL9CAceihI;ERL9CA4JgH8' style='vertical-align: top;'>chargePermissionId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAceihI;ERL9CA2UFx4' style='vertical-align: top;'>Charge permission identifier returned after Checkout Session is complete<br><br> Used for creating charges for <a href="../amazon-pay-checkout/v1-deferred-transactions.md">deferred transactions</a>
                <br /></td>
        </tr>
        <tr id='ERL9CAAdmWH'>
            <td id='s:ERL9CAAdmWH;ERL9CA4JgH8' style='vertical-align: top;'>chargeId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAAdmWH;ERL9CA2UFx4' style='vertical-align: top;'>Charge identifier returned after Checkout Session is complete<br><br>Used for processing refunds
                <br /></td>
        </tr>
        <tr id='ERL9CAS8DRa'>
            <td id='s:ERL9CAS8DRa;ERL9CA4JgH8' style='vertical-align: top;'>storeId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAS8DRa;ERL9CA2UFx4' style='vertical-align: top;'>Login with Amazon client ID. Do not use the application ID<br><br>Retrieve this value from "Login with Amazon" in <a href="https://sellercentral.amazon.com/">Seller Central</a>
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>deliverySpecifications<br /><br />Type: <a href="#type-deliveryspecifications">deliverySpecifications</a>
                <br /></td>
            <td id='' style='vertical-align: top;'>Specify shipping restrictions to prevent buyers from selecting unsupported addresses from their Amazon address book 
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>releaseEnvironment<br /><br />Type: string
                <br /></td>
            <td id='' style='vertical-align: top;'>The environment the Checkout Session object was created in (either Sandbox or Live)
                <br /></td>
        </tr>
        <tr>
            <td style='vertical-align: top;'>checkoutButtonText<br /><br />Type: string
                <br /></td>
            <td style='vertical-align: top;'>Amazon Pay-provided button text for buyers who have chosen Affirm as payment instrument. For all other use cases, this value will be null 
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: webCheckoutDetail

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAz5j6a'>
            <td id='s:ERL9CAz5j6a;ERL9CAAufZX' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAz5j6a;ERL9CAneSOW' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CA6eLjw'>
            <td id='s:ERL9CA6eLjw;ERL9CAAufZX' style='vertical-align: top;'>checkoutReviewReturnUrl<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA6eLjw;ERL9CAneSOW' style='vertical-align: top;'>Checkout review URL provided by the merchant. Amazon Pay will redirect to this URL after the buyer selects their preferred payment instrument and shipping address<br><br>Note: In the Live environment, URLs must use HTTPS protocol. In Sandbox environment, you don't need a SSL certificate and can use the HTTP protocol<br><br>Max length: 1024 characters
                <br /></td>
        </tr>
        <tr id='ERL9CAxQRXB'>
            <td id='s:ERL9CAxQRXB;ERL9CAAufZX' style='vertical-align: top;'>checkoutResultReturnUrl<br><br>Type: string<br>
                <br /></td>
            <td id='s:ERL9CAxQRXB;ERL9CAneSOW' style='vertical-align: top;'>Checkout result URL provided by the merchant. Amazon Pay will redirect to this URL after completing the transaction<br><br>Note: In the Live environment, URLs must use HTTPS protocol. In Sandbox environment, you don't need a SSL certificate and can use the HTTP protocol<br><br>Max length: 1024 characters
                <br /></td>
        </tr>
        <tr id='ERL9CAixONe'>
            <td id='s:ERL9CAixONe;ERL9CAAufZX' style='vertical-align: top;'>amazonPayRedirectUrl<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAixONe;ERL9CAneSOW' style='vertical-align: top;'>URL provided by Amazon Pay. Merchant will redirect to this page after setting transaction details to complete checkout<br><br>Max length: 256 characters
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: deliverySpecifications

<table width="100%" border="1">
    <tbody>
         <tr id='ERL9CAz5j6a'>
            <td id='s:ERL9CAz5j6a;ERL9CAAufZX' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAz5j6a;ERL9CAneSOW' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CA09KrK'>
            <td id='s:ERL9CA09KrK;ERL9CAGYV2f' style='vertical-align: top;'>specialRestrictions<br><br>Type: list&lt;string&gt;
                <br /></td>
            <td id='s:ERL9CA09KrK;ERL9CAoKRxx' style='vertical-align: top;'>Rule-based restrictions<br><br>Note: Amazon will only validate this value in Sandbox. This parameter is ignored in the Live environment if an unsupported value is used<br><br>Supported values:
                <ul>
                    <li>'RestrictPOBoxes' - Marks PO box addresses in US, CA, GB, FR, DE, ES, PT, IT, AU as restricted</li>
                    <li>'RestrictPackstations' - Marks packstation addresses in DE as restricted</li>
                </ul>
                </td>
        </tr>
        <tr id='ERL9CAXT6Om'>
            <td id='s:ERL9CAXT6Om;ERL9CAGYV2f' style='vertical-align: top;'>addressRestrictions<br><br>Type: <a href="#type-addressrestrictions">addressRestrictions</a><br>
                <br /></td>
            <td id='s:ERL9CAXT6Om;ERL9CAoKRxx' style='vertical-align: top;'>Country-based restrictions<br><br>
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: addressRestrictions

<table width="100%" border="1">
     <tbody>
         <tr id='ERL9CAz5j6a'>
            <td id='s:ERL9CAz5j6a;ERL9CAAufZX' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAz5j6a;ERL9CAneSOW' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAJOAHz'>
            <td id='s:ERL9CAJOAHz;ERL9CAcxSMm' style='vertical-align: top;'>type<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAJOAHz;ERL9CAYTz80' style='vertical-align: top;'>Specifies whether addresses that match restrictions configuration should or should not be restricted<br><br>Note: Amazon will only validate this value in Sandbox. This parameter is ignored in the Live environment if an unsupported value is used<br><br>Supported values:<br>'Allowed' - Mark addresses that don't match restrictions configuration as restricted<br>'NotAllowed' - Mark addresses that match restrictions configuration as restricted<br>
                <br /></td>
        </tr>
        <tr id='ERL9CAx7mom'>
            <td id='s:ERL9CAx7mom;ERL9CAcxSMm' style='vertical-align: top;'>restrictions<br><br>Type: hash&lt;countryCode:<a href="#type-restriction">restriction</a>&gt;<br>
                <br /></td>
            <td id='s:ERL9CAx7mom;ERL9CAYTz80' style='vertical-align: top;'>Hash of country-level restrictions that determine which addresses should or should not be restricted based on <code>addressRestrictions.type</code> parameter.<br><br>CountryCode is a string that represents the country code of the address in ISO 3166 format. Amazon will only validate CountryCode in Sandbox. CountryCode is ignored in the Live environment if an unsupported value is used<br><br>
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: restriction

<table width="100%" border="1">
    <tbody>
         <tr id='ERL9CAz5j6a'>
            <td id='s:ERL9CAz5j6a;ERL9CAAufZX' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAz5j6a;ERL9CAneSOW' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CADAGCN'>
            <td id='s:ERL9CADAGCN;ERL9CACXrxz' style='vertical-align: top;'>statesOrRegions<br><br>Type: list&lt;string&gt;
                <br /></td>
            <td id='s:ERL9CADAGCN;ERL9CA5jwy4' style='vertical-align: top;'>List of country-specific states that should or should not be restricted based on <code>addressRestrictions.type</code> parameter<br><br>     
            Note: 
            <ul>
                <li>US addresses - Use 2-character state codes (for example: WA, CA, IL)</li>
                <li>All other countries - This element is free text. Include all applicable variants: 2-character code, fully spelled out, and abbreviated</li>
            </ul></td>
        </tr>
        <tr id='ERL9CAlyFPG'>
            <td id='s:ERL9CAlyFPG;ERL9CACXrxz' style='vertical-align: top;'>zipCodes<br><br>Type: list&lt;string&gt;<br>
                <br /></td>
            <td id='s:ERL9CAlyFPG;ERL9CA5jwy4' style='vertical-align: top;'>List of country-specific zip codes that should or should not be restricted based on <code>addressRestrictions.type</code> parameter<br>
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: paymentDetail

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAXIylR'>
            <td id='s:ERL9CAXIylR;ERL9CAW9hIG' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAXIylR;ERL9CAxLjJC' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CA8cLyf'>
            <td id='s:ERL9CA8cLyf;ERL9CAW9hIG' style='vertical-align: top;'>paymentIntent<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA8cLyf;ERL9CAxLjJC' style='vertical-align: top;'>Payment flow for charging the buyer<br><br>Possible values: Confirm or Authorize
                <br /></td>
        </tr>
        <tr id='ERL9CAlQj26'>
            <td id='s:ERL9CAlQj26;ERL9CAW9hIG' style='vertical-align: top;'>canHandlePendingAuthorization<br><br>Type: boolean<br>
                <br /></td>
            <td id='s:ERL9CAlQj26;ERL9CAxLjJC' style='vertical-align: top;'>Boolean that indicates whether merchant can handle pending response <br><br>See <a href="../amazon-pay-checkout/v1-asynchronous-processing.md">asynchronous processing</a> for more info
                <br /></td>
        </tr>
        <tr id='ERL9CAm6rqs'>
            <td id='s:ERL9CAm6rqs;ERL9CAW9hIG' style='vertical-align: top;'>chargeAmount<br><br>Type: <a href="#type-price">price</a>
                <br /></td>
            <td id='s:ERL9CAm6rqs;ERL9CAxLjJC' style='vertical-align: top;'>Transaction amount
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>presentmentCurrency<br><br>Type: string
                <br /></td>
            <td id='' style='vertical-align: top;'>The currency that the buyer will be charged in ISO 4217 format. Example: USD<br><br>See <a href="../amazon-pay-checkout/v1-multi-currency-integration.md">multi-currency integration</a> for more info
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: price

<table width="100%" border="1">
    <tbody>
        <tr id='OLS9CAbORDS'>
            <td id='s:OLS9CAbORDS;OLS9CAjgdgj' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:OLS9CAbORDS;OLS9CAZr77k' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='OLS9CAW39VE'>
            <td id='s:OLS9CAW39VE;OLS9CAjgdgj' style='vertical-align: top;'>amount<br><br>Type: string
                <br /></td>
            <td id='s:OLS9CAW39VE;OLS9CAZr77k' style='vertical-align: top;'>Transaction amount
                <br /></td>
        </tr>
        <tr id='OLS9CATPsPn'>
            <td id='s:OLS9CATPsPn;OLS9CAjgdgj' style='vertical-align: top;'>currencyCode<br><br>Type: string
                <br /></td>
            <td id='s:OLS9CATPsPn;OLS9CAZr77k' style='vertical-align: top;'>Transaction currency code in ISO 4217 format<br /><br />Example: USD
                <br /></td>
        </tr>
    </tbody>
</table>

    <tbody>
        <tr id='ERL9CAkCDAX'>
            <td id='s:ERL9CAkCDAX;ERL9CA2PpgG' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAkCDAX;ERL9CA2NQzd' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAp4Zym'>
            <td id='s:ERL9CAp4Zym;ERL9CA2PpgG' style='vertical-align: top;'>amount<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAp4Zym;ERL9CA2NQzd' style='vertical-align: top;'>Transaction amount
                <br /></td>
        </tr>
        <tr id='ERL9CAvtIrl'>
            <td id='s:ERL9CAvtIrl;ERL9CA2PpgG' style='vertical-align: top;'>currencyCode<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAvtIrl;ERL9CA2NQzd' style='vertical-align: top;'>Transaction currency code in ISO 4217 format. Example: USD
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: providerMetadata

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAkCDAX'>
            <td id='' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CA263fp'>
            <td id='s:ERL9CA263fp;ERL9CAOoCvF' style='vertical-align: top;'>providerReferenceId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA263fp;ERL9CAIPemX' style='vertical-align: top;'>Payment service provider (PSP)-provided order identifier<br><br>Only PSPs should use these fields
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: merchantMetadata

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAF4Vxl'>
            <td id='s:ERL9CAF4Vxl;ERL9CAx7Nnu' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAF4Vxl;ERL9CAUSpyh' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAH2j8f'>
            <td id='s:ERL9CAH2j8f;ERL9CAx7Nnu' style='vertical-align: top;'>merchantReferenceId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAH2j8f;ERL9CAUSpyh' style='vertical-align: top;'>External merchant order identifier. The merchant order identifier is shared in <a href="../amazon-pay-checkout/v1-buyer-communication.md">buyer communication</a> and in the buyer transaction history on the<a href="https://pay.amazon.com"> Amazon Pay website</a><br><br>Max length: 256 characters
                <br /></td>
        </tr>
        <tr id='ERL9CANEvec'>
            <td id='s:ERL9CANEvec;ERL9CAx7Nnu' style='vertical-align: top;'>merchantStoreName<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CANEvec;ERL9CAUSpyh' style='vertical-align: top;'>Merchant store name. Setting this parameter will override the default value configured in <a href="https://sellercentral.amazon.com/">Seller Central</a> (the account management tool for merchants). The store name is shared in <a href="../amazon-pay-checkout/v1-buyer-communication.md">buyer communication</a> and in the buyer transaction history on the <a href="https://pay.amazon.com">Amazon Pay website</a><br><br>Max length: 50 characters
                <br /></td>
        </tr>
        <tr id='ERL9CACmKGe'>
            <td id='s:ERL9CACmKGe;ERL9CAx7Nnu' style='vertical-align: top;'>noteToBuyer<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CACmKGe;ERL9CAUSpyh' style='vertical-align: top;'>Description of the order that is shared in <a href="../amazon-pay-checkout/v1-buyer-communication.md">buyer communication</a><br /><br />You should not store sensitive data about the buyer or the transaction in this field<br><br>Max length: 255 characters
                <br /></td>
        </tr>
        <tr id='ERL9CAznrdA'>
            <td id='s:ERL9CAznrdA;ERL9CAx7Nnu' style='vertical-align: top;'>customInformation<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAznrdA;ERL9CAUSpyh' style='vertical-align: top;'>Custom info for the order. This data is not shared in any <a href="../amazon-pay-checkout/v1-buyer-communication.md">buyer communication</a><br /><br />You should not store sensitive data about the buyer or the transaction in this field<br><br>Max length: 4096 characters
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: buyer

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAbSsO3'>
            <td id='s:ERL9CAbSsO3;ERL9CAoXRkL' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAbSsO3;ERL9CABfkuC' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAEGLpK'>
            <td id='s:ERL9CAEGLpK;ERL9CAoXRkL' style='vertical-align: top;'>buyerId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAEGLpK;ERL9CABfkuC' style='vertical-align: top;'>Unique Amazon Pay buyer identifier
                <br /></td>
        </tr>
        <tr id='ERL9CAvifJc'>
            <td id='s:ERL9CAvifJc;ERL9CAoXRkL' style='vertical-align: top;'>name<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAvifJc;ERL9CABfkuC' style='vertical-align: top;'>Buyer name
                <br /></td>
        </tr>
        <tr id='ERL9CA9FgNU'>
            <td id='s:ERL9CA9FgNU;ERL9CAoXRkL' style='vertical-align: top;'>email<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA9FgNU;ERL9CABfkuC' style='vertical-align: top;'>Buyer email address
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: paymentPreferences

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAng4gt'>
            <td id='s:ERL9CAng4gt;ERL9CAhTOM1' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAng4gt;ERL9CAF5NFx' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAlGrSe'>
            <td id='s:ERL9CAlGrSe;ERL9CAhTOM1' style='vertical-align: top;'>paymentDescriptor<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAlGrSe;ERL9CAF5NFx' style='vertical-align: top;'>Amazon Pay-provided description for buyer-selected payment instrument
                <br /></td>
        </tr>
        <tr id='ERL9CAbDPgI'>
            <td id='s:ERL9CAbDPgI;ERL9CAhTOM1' style='vertical-align: top;'>billingAddress<br><br>Type: <a href="#type-address">address</a>
                <br /></td>
            <td id='s:ERL9CAbDPgI;ERL9CAF5NFx' style='vertical-align: top;'>Billing address for buyer-selected payment instrument. Billing address is only available in EU or for PayOnly product type 
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: address

<table width="100%" border="1">
  <tbody>
      <tr id='ERL9CAz3T00'>
          <td id='s:ERL9CAz3T00;ERL9CA6sOj9' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
              <br /></td>
          <td id='s:ERL9CAz3T00;ERL9CAOJuKu' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
              <br /></td>
      </tr>
      <tr id='ERL9CA1KP3f'>
          <td id='s:ERL9CA1KP3f;ERL9CA6sOj9' style='vertical-align: top;'>name<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CA1KP3f;ERL9CAOJuKu' style='vertical-align: top;'>Address name<br><br>Max length: 50 characters
              <br /></td>
      </tr>
      <tr id='ERL9CAh0jHA'>
          <td id='s:ERL9CAh0jHA;ERL9CA6sOj9' style='vertical-align: top;'>addressLine1<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAh0jHA;ERL9CAOJuKu' style='vertical-align: top;'>The first line of the address<br><br>Max length: 180 characters
              <br /></td>
      </tr>
      <tr id='ERL9CAPTgSi'>
          <td id='s:ERL9CAPTgSi;ERL9CA6sOj9' style='vertical-align: top;'>addressLine2<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAPTgSi;ERL9CAOJuKu' style='vertical-align: top;'>The second line of the address<br><br>Max length: 60 characters
              <br /></td>
      </tr>
      <tr id='ERL9CAUyxoY'>
          <td id='s:ERL9CAUyxoY;ERL9CA6sOj9' style='vertical-align: top;'>addressLine3<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAUyxoY;ERL9CAOJuKu' style='vertical-align: top;'>The third line of the address<br><br>Max length: 60 characters
              <br /></td>
      </tr>
      <tr id='ERL9CAouIB6'>
          <td id='s:ERL9CAouIB6;ERL9CA6sOj9' style='vertical-align: top;'>city<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAouIB6;ERL9CAOJuKu' style='vertical-align: top;'>City of the address<br><br>Max length: 50 characters
              <br /></td>
      </tr>
      <tr id='ERL9CA4C31a'>
          <td id='s:ERL9CA4C31a;ERL9CA6sOj9' style='vertical-align: top;'>county<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CA4C31a;ERL9CAOJuKu' style='vertical-align: top;'>County of the address<br><br>Max length: 50 characters
              <br /></td>
      </tr>
      <tr id='ERL9CAKfMWP'>
          <td id='s:ERL9CAKfMWP;ERL9CA6sOj9' style='vertical-align: top;'>district<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAKfMWP;ERL9CAOJuKu' style='vertical-align: top;'>District of the address<br><br>Max length: 50 characters
              <br /></td>
      </tr>
      <tr id='ERL9CASuiJH'>
          <td id='s:ERL9CASuiJH;ERL9CA6sOj9' style='vertical-align: top;'>stateOrRegion<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CASuiJH;ERL9CAOJuKu' style='vertical-align: top;'>The state or region:
            <ul>
                <li>US and CA addresses - Response will always be a 2-character code</li>
                <li>All other countries - This element is free text and can be either a 2-character code, fully spelled out, or abbreviated</li>
              </ul> 
                Max length: 50 characters
                <br /></td>
      </tr>
      <tr id='ERL9CAuAJ0a'>
          <td id='s:ERL9CAuAJ0a;ERL9CA6sOj9' style='vertical-align: top;'>postalCode<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAuAJ0a;ERL9CAOJuKu' style='vertical-align: top;'>Postal code of the address<br><br>Max length: 20 characters
              <br /></td>
      </tr>
      <tr id='ERL9CAo7zgS'>
          <td id='s:ERL9CAo7zgS;ERL9CA6sOj9' style='vertical-align: top;'>countryCode<br><br>Type: string
              <br /></td>
          <td id='s:ERL9CAo7zgS;ERL9CAOJuKu' style='vertical-align: top;'>Country code of the address in ISO 3166 format<br><br>Max length: 3 characters
              <br /></td>
      </tr>
      <tr id=''>
          <td id='' style='vertical-align: top;'>phoneNumber<br><br>Type: string
              <br /></td>
          <td id='' style='vertical-align: top;'>Phone number<br><br>Max length: 20 characters
              <br /></td>
      </tr>
  </tbody>
</table>

#### Type: statusDetail

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CA6ZDgu'>
            <td id='s:ERL9CA6ZDgu;ERL9CANROdL' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CA6ZDgu;ERL9CAhxxdO' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAToyr7'>
            <td id='s:ERL9CAToyr7;ERL9CANROdL' style='vertical-align: top;'>state<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAToyr7;ERL9CAhxxdO' style='vertical-align: top;'>Current object state
                <br /></td>
        </tr>
        <tr id='ERL9CA2PnwF'>
            <td id='s:ERL9CA2PnwF;ERL9CAYoYDq' style='vertical-align: top;'>reasonCode<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA2PnwF;ERL9CAiF60P' style='vertical-align: top;'>Reason code for current state
                <br /></td>
        </tr>
        <tr id='ERL9CACi1cW'>
            <td id='s:ERL9CACi1cW;ERL9CAYoYDq' style='vertical-align: top;'>reasonDescription<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CACi1cW;ERL9CAiF60P' style='vertical-align: top;'>An optional description of the Checkout Session state
                <br /></td>
        </tr>
        <tr id='ERL9CAPwBch'>
            <td id='s:ERL9CAPwBch;ERL9CANROdL' style='vertical-align: top;'>lastUpdatedTimestamp<br><br>Type: dateTime
                <br /></td>
            <td id='s:ERL9CAPwBch;ERL9CAhxxdO' style='vertical-align: top;'>UTC date and time when the state was last updated in ISO 8601 format
                <br /></td>
        </tr>
    </tbody>
</table>

#### Type: constraint

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAFBFUi'>
            <td id='s:ERL9CAFBFUi;ERL9CAy7zLM' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Parameter
                <br /></td>
            <td id='s:ERL9CAFBFUi;ERL9CAOjvnB' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAUItYj'>
            <td id='s:ERL9CAUItYj;ERL9CAy7zLM' style='vertical-align: top; width: 30%;'>constraintId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAUItYj;ERL9CAOjvnB' style='vertical-align: top; width: 70%;'>Code for any Checkout Session constraint
                <br /></td>
        </tr>
        <tr id='ERL9CA6D5f8'>
            <td id='s:ERL9CA6D5f8;ERL9CAy7zLM' style='vertical-align: top;'>description<br><br>Type: string<br>
                <br /></td>
            <td id='s:ERL9CA6D5f8;ERL9CAOjvnB' style='vertical-align: top;'>Description of the Checkout Session constraint
                <br /></td>
        </tr>
    </tbody>
</table>

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAaRYIF'>
            <td id='s:ERL9CAaRYIF;ERL9CADFEFR' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Constraint Code
                <br /></td>
            <td id='s:ERL9CAaRYIF;ERL9CAhB19s' style='vertical-align: top; font-weight: bold; width: 70%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAt1p5S'>
            <td id='s:ERL9CAt1p5S;ERL9CADFEFR' style='vertical-align: top;'>CheckoutResultReturnUrlNotSet
                <br /></td>
            <td id='s:ERL9CAt1p5S;ERL9CAhB19s' style='vertical-align: top;'><code>checkoutResultReturnURL</code> has not been set on the Checkout Session
                <br /></td>
        </tr>
        <tr id='ERL9CAKGEaB'>
            <td id='s:ERL9CAKGEaB;ERL9CADFEFR' style='vertical-align: top;'>ChargeAmountNotSet
                <br /></td>
            <td id='s:ERL9CAKGEaB;ERL9CAhB19s' style='vertical-align: top;'><code>chargeAmount</code> has not been set on the Checkout Session
                <br /></td>
        </tr>
        <tr id='ERL9CAvPdOl'>
            <td id='s:ERL9CAvPdOl;ERL9CADFEFR' style='vertical-align: top;'>PaymentIntentNotSet
                <br /></td>
            <td id='s:ERL9CAvPdOl;ERL9CAhB19s' style='vertical-align: top;'><code>paymentIntent</code> has not been set on the Checkout Session
                <br /></td>
        </tr>
        <tr id='ERL9CARlmK7'>
            <td id='s:ERL9CARlmK7;ERL9CADFEFR' style='vertical-align: top;'>BuyerNotAssociated
                <br /></td>
            <td id='s:ERL9CARlmK7;ERL9CAhB19s' style='vertical-align: top;'>Buyer-preferred payment instrument or shipping address has not been set on the Checkout Session<br><br>
                <br /></td>
        </tr>
    </tbody>
</table>

### States and reason codes

<img src='https://m.media-amazon.com/images/G/01/EPSDocumentation/AmazonPay/Integration/CheckoutSessionStates._CB1565018489_.png' />

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAz0jIG'>
            <td id='s:ERL9CAz0jIG;ERL9CAyy2E1' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>State
                <br /></td>
            <td id='s:ERL9CAz0jIG;ERL9CADFSon' style='vertical-align: top; font-weight: bold; width: 40%;' class='bold'>Description
                <br /></td>
            <td id='s:ERL9CAz0jIG;ERL9CAEhfA5' style='vertical-align: top; font-weight: bold; width: 40%;' class='bold'>Reason code
                <br /></td>
        </tr>
        <tr id='ERL9CAYfTlD'>
            <td id='s:ERL9CAYfTlD;ERL9CAyy2E1' style='vertical-align: top;'>Open
                <br /></td>
            <td id='s:ERL9CAYfTlD;ERL9CADFSon' style='vertical-align: top;'>The initial Checkout Session state. Checkout Session state will return missing value constraints, until mandatory fields are provided by the merchant using Update Checkout Session. After all constraints have been removed, the merchant will redirect the buyer to the AmazonPayRedirectUrl to complete checkout. The Checkout Session state will then move to either Completed or Canceled state<br><br>Note that the Checkout Session will move to Canceled state if the buyer doesn't complete checkout within 24 hours<br><br>Allowed operation(s): <br>GET Checkout Session<br>UPDATE Checkout Session
                <br /></td>
            <td id='s:ERL9CAYfTlD;ERL9CAEhfA5' style='vertical-align: top;'>-
                <br /></td>
        </tr>
        <tr id='ERL9CAhrHuP'>
            <td id='s:ERL9CAhrHuP;ERL9CAyy2E1' style='vertical-align: top;'>Completed
                <br /></td>
            <td id='s:ERL9CAhrHuP;ERL9CADFSon' style='vertical-align: top;'>Checkout was successfully completed. The buyer was redirected to the <code>AmazonPayRedirectUrl</code> and payment intent was successfully completed. The Checkout Session can no longer be used to perform another payment, or retry a charge<br><br>Note: if you set <code>canHandlePendingAuthorization</code> to true, the Checkout Session state will be in a Completed state, even though the Authorization might later fail. See <a href="../amazon-pay-checkout/v1-asynchronous-processing.md">asynchronous processing</a> for more info<br><br>Allowed operation(s): <br>GET Checkout Session (will return Charge Permission ID, Charge ID, and other Checkout Session details).
                <br /></td>
            <td id='s:ERL9CAhrHuP;ERL9CAEhfA5' style='vertical-align: top;'>-
                <br /></td>
        </tr>
        <tr id='ERL9CA0bBHq'>
            <td id='s:ERL9CA0bBHq;ERL9CAyy2E1' style='vertical-align: top;'>Canceled
                <br /></td>
            <td id='s:ERL9CA0bBHq;ERL9CADFSon' style='vertical-align: top;'>Checkout was not successfully completed due to either buyer abandoment or payment decline. The payment intent was not successfully completed<br><br>Allowed operation(s): <br>GET CheckoutSession (will only return state and reasonCode)
                <br /></td>
            <td id='s:ERL9CA0bBHq;ERL9CAEhfA5' style='vertical-align: top;'><b>BuyerCanceled -</b> The buyer canceled the checkout by clicking the Return to previous page button<br><br><b>Expired - </b>The Checkout Session expired 24 hour after creation because there was no redirect to the amazonPayRedirectUrl or buyer did not complete payment<br><b><br>AmazonCanceled </b>- Amazon has canceled the transaction due to service unavailability. This is not a payment associated cancelation<br><br><b>Declined</b> - Generic payment decline reason code that includes fraud declines, failure to complete multi-factor authentication (MFA) challenge, and issues with the payment instrument
                <br /></td>
        </tr>
    </tbody>
</table>

### Operations

### Create Checkout Session

Create a new Amazon Pay Checkout Session to customize and manage the buyer experience, from when the buyer clicks the Amazon Pay button to when they complete checkout.

#### Request

```
curl "https://pay-api.amazon.com/:environment/:version/checkoutSessions/" \
-X POST
-H "x-amz-pay-idempotency-key: AVLo5tI10BHgEk2jEXAMPLEKEY"
-H "authorization: Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-d @request_body
```

#### Request body

```
{
    "webCheckoutDetail": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page"
    },
    "storeId": "amzn1.application-oa2-client.8b5e45312b5248b69eeaStoreId",
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPOBoxes"],
        "addressRestrictions": {
            "type": "Allowed",
            "restrictions": {
                "US": {
                    "statesOrRegions": ["WA"],
                    "zipCodes": ["95050", "93405"]
                },
                "GB": {
                    "zipCodes": ["72046", "72047"]
                },
                "IN": {
                    "statesOrRegions": ["AP"]
                },
                "JP": {}
            }
        }
    }
}  
```

#### Request parameters

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAO0JHD'>
            <td id='s:ERL9CAO0JHD;ERL9CA2r6qD' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Name
                <br /></td>
            <td id='s:ERL9CAO0JHD;ERL9CAZAZrc' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>Location
                <br /></td>
            <td id='s:ERL9CAO0JHD;ERL9CAoRgfP' style='vertical-align: top; font-weight: bold; width: 50%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAMViVA'>
            <td id='s:ERL9CAMViVA;ERL9CA2r6qD' style='vertical-align: top;'>x-amz-pay-idempotency-key<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAMViVA;ERL9CAZAZrc' style='vertical-align: top;'>Header
                <br /></td>
            <td id='s:ERL9CAMViVA;ERL9CAoRgfP' style='vertical-align: top;'><a href="../amazon-pay-api-v2/v1-idempotency.md">Idempotency key</a> to safely retry requests
                <br /></td>
        </tr>
        <tr id='ERL9CAvm2Or'>
            <td id='s:ERL9CAvm2Or;ERL9CAFccoh' style='vertical-align: top;'>webCheckoutDetail<br><b>(required)</b><br><br>Type: <a href="#type-webcheckoutdetail">webCheckoutDetail</a>
                <br /></td>
            <td id='s:ERL9CAvm2Or;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAvm2Or;ERL9CAxmCJ7' style='vertical-align: top;'>Checkout result URL provided by the merchant. Amazon Pay will redirect to this URL after completing the transaction<br><br>Modifiable: Multiple times before the buyer is redirected to the amazonPayReturnUrl
                <br /></td>
        </tr>
        <tr id='ERL9CAVOprL'>
            <td id='s:ERL9CAVOprL;ERL9CA2r6qD' style='vertical-align: top;'>storeId<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAVOprL;ERL9CAZAZrc' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAVOprL;ERL9CAoRgfP' style='vertical-align: top;'>Login with Amazon client ID. Do not use the application ID<br><br>Retrieve this value from "Login with Amazon" in <a href="https://sellercentral.amazon.com">Seller Central</a>
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>deliverySpecifications<br /><br />Type: <a href="../amazon-pay-api-v2/v1-checkout-session.md#type-deliveryspecifications">deliverySpecifications</a>
                <br /></td>
            <td id='' style='text-align: left;vertical-align: top;'>Body
                <br /></td>
            <td id='' style='vertical-align: top;'>Specify shipping restrictions and limit which addresses your buyer can select from their Amazon address book
                <br /></td>
        </tr>
        <tr id='ERL9CAgQ4T4'>
            <td id='s:ERL9CAgQ4T4;ERL9CAFccoh' style='vertical-align: top;'>paymentDetail<br><br>Type: <a href="#type-paymentdetail">paymentDetail</a>
                <br /></td>
            <td id='s:ERL9CAgQ4T4;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAgQ4T4;ERL9CAxmCJ7' style='vertical-align: top;'>Payment details specified by the merchant such as the amount and method for charging the buyer<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>
                <br /></td>
        </tr>
        <tr id='ERL9CA6JHj6'>
            <td id='s:ERL9CA6JHj6;ERL9CAFccoh' style='vertical-align: top;'>merchantMetadata<br><br>Type: <a href="#type-merchantmetadata">merchantMetadata</a>
                <br /></td>
            <td id='s:ERL9CA6JHj6;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA6JHj6;ERL9CAxmCJ7' style='vertical-align: top;'>External order details provided by the merchant<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>
                <br /></td>
        </tr>
        <tr id='ERL9CA7OsPD'>
            <td id='s:ERL9CA7OsPD;ERL9CAFccoh' style='vertical-align: top;'>platformId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA7OsPD;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA7OsPD;ERL9CAxmCJ7' style='vertical-align: top;'>Merchant identifier of the Solution Provider (SP). <br><br>Only SPs should use this field.<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>.
                <br /></td>
        </tr>
        <tr id=''>
            <td id='' style='vertical-align: top;'>providerMetadata<br><br>Type: <a href="#type-providermetadata">providerMetadata</a>
                <br /></td>
            <td id='' style='vertical-align: top;'>Body
                <br /></td>
            <td id='' style='vertical-align: top;'>Payment service provider (PSP)-provided order details<br><br>Only PSPs should use these fields
                <br /></td>
        </tr>
        
    </tbody>
</table>

#### Response

Returns <a href="https://restfulapi.net/http-status-201-created/" target="_blank" rel="noopener noreferrer">HTTP 201 (Created) status</a> if the operation was successful. Subsequent retry attempts using the same [Idempotency Key](../amazon-pay-api-v2/v1-idempotency.html) may return a <a href="https://restfulapi.net/http-status-200-ok" target="_blank" rel="noopener noreferrer">HTTP 200 (OK) status</a> if a new resource is not created.

```
{
    "checkoutSessionId": "bd504926-f659-4ad7-a1a9-9a747aaf5275",
    "webCheckoutDetail": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page",
        "checkoutResultReturnUrl": null,
        "amazonPayRedirectUrl": null
    },
    "productType": "PayAndShip",
    "paymentDetail": {
        "paymentIntent": null,
        "canHandlePendingAuthorization":false,
        "chargeAmount": null,
        "softDescriptor": null,
        "presentmentCurrency": "USD"
    },
    "merchantMetadata": {
        "merchantReferenceId": null,
        "merchantStoreName": null,
        "noteToBuyer": null,
        "customInformation": null
    },
    "supplementaryData": null, // Amazon Pay system data
    "buyer": null,
    "paymentPreferences": [
        null
    ],
    "statusDetail": {
        "state": "Open",
        "reasonCode": null,
        "reasonDescription": null,
        "lastUpdatedTimestamp": "20191015T204327Z"
    },
    "shippingAddress": null,  // Null for PayOnly product type
    "platformId": null,
    "chargePermissionId": null,
    "chargeId": null,
    "constraints": [
        {
           "constraintId": "BuyerNotAssociated",
            "description": "There is no buyer associated with the Checkout Session. Return the checkout session id to the Amazon Pay Button to allow buyer to login."
        },
        {
           "constraintId": "ChargeAmountNotSet",
            "description": "chargeAmount is not set."
        },
        {
            "constraintId": "CheckoutResultReturnUrlNotSet",
            "description": "checkoutResultReturnUrl is not set."
        },
        {
            "constraintId": "PaymentIntentNotSet",
            "description": "paymentIntent is not set."
        }
    ],
    "creationTimestamp": "20191015T204313Z",
    "expirationTimestamp": "20191016T204313Z",
    "storeId": "amzn1.application-oa2-client.8b5e45312b5248b69eeaStoreId",
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPOBoxes"],
        "addressRestrictions": {
            "type": "Allowed",
            "restrictions": {
                "US": {
                    "statesOrRegions": ["WA"],
                    "zipCodes": ["95050", "93405"]
                },
                "GB": {
                    "zipCodes": ["72046", "72047"]
                },
                "IN": {
                    "statesOrRegions": ["AP"]
                },
                "JP": {}
            }
        }
    },
    "providerMetadata": {
        "providerReferenceId": null
    },
    "checkoutButtonText": null,
    "releaseEnvironment": "Sandbox"
}
```

#### Error codes

Generic errors can be found [here](../amazon-pay-api-v2/v1-error-handling.html). 

### Get Checkout Session

Get Checkout Session details includes buyer info, payment instrument details, and shipping address. Shipping address will only be returned if Checkout Session has PayAndShip product type. Use this operation to determine if checkout was successful after the buyer returns from the `AmazonPayRedirectUrl` to the specified `checkoutResultReturnUrl`.

#### Request

```
curl "https://pay-api.amazon.com/:environment/:version/checkoutSessions/:checkoutSessionId"
-X GET
-H "authorization: Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
```

#### Request parameters

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAVsuDr'>
            <td id='s:ERL9CAVsuDr;ERL9CAdoMUq' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Name
                <br /></td>
            <td id='s:ERL9CAVsuDr;ERL9CAoJhYx' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>Location
                <br /></td>
            <td id='s:ERL9CAVsuDr;ERL9CA4xLvY' style='vertical-align: top; font-weight: bold; width: 50%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAmASXg'>
            <td id='s:ERL9CAmASXg;ERL9CAdoMUq' style='vertical-align: top;'>CheckoutSessionId<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:ERL9CAmASXg;ERL9CAoJhYx' style='vertical-align: top;'>Path Parameter
                <br /></td>
            <td id='s:ERL9CAmASXg;ERL9CA4xLvY' style='vertical-align: top;'>Checkout session identifier
                <br /></td>
        </tr>
    </tbody>
</table>

#### Response

Returns <a href="https://restfulapi.net/http-status-200-ok" target="_blank" rel="noopener noreferrer">HTTP 200 (OK) status</a> if the operation was successful.

```
{
    "checkoutSessionId": "bd504926-f659-4ad7-a1a9-9a747aaf5275",
    "webCheckoutDetail": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page",
        "checkoutResultReturnUrl": null,
        "amazonPayRedirectUrl": null
    },
    "productType": "PayAndShip",
    "paymentDetail": {
        "paymentIntent": null,
        "canHandlePendingAuthorization": false,
        "chargeAmount": null,
        "softDescriptor": null,
        "presentmentCurrency": "USD"
    },
    "merchantMetadata": {
        "merchantReferenceId": null,
        "merchantStoreName": null,
        "noteToBuyer": null,
        "customInformation": null
    },
    "supplementaryData":null, // Amazon Pay system data
    "buyer": {
        "buyerId": "amzn1.account.AH34VHFHHYL4YMBuyerId",
        "name": "name-1",
        "email": "name@amazon.com"
    },
    "paymentPreferences": [
        {
            "paymentDescriptor": "Visa ****1111 (Amazon Pay)",
            "billingAddress":{ // Only available in EU or for PayOnly product type
                "name": "Work",
                "addressLine1": "440 Terry Ave",
                "addressLine2": "",
                "addressLine3": "",
                "city": "Seattle",
                "county": "King",    
                "district": "Seattle",
                "stateOrRegion": "WA",
                "postalCode": "98121",
                "countryCode": "US"
            }
        }
    ],
    "statusDetail": {
        "state": "Open",
        "reasonCode": null,
        "reasonDescription": null,
        "lastUpdatedTimestamp": "20191015T204327Z"
    },
    "shippingAddress": {  // Null for PayOnly product type
        "name": "Susie Smith",
        "addressLine1": "10 Ditka Ave",
        "addressLine2": "Suite 2500",
        "addressLine3": null,
        "city": "Chicago",
        "county": null,
        "district": null,
        "stateOrRegion": "IL",
        "postalCode": "60602",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    },
    "platformId": null,
    "chargePermissionId": null,
    "chargeId": null,
    "constraints": [
        {
            "constraintId": "ChargeAmountNotSet",
            "description": "chargeAmount is not set."
        },
        {
            "constraintId": "CheckoutResultReturnUrlNotSet",
            "description": "checkoutResultReturnUrl is not set."
        },
        {
            "constraintId": "PaymentIntentNotSet",
            "description": "paymentIntent is not set."
        }
    ],
    "creationTimestamp": "20191015T204313Z",
    "expirationTimestamp": "20191016T204313Z",
    "storeId": "amzn1.application-oa2-client.8b5e45312b5248b69eeaStoreId",
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPOBoxes"],
        "addressRestrictions": {
            "type": "Allowed",
            "restrictions": {
                "US": {
                    "statesOrRegions": ["WA"],
                    "zipCodes": ["95050", "93405"]
                },
                "GB": {
                    "zipCodes": ["72046", "72047"]
                },
                "IN": {
                    "statesOrRegions": ["AP"]
                },
                "JP": {}
          }
        }
    },
    "providerMetadata": {
        "providerReferenceId": null
    },
    "checkoutButtonText": null,
    "releaseEnvironment": "Sandbox"
}
```

#### Error codes

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CA3tCf3'>
            <td id='s:ERL9CA3tCf3;ERL9CACltB2' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>HTTP status code
                <br /></td>
            <td id='s:ERL9CA3tCf3;ERL9CAzkjOM' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>Reason code
                <br /></td>
            <td id='s:ERL9CA3tCf3;ERL9CAbhh9x' style='vertical-align: top; font-weight: bold; width: 50%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CAtHu1q'>
            <td id='s:ERL9CAtHu1q;ERL9CACltB2' style='vertical-align: top;'><br>404 NOT_FOUND
                <br /></td>
            <td id='s:ERL9CAtHu1q;ERL9CAzkjOM' style='vertical-align: top;'><br>ResourceNotFound
                <br /></td>
            <td id='s:ERL9CAtHu1q;ERL9CAbhh9x' style='vertical-align: top;'>Checkout Session details are permanently deleted after 30 days. Any request on the Checkout Session will return this error code
                <br /></td>
        </tr>
    </tbody>
</table>

Generic errors can be found [here](../amazon-pay-api-v2/v1-error-handling.html). 

### Update Checkout Session

Update the Checkout Session with transaction details. You can keep updating the Checkout Session, as long as it’s in an Open state. Once all mandatory parameters have been set, the Checkout Session object will respond with an unique `amazonPayRedirectUrl` that you will use to redirect the buyer to complete checkout.

#### Request

```
curl "https://pay-api.amazon.com/:environment/:version/checkoutSessions/:checkoutSessionId" \
-X PATCH
-H "x-amz-pay-authorization: Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE"
-d @request_body
```

#### Request body

```
{
    "webCheckoutDetail": {
        "checkoutResultReturnUrl": "https://a.com/merchant-confirm-page"
    },
    "paymentDetail": {
        "paymentIntent": "Authorize",
        "canHandlePendingAuthorization": false,
        "chargeAmount": {
            "amount": "1",
            "currencyCode": "USD"
        }
     },
    "merchantMetadata": {
        "merchantReferenceId": "Merchant reference ID",
        "merchantStoreName": "Merchant store name",
        "noteToBuyer": "Note to buyer",
        "customInformation": "Custom information"
    },
    "platformId": "SPId"
}
```



#### Request parameters

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CAipzsl'>
            <td id='s:ERL9CAipzsl;ERL9CAFccoh' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>Name
                <br /></td>
            <td id='s:ERL9CAipzsl;ERL9CAjQdu4' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>Location
                <br /></td>
            <td id='s:ERL9CAipzsl;ERL9CAxmCJ7' style='vertical-align: top; font-weight: bold; width: 50%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CA4LMaA'>
            <td id='s:ERL9CA4LMaA;ERL9CAFccoh' style='vertical-align: top;'>checkoutSessionId<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAjQdu4' style='vertical-align: top;'>Path parameter
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAxmCJ7' style='vertical-align: top;'>Checkout Session identifier
                <br /></td>
        </tr>
        <tr id='ERL9CAvm2Or'>
            <td id='s:ERL9CAvm2Or;ERL9CAFccoh' style='vertical-align: top;'>webCheckoutDetail<br><br>Type: <a href="#type-webcheckoutdetail">webCheckoutDetail</a>
                <br /></td>
            <td id='s:ERL9CAvm2Or;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAvm2Or;ERL9CAxmCJ7' style='vertical-align: top;'>Checkout result URL provided by the merchant. Amazon Pay will redirect to this URL after completing the transaction<br><br>Modifiable: Multiple times before the buyer is redirected to the amazonPayReturnUrl
                <br /></td>
        </tr>
        <tr id='ERL9CAgQ4T4'>
            <td id='s:ERL9CAgQ4T4;ERL9CAFccoh' style='vertical-align: top;'>paymentDetail<br><br>Type: <a href="#type-paymentdetail">paymentDetail</a>
                <br /></td>
            <td id='s:ERL9CAgQ4T4;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAgQ4T4;ERL9CAxmCJ7' style='vertical-align: top;'>Payment details specified by the merchant such as the amount and method for charging the buyer<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>
                <br /></td>
        </tr>
        <tr id='ERL9CA6JHj6'>
            <td id='s:ERL9CA6JHj6;ERL9CAFccoh' style='vertical-align: top;'>merchantMetadata<br><br>Type: <a href="#type-merchantmetadata">merchantMetadata</a>
                <br /></td>
            <td id='s:ERL9CA6JHj6;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA6JHj6;ERL9CAxmCJ7' style='vertical-align: top;'>External order details provided by the merchant<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>
                <br /></td>
        </tr>
        <tr id='ERL9CA7OsPD'>
            <td id='s:ERL9CA7OsPD;ERL9CAFccoh' style='vertical-align: top;'>platformId<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA7OsPD;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA7OsPD;ERL9CAxmCJ7' style='vertical-align: top;'>Merchant identifier of the Solution Provider (SP). <br><br>Only SPs should use this field.<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>.
                <br /></td>
        </tr>
        <tr id='ERL9CAuzzTA'>
            <td id='s:ERL9CAuzzTA;ERL9CAFccoh' style='vertical-align: top;'>providerMetadata<br><br>Type: <a href="#type-providermetadata">providerMetadata</a>
                <br /></td>
            <td id='s:ERL9CAuzzTA;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAuzzTA;ERL9CAxmCJ7' style='vertical-align: top;'>Transaction identifier created by the Payment Service Provider (PSP)<br><br>Only PSPs should use these fields<br><br>Modifiable: Multiple times before the buyer is redirected to the <code>amazonPayReturnUrl</code>
                <br /></td>
        </tr>
    </tbody>
</table>

#### Response

Returns <a href="https://restfulapi.net/http-status-200-ok" target="_blank" rel="noopener noreferrer">HTTP 200 (OK) status</a> if the operation was successful.

```
{
    "checkoutSessionId": "ada3f397-7d4b-4a55-abac-786685c02d8b",
    "webCheckoutDetail": {
        "checkoutReviewReturnUrl": "https://a.com/merchant-review-page",
        "checkoutResultReturnUrl": "https://a.com/merchant-confirm-page",
        "amazonPayRedirectUrl": "https://pay.amazon.com/redirect/checkoutId-1"
    },
    "productType": "PayAndShip",
    "paymentDetail": {
        "paymentIntent": "Authorize",
        "canHandlePendingAuthorization":false,
        "chargeAmount": {
            "amount": "1",
            "currencyCode": "USD"
        },
        "softDescriptor": null,
        "presentmentCurrency": "USD"
    },
    "merchantMetadata": {
        "merchantReferenceId": "Merchant reference ID",
        "merchantStoreName": "Merchant store name",
        "noteToBuyer": "Note to buyer",
        "customInformation": "Custom information"
    },
    "supplementaryData": null, // Amazon Pay system data 
    "buyer": {
        "buyerId": "amzn1.account.AH34VHFHHYL4YMBuyerId",
        "name": "name-1",
        "email": "name@amazon.com"
    },
    "paymentPreferences": [
        {
            "paymentDescriptor": "Visa ****1111 (Amazon Pay)",
            "billingAddress":{  // Only available in EU or for PayOnly product type
                "name": "Work",
                "addressLine1": "440 Terry Ave",
                "addressLine2": "",
                "addressLine3": "",
                "city": "Seattle",
                "county": "King",    
                "district": "Seattle",
                "stateOrRegion": "WA",
                "postalCode": "98121",
                "countryCode": "US"
            }
        }
    ],
    "statusDetail": {
        "state": "Open",
        "reasonCode": null,
        "reasonDescription": null,
        "lastUpdatedTimestamp": "20191015T195703Z"
    },
    "shippingAddress": {  // Null for PayOnly product type
        "name": "Susie Smith",
        "addressLine1": "10 Ditka Ave",
        "addressLine2": "Suite 2500",
        "addressLine3": null,
        "city": "Chicago",
        "county": null,
        "district": null,
        "stateOrRegion": "IL",
        "postalCode": "60602",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    },
    "platformId": "AEMGQX8TKDO54",
    "chargePermissionId": null,
    "chargeId": null,
    "constraints": [],
    "creationTimestamp": "20191015T195655Z",
    "expirationTimestamp": "20191016T195655Z",
    "storeId": "amzn1.application-oa2-client.8b5e45312b5248b69eeaStoreId",
    "deliverySpecifications": {
        "specialRestrictions": ["RestrictPOBoxes"],
        "addressRestrictions": {
            "type": "Allowed",
            "restrictions": {
                "US": {
                    "statesOrRegions": ["WA"],
                    "zipCodes": ["95050", "93405"]
                },
                "GB": {
                    "zipCodes": ["72046", "72047"]
                },
                "IN": {
                    "statesOrRegions": ["AP"]
                },
                "JP": {}
            }
        }
    },
    "providerMetadata": {
        "providerReferenceId": null
    },
    "checkoutButtonText": null,
    "releaseEnvironment": "Sandbox"
}
```

#### Error codes 

<table width="100%" border="1">
    <tbody>
        <tr id='ERL9CA9q0ob'>
            <td id='s:ERL9CA9q0ob;ERL9CADTh10' style='vertical-align: top; font-weight: bold; width: 30%;' class='bold'>HTTP status code
                <br /></td>
            <td id='s:ERL9CA9q0ob;ERL9CAq22MQ' style='vertical-align: top; font-weight: bold; width: 20%;' class='bold'>Reason code
                <br /></td>
            <td id='s:ERL9CA9q0ob;ERL9CAFbHzY' style='vertical-align: top; font-weight: bold; width: 50%;' class='bold'>Description
                <br /></td>
        </tr>
        <tr id='ERL9CASmvZN'>
            <td id='s:ERL9CASmvZN;ERL9CADTh10' style='vertical-align: top;'><br>404 NOT_FOUND
                <br /></td>
            <td id='s:ERL9CASmvZN;ERL9CAq22MQ' style='vertical-align: top;'><br>ResourceNotFound
                <br /></td>
            <td id='s:ERL9CASmvZN;ERL9CAFbHzY' style='vertical-align: top;'>Checkout Session details are permanently deleted after 30 days. Any request on the Checkout Session will return this error code
                <br /></td>
        </tr>
        <tr id='ERL9CA7wecp'>
            <td id='s:ERL9CA7wecp;ERL9CADTh10' style='vertical-align: top;'><br>422 UNPROCESSABLE_ENTITY
                <br /></td>
            <td id='s:ERL9CA7wecp;ERL9CAq22MQ' style='vertical-align: top;'>InvalidCheckoutSessionStatus
                <br /></td>
            <td id='s:ERL9CA7wecp;ERL9CAFbHzY' style='vertical-align: top;'>You tried to call an operation on a Checkout Session that is in a state where that operation is not allowed
                <br /></td>
        </tr>
    </tbody>
</table>

Generic errors can be found [here](../amazon-pay-api-v2/v1-error-handling.html). 

### Related topics

* [Charge permission object](../amazon-pay-api-v2/v1-charge-permission.html)
* [Charge object](../amazon-pay-api-v2/v1-charge.html)




