Void

This endpoint voids the remaining `openToCapture` amount of the payment auth, and refunds the customer. <Info title="Note"> To make a partial void, specify an amount in the request body. </Info> This operation is idempotent based on the `requestId` (if provided), which allows for the safe retry of multiple requests, guaranteeing the payment operation is only made once. **Connection Timeouts** | Timeout | Time (Seconds) | |---------|----------------| | Open | 10 | | Read | 70 |

Authentication

AuthorizationBasic

Basic authentication of the form Basic <username:password>.

Path parameters

orderIdstringRequired

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

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Request

amountobjectOptional
The amount to void. Must be less than or equal to the open to capture amount.
requestIdstringOptional
A unique request ID, required for safe retries. It is recommended that the merchant generate a UUID for each unique void.
reasonstringOptional

Can be passed in void requests to conditionally modify wording of the corresponding customer refund email. This can be set to 1 of 3 values, cancelledItems, amountAdjustment or null

Response

If successful, returns an updated copy of the Payment object. - A new Payment Event object is appended to the events array, with a type of "VOIDED". - A new Refund object is prepended to the refunds array. - If the openToCapture amount is reduced to zero as a result of this Void request, the paymentState is updated as follows: - from "AUTH_APPROVED" to "VOIDED", or - from "PARTIALLY_CAPTURED" to "CAPTURED".
idstring or null
The unique, permanent, Cash App Afterpay generated Order ID.
tokenstring or null
The token obtained from the checkout call
statusenum or null
represents the status of the order
Allowed values:
createdstring or null
is the UTC timestamp of when the payment was completed.
originalAmountobject or null
Object containing amount and currency
openToCaptureAmountobject or null
Object containing amount and currency
paymentStateenum or null
is the current state for capturing payments
merchantReferencestring or null

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

refundslist of objects or null
orderDetailsobject or null
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 objects or null

Errors