Clearpay Buttongetting-started-clearpay-button

Order Management

This section describes how to update an Clearpay Button order.

Update The Merchant Reference

If you do not have an order number (merchantReference), at the time of launching the Clearpay Button, use the below endpoint when the order is completed.

Using the authToken and token received from the onComplete function, make a PUT request containing the new merchantReference

This call can be made from the front-end or from a back-end service. Use the following URL:

https://api-plus.eu-sandbox.afterpay.com/v3/button (Sandbox test environment)

https://api-plus.eu.afterpay.com/v3/button (Production environment)

1{
2 "authToken": "cbce234de1fbca534568904dd31..",
3 "token": "001.12321312312321",
4 "merchantReference": "newMerchantReference"
5}
Beware

Make this call within 3 hours (180 minutes) of the customer completing the Clearpay checkout flow.

Error Codes

Error CodehttpStatusCodeDescription
invalid_object422One or more required fields were missing or invalid.
auth_token_malformed412The auth_token was invalid.
too_many_requests429The customer has been rate limited.
Unauthorized401The authToken has expired.

Return to the Clearpay Button guide menu