Cookie Consent by Free Privacy Policy Generator Update cookies preferences

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.

curl --request POST \
  --url https://api.eu-sandbox.afterpay.com/v2/payments/auth \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --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.