Capture Payment

This endpoint captures a full or partial payment. Any amounts successfully captured are settled from Afterpay to the merchant's nominated bank account on the following day. Records of all payments captured against an order are returned in the events list as events of type, "CAPTURED". **Note:** Authorization expires after 13 days and then the transaction is automatically voided. Voided transactions are frozen and cannot be captured, reopened or changed in any way. In this case your only option is to use the v2/checkouts endpoint to create a new order. This operation is idempotent based on the `requestId` (if provided), which allows the safe retry of multiple requests. This safe retry guarantees the payment operation only occurs once. **Connection Timeouts** | Timeout | Time (Seconds) | |---------|----------------| | Open | 10 | | Read | 70 |

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

orderIdstringRequired

The unique ID of the Afterpay Order, returned as the id property of the Auth response.

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

requestIdstringOptionalformat: "uuid"
A unique request ID, required for idempotent retries.
merchantReferencestringOptional

The reference/order ID that this payment corresponds to in the merchant’s system.

Note: Providing a new value updates any value previously set in the Create Checkout request.

amountobjectOptional
Object containing amount and currency
paymentEventMerchantReferencestringOptional<=128 characters
A unique reference for the individual payment capture event. If provided, the value appears in the daily settlement file as "Payment Event ID"

Response

If successful, returns an updated copy of the Payment object, with the newly captured payment appended to the events array as a Payment Event object with a type of “CAPTURED”.

idstringOptional
The unique, permanent, Afterpay generated Order ID.
tokenstringOptional
The token obtained from the checkout call
statusenumOptional
represents the status of the order
createdstringOptional
is the UTC timestamp of when the payment was completed.
originalAmountobjectOptional
Object containing amount and currency
openToCaptureAmountobjectOptional
Object containing amount and currency
paymentStateenumOptionalRead-only
is the current state for capturing payments
merchantReferencestringOptional

is the merchant’s order id/reference that the payment corresponds to.

refundslist of objectsOptional
orderDetailsobjectOptional
This comprehensive schema is designed to store an entire transaction's detail, covering crucial aspects like consumer information, billing and shipping details, courier particulars, item list, discounts, tax, and shipping amount.
eventslist of objectsOptional

Errors

404
Not Found Error
410
Gone Error
412
Precondition Failed Error
422
Unprocessable Entity Error