Ti ringraziamo per la visita. Questa pagina è per il momento disponibile solo in inglese.

Verify & complete checkout

[Step 3 of 7] The buyer is redirected to signInReturnUrl and Amazon Pay will only provide the checkoutSessionId required to retrieve buyer details after the buyer signs in. It will be appended to the signInReturnUrl as a query parameter and expires after 24 hours.

In this step, you will use the checkout session ID to confirm that the buyer has successfully returned to your site. At the end of this step, you will be able to present the buyer with the checkout result.


1. Complete Checkout Session

Use Complete Checkout Session to confirm that the buyer has successfully returned to your site.

Important:

  1. Retrieve Buyer Details, including buyerId and other buyer information requested in signInScopes
  2. If no signInScopes are set, we will return name, email by default

Note:

  1. Amazon Pay will not finalize the Saved Wallet setup until you confirm checkout with Complete Checkout Session. Any Checkout Session that is not confirmed within 24 hours will be cancelled.

Successful response:

Complete Checkout Session will return a success response if the setup was processed successfully.

Error response:

Complete Checkout Session will return an error response for failed transactions. The buyer either canceled checkout or was unable to provide a valid payment instrument. You should:

  1. Redirect the buyer to the start of checkout
  2. Display a message such as: "Your request to save Amazon Pay as a payment method was not successful. Please try again.“

Request

Request body

{ }

Request parameters

Name
Location
Description
checkoutSessionId
(required)

Type: string
Path parameter
Checkout Session identifier

Response

Returns HTTP 200 status response code if setup was successful

{
    "checkoutSessionId": "bd504926-f659-4ad7-a1a9-9a747aaf5275",
    "webCheckoutDetails": null,
    "chargePermissionType": "PaymentMethodOnFile", 
    "paymentMethodOnFileMetadata": null,
    "productType": null,
    "paymentDetails": null,
    "merchantMetadata": null,
    "supplementaryData":null,
    "buyer": {
        "buyerId": "buyerId",
        "name": "name-1",
        "email": "name@amazon.com",
        "phoneNumber": "800-000-0000",
        "primeMembershipTypes": null
    },
    "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"
    },
    "statusDetails": {
        "state": "Completed",
        "reasonCode": null,
        "reasonDescription": null,
        "lastUpdatedTimestamp":"20191015T204327Z"
    },
    "shippingAddress": {
        "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": "B01-xxxxxxx-xxxxxxx",
    "chargeId":null,
    "constraints": null,
    "creationTimestamp":"20191015T204313Z",
    "expirationTimestamp": null,
    "storeId": null,
    "deliverySpecifications": null,
    "providerMetadata": null,
    "releaseEnvironment": null
}