Capture Full Payment

This endpoint performs a payment capture for the full value of the payment plan. This operation is idempotent based on the token, which allows for the safe retry of requests, guaranteeing the payment operation is only performed once. Since the idempotency of this endpoint is based on the token, the inclusion of a `requestId` is not required. **Connection Timeouts** | Timeout | Time (Seconds) | |---------|----------------| | Open | 10 | | Read | 70 |

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 will update any value previously provided in the Create Checkout request.

amountobjectOptional

Required for express checkout only. Amount to be checked against the value in the create checkout request. If the amounts do not match, then the request is rejected and an error specific to this scenario is returned.

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
Additional enrichment data for the payment.

Response

| Status | Description | | ----- | ----- | | `APPROVED` | If payment is approved by Afterpay, returns a Payment object in response, with a status of "APPROVED". | | `DECLINED` | If 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 consumer to contact the Afterpay Customer Service team for more information. |
idstring
The unique, permanent, Afterpay generated Order ID.
tokenstring
The token obtained from the checkout call
statusenum
represents the status of the order
Allowed values:
createdstring
The UTC timestamp of when the payment was completed.
originalAmountobject
Total amount charged to the customer for the order.
openToCaptureAmountobject
Remaining amount that can be captured. Will always be zero for Immediate Payment Flow orders.
paymentStateenumRead-only
is the current state for capturing payments
merchantReferencestring

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

refundslist of objects

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.

orderDetailsobject
The details of the order bound to the payment.
eventslist of objects
One or more payment events that have occurred against the order.
agreementslist of objects

List of billing agreements created if any (field omitted if empty)

Errors

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