For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Foundations
    • Introduction
    • Request Headers
    • User-Agent Header
    • Authentication
    • Errors
    • Data Requirements
  • Online API
    • Immediate Payment Flow
    • Deferred Payment Flow
  • Upgrading to the Clearpay Express Checkout
    • Express Checkout Overview
    • How to Integrate
      • POSTCreate Checkout [Express Checkout]
      • Express Checkout Payload (Create Checkout)
      • POSTCapture Full Payment [Express Checkout]
      • Express Checkout Payload (Capture Full Payment)
      • POSTAuth [Express Checkout]
      • Express Checkout Payload (Auth)
      • Adding the Express Checkout Button
      • Integrated Shipping
      • Checkout Widget
    • Security
LogoLogo
Upgrading to the Clearpay Express CheckoutHow to Integrate

Express Checkout Payload (Auth)

Was this page helpful?
Previous

Adding the Express Checkout Button

Next
Built with

Express Checkout requires the addition of an amount field to verify that the final amount matches the order total including the shipping and taxes.

As seen in the example below, you may authorize the transaction immediately if you are using the integrated shipping flow and do not want to allow the total to be updated on a review page.

1curl --request POST \
2 --url https://api.eu-sandbox.afterpay.com/v2/payments/auth \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{"token": "YOUR_TOKEN", "amount":{"amount":"100.00", “currency”: “GBP”}}'

In addition to the required amount field, you will also need to provide some extra properties to the payload if you are using the Clearpay Checkout Widget to enable dynamic updates to the order total on a review page (e.g. selecting shipping options, increasing item quantities, applying promo codes):

  • isCheckoutAdjusted: the state to indicate if changes have been made since the initial order creation
  • items: the list of order items if it has changed
  • shipping: the shipping address if it has changed
  • paymentScheduleChecksum: the latest paymentScheduleChecksum retrieved from your widget’s onChange call

If the final amount does not match the calculated amount (including shipping and taxes) or the paymentScheduleChecksum does not match the payment schedule displayed to the consumer, the request will be rejected.

The Data Payload Properties:

AttributeTypeDescription
tokenString (required)The token returned in the Create Checkout request.
amountMoney (required)Amount to be checked against the amount including shipping and taxes. If the amounts do not match, the request will be rejected.
merchantReferenceStringOrder ID or reference this order corresponds to.
isCheckoutAdjustedBooleanWhether there have been changes to the order since the initial order creation.
paymentScheduleChecksum StringA unique value representing the payment schedule that must be provided when there has been changes since the initial order creation.
itemsArrayAn array of order items that have been updated to be provided if it has changed since the initial order creation.
shippingShippingThe shipping address for this order to be provided if it has changed since the initial order creation.