Cookie Consent by Free Privacy Policy Generator Update cookies preferences

🚧

Warning

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 Clearpay 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 Clearpay, 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 totalAmount, taxAmount and shippingAmount params.

This endpoint creates an order 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 and expiry date/time if successful.

AttributeTypeDescription
expiresstringThe UTC timestamp of when the order token will expire, in ISO 8601 format.
tokenstringOrder token to be used to complete payment.

📘

Note

It is not possible to update the order information (including totalAmount) after the order token is generated.

If the consumer's cart changes on the merchant side after a token is generated, please discard this token. Use the current order information to generate a new order token. Use the new token to send the consumer through the Clearpay screenflow before attempting to Capture Payment.

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 Order:

HTTP Status CodeerrorCodeDescription
422
Unprocessable Entity
unsupported_payment_typeThe totalAmount is outside of the merchant's payment range for Clearpay, as returned by Get Configuration.
422
Unprocessable Entity
unsupported_currencyOne or more Money objects contained a currency that differs from the merchant's account currency.
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!