Create Checkout [Express Checkout]

This endpoint creates a checkout that is used to initiate the Clearpay payment process. Clearpay uses the information in the order request to assist with the consumer’s pre-approval process.

Successful Response (201)

Returns a token, expiry date/time and checkout URL if successful.

AttributeTypeDescription
tokenstringCheckout token to be used to complete payment.
expiresstringThe UTC timestamp of when the checkout token will expire, in ISO 8601 format.
redirectCheckoutUrlstringA 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.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read20

Errors

In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Create Checkout:

HTTP Status CodeerrorCodeDescription
422 <br />Unprocessable Entityinvalid_objectOne or more required fields were missing or invalid.
422 <br />Unprocessable Entityunsupported_payment_typeThe amount is outside of the merchant's payment limits, as returned by Get Configuration.
422 <br />Unprocessable Entityunsupported_currencyOne or more Money objects may have contained a currency that differs from the merchant's account currency.
post/v2/checkouts/

Request

  • Base URL: https://global-api-sandbox.afterpay.com
  • URL: https://global-api-sandbox.afterpay.com/v2/checkouts/
  • Auth: HTTP basic

Headers

User-Agentstring required
Acceptstring

Request body

mode'express' | 'standard' required

Must be set to express to enable express checkout.

Response

200

tokenstring
expiresstring
redirectCheckoutUrlstring

Changes

No recorded changes to this operation across all 1 revision of this API.