This endpoint performs a reversal of the checkout that is used to initiate the Clearpay payment process. This will cancel the order asynchronously as soon as it is created without the need of an additional call to the void or refund endpoint. In order for a payment to be eligible, the order must be in an Auth-Approved or Captured state and must be issued within 10 minutes of the order being created.
If this is called after a timeout is received from v2/payments/auth and v2/payments/auth eventually completes successfully, the order will get voided shortly after it’s created.
If this is called after a timeout is received from v2/payments/capture and v2/payments/capture eventually completes successfully, the order will end up in a REVERSED state. This is similar to a call to the v2/payments/refund endpoint except that merchant fees are not paid to Clearpay and the capture and refund will not show up in the settlement file.
Successful Response (204)
Returns no content in the response.
Connection Timeouts
Timeout | Time (Seconds) |
---|---|
Open | 10 |
Read | 70 |
Errors
In addition to the PUT/POST Errors applicable to all POST endpoints, the following errors are specific to Reverse Payment By Token:
HTTP Status Code | errorCode | Description |
---|---|---|
402 Payment Required | invalid_token | Invalid token |
412 Precondition Failed | precondition_failed | Payment reversal previously processed |
412 Precondition Failed | precondition_failed | Payment not eligible for a reversal |
412 Precondition Failed | precondition_failed | Order outside reversal window |
412 Precondition Failed | precondition_failed | Order in pending reversal, no captures/auth accepted |