🚧

The Readme API Simulator includes form elements for both required and optional Body Params. If not populated with values, Readme will send empty strings to the Afterpay Online API. Any optional parameter that is validated against a Model will need to have all of its required sub-params populated with non-empty values.

Therefore, to avoid receiving unexpected "400" responses from Afterpay, please fill out all fields of the simulation form with valid values. This is particularly important for the amount and currency sub-params of the amount, taxAmount and shippingAmount params.

Successful Response (201)

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

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
Unprocessable Entity
invalid_objectOne or more required fields were missing or invalid.
422
Unprocessable Entity
unsupported_payment_typeThe amount is outside of the merchant's payment limits, as returned by Get Configuration.
422
Unprocessable Entity
unsupported_currencyOne or more Money objects may have contained a currency that differs from the merchant's account currency.
Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!