Get Checkout

This endpoint retrieves an incomplete individual checkout by token. <Note title="Note"> Checkout details are only retained in this temporary format for up to 60 minutes. If a checkout token expires or has an order created against it, it can no longer be retrieved from this endpoint. To retrieve a [Payment](/payment-object) record (Clearpay Order) along with its associated checkout details, see [Get Payment By Token](/api-reference/online-api/order-management/get-payment-by-token). </Note> <Note title="Note"> Fields that were not included in the original [Create Checkout](/api-reference/online-api/checkouts/create-checkout) request may not be included in any corresponding Get Checkout response. </Note> ## Connection Timeouts | Timeout | Time (Seconds) | | :------ | :------------- | | Open | 10 | | Read | 20 | ## Errors In addition to the [GET Errors](/get-errors) applicable to all GET endpoints, the following errors are specific to Get Checkout: | HTTP Status Code | errorCode | Description | | :-- | :-- | :-- | | **404** <br />Not Found | `not_found` | No checkout token was provided. | | **412** <br />Precondition Failed | `invalid_token` | The checkout token is invalid, expired, completed, or does not exist. |

Authentication

AuthorizationBasic

Basic authentication of the form Basic <username:password>.

Path Parameters

tokenstringRequired
The token of the checkout to be retrieved.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Response

Get Checkout Response
tokenstring
Checkout token to be used to complete payment.
expiresstring
The UTC timestamp of when the checkout token will expire, in ISO 8601 format.
redirectCheckoutUrlstring
A URL that can be used to redirect the consumer to the Clearpay screenflow directly from the merchant backend. This can be used as an alternative to implementing the JavaScript afterpay.js.
amountobject or null
Total amount to be charged to consumer.
consumerobject or null
The consumer requesting the order.
billingobject or null
Billing address.
shippingobject or null
Shipping address.
courierobject or null
Shipping courier details.
descriptionstring or null
A description of the order.
merchantobject or null
Merchant configuration details.
modeenum or null

Must be set to express to enable express checkout.

Allowed values:
merchantReferencestring or null

The merchant’s id/reference that this order corresponds to.

itemslist of objects or null
An array of order items.
discountslist of objects or null
An array of discounts.
shippingAmountobject or null
The shipping amount.
taxAmountobject or null
The included tax amount after applying all discounts.
shippingOptionsobject or null
Shipping option details.

Errors