Skip to navigation

Capture Full Payment

This endpoint makes a payment capture for the full value of the payment plan.

It applies only to a checkout token that has not already been authorized, captured, voided, or declined. Against a token in any of those states no money moves: the existing Payment object is returned unchanged, and the request body is not applied.

To capture an order you have already authorized, use Capture Payment.

This operation is idempotent based on the token, which allows for the safe retry of requests, guaranteeing the payment operation is only made once.

Since the idempotency of this endpoint is based on the token, the inclusion of a requestId is not required.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read70

Authentication

AuthorizationBasic

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

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

This endpoint expects an object.
tokenstringRequired
The token returned in the Create Checkout request.
merchantReferencestringOptional

The merchant’s order id/reference that this payment corresponds to. This updates any value previously provided in the Create Checkout request.

amountobjectOptional

Required for express checkout only. The order total at the time of approval. Note this value can differ from the original checkout amount (e.g., added shipping costs). A mismatch returns HTTP 422 invalid_amount.

isCheckoutAdjustedbooleanOptional

Express checkout only. The isCheckoutAdjusted field can be used to allow the order amount to be changed after the checkout flow.

paymentScheduleChecksumstringOptional

Express checkout only. A unique value representing the payment schedule that must be provided when there have been changes since the initial order creation (retrieved from checkout widget).

itemsobjectOptional

Express checkout only. An array of order items that have been updated. Provide if it has changed since the initial order creation.

shippingobjectOptional

Express checkout only. The shipping address if it has changed since the initial order creation.

enrichmentsobjectOptional
grantIdstringOptional

The Afterpay or Cash App Pay on-file grant ID. Required when processing a payment using a previously stored on-file grant.

Response

StatusDescription
APPROVEDIf payment is approved by Afterpay, returns a Payment object in response, with a status of “APPROVED”.
DECLINEDIf payment is declined by Afterpay, for example, if invalid card details were entered, returns a Payment object in response, with a status of “DECLINED”. Please advise the customer to contact the Afterpay Customer Service team for more information.
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 order was created.
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

An array of refunds, voids, and reversals. Note: in response to a Capture Full Payment call, this array will always be empty, since refunds cannot occur until payment is captured.

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

402
Payment Required Error
412
Precondition Failed Error
422
Unprocessable Entity Error