Void

This endpoint voids the remaining openToCapture amount of the payment auth, and refunds the consumer.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

📘

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 events array, with a type of "VOIDED".
  • A new Refund object will be prepended to the refunds array.
  • If the openToCapture amount is reduced to zero as a result of this Void request, the paymentState will be updated as follows:
    • from "AUTH_APPROVED" to "VOIDED", or
    • from "PARTIALLY_CAPTURED" to "CAPTURED".

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read70

Errors

In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Void:

HTTP Status CodeerrorCodeDescription
404
Not Found
not_foundThe orderId string provided was empty or did not match a valid order.
410
Gone
payment_capturedPayment has already been fully captured for this order.
Path Params
string
required

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

Body Params
amount
object

The amount to be voided

string

A unique request ID, required for safe retries. It is recommended that the merchant generate a UUID for each unique void.

Headers
string
required
Defaults to application/json
string
required
Defaults to Readme.io API Simulator
string
Defaults to application/json
Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here!