For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GuidesAPI Reference
GuidesAPI Reference
  • Reference
    • Introduction
      • GETList Payments
      • POSTAuth
      • POSTCapture Full Payment
      • GETGet Payment By Order ID
      • PUTUpdate Payment by Order ID
      • POSTCapture Payment
      • PUTUpdate Shipping Courier
      • POSTCreate Refund
      • POSTVoid
      • GETGet Payment By Token
      • POSTReverse Payment By Token
LogoLogo
ReferencePayments

Reverse Payment By Token

POST
/v2/payments/token::token/reversal
POST
/v2/payments/token::token/reversal
$curl -X POST https://global-api-sandbox.afterpay.com/v2/payments/token:token/reversal \
> -H "User-Agent: User-Agent" \
> -u "<username>:<password>"
1{}
This endpoint makes a reversal of the checkout that is used to start the Afterpay payment process. This cancels the order asynchronously as soon as it is created without the need of an additional call to the void endpoint. For a payment to be eligible, the order must be in an Auth-Approved or Captured state, and it must be issued within 10 minutes of the order being created. **Connection Timeouts** | Timeout | Time (Seconds) | |---------|----------------| | Open | 10 | | Read | 70 |
Was this page helpful?
Previous

AuthorizePayment

Next
Built with

This endpoint makes a reversal of the checkout that is used to start the Afterpay payment process. This cancels the order asynchronously as soon as it is created without the need of an additional call to the void endpoint. For a payment to be eligible, the order must be in an Auth-Approved or Captured state, and it must be issued within 10 minutes of the order being created.

Connection Timeouts

TimeoutTime (Seconds)
Open10
Read70

Authentication

AuthorizationBasic

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

Path parameters

tokenstringRequired

The token of the checkout to be reversed (voided).

Headers

User-AgentstringRequired
AcceptstringOptionalDefaults to application/json

Response

The Reversal endpoint indicates a successful response with a 204 status code response. Returns no content in the response.

Errors

402
Payment Required Error
412
Precondition Failed Error