2a. Direct Capture

This flow completes the payment approval, starts the consumer's payment plan, and settles the full order value with the merchant - all as a combined action.

  1. Merchant uses the token returned by Create Checkout in combination with the Clearpay JavaScript afterpay.js to direct the consumer through the Clearpay screenflow. This token expires after 180 minutes.
  2. Consumer completes the Clearpay screenflow and is returned to the merchant website. If the consumer clicks Confirm, they will be returned to the merchant website with the orderToken and a status of SUCCESS. If the consumer cancels, they will be returned to the Merchant website with the orderToken and a status of CANCELLED.
  3. If the merchant is able to fulfil the order, the merchant calls the Capture Full Payment endpoint to capture the payment. This call is idempotent, and can be retried within 24 hours using the same unique requestId.
1948

Payment status (APPROVED or DECLINED) is only known after Capture Full Payment has completed.

If the payment was approved by Clearpay, the Merchant presents the Consumer with an order confirmation/receipt page. If the payment was declined by Clearpay (e.g. the Consumer’s card details are entered incorrectly), the Merchant presents an appropriate message to the Consumer at the checkout.

  1. As shipments occur for the order, send Clearpay each shipment’s tracking information with the courier API call. Find more details of the update shipping courier endpoint here.