---
title: Finalize Checkout Session
url: mobile-app/finalize-checkout-session.html
---

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

For MSDK EoC flow, the request of finalizeCS API will be: CSId + merchant’s button params.
The response will be normal finalizeCS + paymentDetails, billingAddress, and buyerDetails.

### Request

<code style="color:black">
curl "https://pay-api.amazon.com/:version/checkoutSessions/:checkoutSessionId/finalize" \ <br />
-X POST <br />
-H "authorization:Px2e5oHhQZ88vVhc0DO%2FsShHj8MDDg%3DEXAMPLESIGNATURE" <br />
-H "x-amz-pay-date:20201012T235046Z" <br />
-d @request_body
</code>

### Request body

```
{
    "shippingAddress": {
        "name": "Susy S",
        "addressLine1": "11 Ditka Ave",
        "addressLine2": "Suite 2500",
        "city": "Chicago",
        "county": null,
        "district": null,
        "stateOrRegion": "IL",
        "postalCode": "60602",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    },
    {
    "chargeAmount": {
        "amount": "14",
        "currencyCode": "USD"
    },
    "paymentIntent": "AuthorizeWithCapture",
    "canHandlePendingAuthorization": "false"
}
```

### 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='ERL9CA4LMaA'>
            <td id='s:ERL9CA4LMaA;ERL9CAFccoh' style='vertical-align: top;'>paymentIntent<br><b>(required)</b><br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAxmCJ7' style='vertical-align: top;'>Payment flow for charging the buyer
                <br /></td>
        </tr>
        <tr id='ERL9CAvm2Or'>
            <td id='s:ERL9CAvm2Or;ERL9CAFccoh' style='vertical-align: top;'>chargeAmount<br><b>(required)</b><br><br>Type: <a href="../amazon-pay-api-v2/checkout-session.md#type-price" target="_blank" rel="noopener noreferrer">price</a>
                <br /></td>
            <td id='s:ERL9CAvm2Or;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CAvm2Or;ERL9CAxmCJ7' style='vertical-align: top;'>Amount to be processed using <code>paymentIntent</code> during checkout. Must match Checkout Session object <code>paymentDetails.chargeAmount</code>
                <br /></td>
        </tr>
        <tr id='ERL9CA4LMaA'>
            <td id='s:ERL9CA4LMaA;ERL9CAFccoh' style='vertical-align: top;'>canHandlePendingAuthorization<br><br>Type: boolean
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <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='ERL9CA4LMaA'>
            <td id='s:ERL9CA4LMaA;ERL9CAFccoh' style='vertical-align: top;'>shippingAddress<br><b>(required*)</b><br><br>Type: <a href="../amazon-pay-api-v2/checkout-session.md#type-address">address</a>
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAxmCJ7' style='vertical-align: top;'>Shipping address provided by Amazon for validation
                <br /><br /><b>*required</b> for `PayAndShip` use cases</td>
        </tr>
        <tr id='ERL9CA4LMaA'>
            <td id='s:ERL9CA4LMaA;ERL9CAFccoh' style='vertical-align: top;'>supplementaryData<br><br>Type: string
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAjQdu4' style='vertical-align: top;'>Body
                <br /></td>
            <td id='s:ERL9CA4LMaA;ERL9CAxmCJ7' style='vertical-align: top;'>Supplementary data about your order
                <br /></td>
        </tr>
    </tbody>
</table>


### Response

Returns HTTP 200 status response code if `paymentIntent` was successful. Returns HTTP 202 status response code if authorization is still pending.

```
{
    "checkoutSessionId": "bd504926-f659-4ad7-a1a9-9a747aaf5275",
    "webCheckoutDetails": null,
    "chargePermissionType": "OneTime",   
    "recurringMetadata": null,
    "productType": null,
    "paymentDetails": null,
    "merchantMetadata": null,
    "supplementaryData":null, // Amazon Pay system data 
    "billingAddress": {
        "name": "Work",
        "addressLine1": "440 Terry Ave",
        "addressLine2": "",
        "addressLine3": "",
        "city": "Seattle",
        "county": "King",
        "district": "Seattle",
        "stateOrRegion": "WA",
        "postalCode": "98121",
        "countryCode": "US",
        "phoneNumber": "800-000-0000"
    },
    "paymentDescriptor": "Amazon Pay Visa (1111)",
    "buyer": {
        "buyerId": "buyerId",
        "name": "name-1",
        "email": "name@amazon.com",
        "phoneNumber": "800-000-0000"
    },
    "paymentPreferences": [
        null
    ],
    "statusDetails": {
        "state": "Completed",
        "reasonCode": null,
        "reasonDescription": null,
        "lastUpdatedTimestamp": "20191015T204327Z"
    },
    "shippingAddress": null,
    "platformId":null,
    "chargePermissionId": "S01-5105180-3221187",
    "chargeId": "S01-5105180-3221187-C056351",
    "constraints": [
        null
    ],
    "creationTimestamp": "20191015T204313Z",
    "expirationTimestamp": null,
    "storeId": null,
    "deliverySpecifications": null,
    "providerMetadata": null,
    "checkoutButtonText": null,
    "releaseEnvironment": null
}
```