For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
This endpoint captures a full or partial payment that has been authorized. Any amounts successfully captured will be 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 will update any value previously set in the Create Checkout request.
amountobjectOptional
Object containing amount and currency.
Where a Money object is included in an API request, it will be validated according to the specification above. Invalid Money objects will trigger a 422 Unprocessable Entity response. The following is a list of common examples:
Example
errorCode
message
amount is omitted or null
invalid_object
{Money object}.amount Amount field required
amount has more than 2 decimal places
invalid_object amount
must be a valid ISO 4217 format value
amount includes a thousands separator comma, for example: “1,000”
invalid_amount
Amount must be a valid ISO 4217 format value
amount is not a decimal number, for example: “FREE”, “$2” or an empty string
invalid_object
{Money object}.amount Amount field must be a valid ISO 4217 format value
currency is omitted or null
invalid_object
{Money object}.currency Currency field required
currency is not a valid currency code, not all uppercase or an empty string
invalid_object
{Money object}.currency Currency not supported for this merchant
currency is supported by Afterpay, but not valid for the Merchant account
A unique reference for the individual payment capture event. If provided, the value will appear 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
Allowed values:
createdstringOptional
The UTC timestamp of when the payment was completed.
originalAmountobjectOptional
Total amount charged to the customer for the order.
openToCaptureAmountobjectOptional
Remaining amount that can be captured. Will always be zero for Immediate Payment Flow orders.
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
An array of refunds. Note: in response to a Capture Full Payment call, this array will always be empty, since refunds cannot occur until payment is captured.
orderDetailsobjectOptional
The details of the order bound to the payment.
eventslist of objectsOptional
One or more payment events that have occurred against the order.
agreementslist of objectsOptional
List of billing agreements created if any (field omitted if empty)
Errors
404
Not Found Error
410
Gone Error
412
Precondition Failed Error
422
Unprocessable Entity Error
This endpoint captures a full or partial payment that has been authorized. Any amounts successfully captured will be 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.