Deferred Capture

Deferred capture lets you authorize the full payment amount up front and collect the funds later. The transaction is approved and the customer’s payment plan is started. Then, you can capture full or partial payments. If a portion of the order can’t be fulfilled, you can void uncaptured amounts.

This flow is recommended for merchants who ship orders in multiple parts or who charge the full order amount upon delivery.

ActionEndpointPurpose
Authorize Payment/v2/payments/authAuthorize a payment amount for a Clearpay order.
Capture Payment/v2/payments/{orderId}/captureCapture full or partial order payments against a payment authorization.
Void/v2/payments/{orderId}/voidVoid a full or partial order value and refund the customer.

Implement deferred capture

Launch checkout and authorize payment

  1. Create a checkout. If the customer confirms their order with Clearpay, they’re returned to your website with an order token and the SUCCESS status.
  2. Use the order token to call the Authorize Payment endpoint. Once the authorization completes, you’ll receive a Payment object with a status of APPROVED or DECLINED.
    • If Clearpay authorizes the payment, store the payment id and the expires value of the AUTH_APPROVED payment event. Present the customer with an order confirmation page.
    • If Clearpay declines the payment (for example, if the customer’s credit card details are incorrect), present the customer with suggested corrections or alternative payment methods at checkout.

Capture payment

If an order is given APPROVED status during the authorization flow, you can now capture the payment. This happens after the customer has seen their order confirmation page and may have left your website.

You must capture payment for authorized orders within 13 days. After 13 days, the authorization expires and is automatically voided. At this point, you aren’t able to capture any order value (partial or full). You can’t reopen or update voided transactions; you must call the Checkouts endpoint to create a new order.

If you can completely fulfill the order:

Once you determine that the entire order will be fulfilled, call the Capture Payment endpoint with the entire amount.

The capture amount will match both the originalAmount and openToCaptureAmount for the Payment object, as it was returned in the Auth response.

If you can partially fulfill the order:

Once you determine that only part of the order will be fulfilled (for example, if some items are permanently out of stock):

  1. Call the Capture Payment endpoint with the amount for all items that will be fulfilled.
  2. Call the Void endpoint to finalize the order. Refund the openToCapture amount to the customer; this will reduce the openToCapture amount to zero.

If you fulfill the order incrementally:

  1. Once a shipment is dispatched, call the Capture Payment endpoint with the amount of all items in the shipment.
  2. If you determine that a shipment can’t be dispatched, call the Void endpoint with the amount of all applicable items.

You can capture or void payments multiple times. Requests that exceed the openToCapture amount will fail. Once the openToCapture amount equals zero, any further Capture or Void requests will fail.

If you can’t fulfill any part of the order:

Once you determine that you can’t fulfill any part of the order, call the Void endpoint. This refunds the openToCapture amount to the customer, reduces the openToCapture amount to zero, and finalizes the order.

We don’t recommend waiting for the authorization to automatically expire. Even though an approved authorization will automatically be voided after 13 days, the customer begins their payment plan at the time of authorization approval.

Considerations

  • Deferred capture is supported on the Clearpay v2 API, Salesforce Commerce Cloud, and Adobe Commerce (Magento).
  • The minimum capture amount is £1.00; capture requests below £1.00 are rejected.
  • If an order still has a paymentState of AUTH_APPROVED or PARTIALLY_CAPTURED when the authorization expires, the remaining order amount will automatically be voided.
  • The Capture Payment call is idempotent. It’s safe to retry requests using the same unique requestId.