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.
Implement deferred capture
Launch checkout and authorize payment
- 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. - 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
orDECLINED
.- If Clearpay authorizes the payment, store the payment
id
and theexpires
value of theAUTH_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.
- If Clearpay authorizes the payment, store the payment
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.
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):
- Call the Capture Payment endpoint with the amount for all items that will be fulfilled.
- Call the Void endpoint to finalize the order. Refund the
openToCapture
amount to the customer; this will reduce theopenToCapture
amount to zero.
If you fulfill the order incrementally:
- Once a shipment is dispatched, call the Capture Payment endpoint with the amount of all items in the shipment.
- 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.
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
ofAUTH_APPROVED
orPARTIALLY_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.