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> ## Successful Response (200) If a checkout belonging to the authenticated merchant account is found, returns the checkout details in response. 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. | Attribute | Type | Description | | :------------------------------ | :---------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `token` | string | Checkout token to be used to complete payment. | | `expires` | string | The UTC timestamp of when the checkout token will expire, in [ISO 8601](http://www.iso.org/iso/home/standards/iso8601.htm) format. | | `redirectCheckoutUrl` | string | 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](/javascript-afterpayjs). | | `amount` | [Money](/money-object) | Total amount to be charged to consumer. | | `consumer` | [Consumer](/consumer-object) | The consumer requesting the order. | | `billing` | [Contact](/contact-object) | Billing address. | | `shipping` | [Contact](/contact-object) | Shipping address. | | `courier` | [Shipping Courier](/shipping-courier-object) | Shipping courier details. | | `description` | string | A description of the order. | | `merchant`.`redirectConfirmUrl` | string | The consumer is redirected to this URL on confirmation. | | `merchant`.`redirectCancelUrl` | string | The consumer to redirected to this URL if the payment process is cancelled. | | `merchantReference` | string | The merchant's id/reference that this order corresponds to. | | `items` | [Item](/item-object)\[] | An array of order items. | | `discounts` | [Discount](/discount-object)\[] | An array of discounts. | | `shippingAmount` | [Money](/money-object) | The shipping amount. | | `taxAmount` | [Money](/money-object) | The included tax amount after applying all discounts. | | `shippingOptions` | string | Shipping option details. | ## 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