Void
This endpoint voids the remaining openToCapture amount of the payment auth, and refunds the consumer.
Note
This operation is idempotent based on the requestId guaranteeing the payment operation is only performed once.
Successful Response (201)
If successful, returns an updated copy of the Payment object.
- A new Payment Event object will be appended to the
eventsarray, with atypeof “VOIDED”. - A new Refund object will be prepended to the
refundsarray. - If the
openToCaptureamount is reduced to zero as a result of this Void request, thepaymentStatewill be updated as follows:- from “AUTH_APPROVED” to “VOIDED”, or
- from “PARTIALLY_CAPTURED” to “CAPTURED”.
Connection Timeouts
Errors
In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Void:
Authentication
AuthorizationBasic
Basic authentication of the form Basic <base64(username:password)>.
Path parameters
orderId
The unique ID of the Clearpay Order, returned as the id property of the Auth response.
Headers
User-Agent
Accept
Request
This endpoint expects an object.
amount
The amount to be voided
requestId
A unique request ID, required for safe retries. It is recommended that the merchant generate a UUID for each unique void.
reason
Can be passed in void requests to conditionally modify wording of the corresponding consumer refund email. This can be set to 1 of 3 values, cancelledItems, amountAdjustment or null