Payments
Reverse a Payment
Automatically cancels if the payment is authorized, or refunds if already captured. No need to track payment state.
POST
If you don’t want to track whether a payment is in the
Response when payment was captured (refund path) —
authorized or captured state in your own system, POST /payment/{id}/cancel_or_refund handles it for you. Therius checks the current payment state and automatically cancels the authorization (if uncaptured) or issues a full refund (if already captured). This is especially useful in order reversal workflows where the payment state may vary depending on timing — for example, a customer cancelling an order while fulfillment is in progress.
Identifying the payment
{id} is the Therius payment id returned by POST /payment/authorization and POST /payment/purchase. orderCode and paymentCode are your own reference fields and are not accepted here. An unknown or non-owned id returns 404.
This endpoint always reverses the full payment — it voids the entire authorization hold, or refunds the entire captured amount. To issue a partial refund on a captured payment, call Refund with an
amount instead.Example
Reverse a payment without knowing its state
200 OK
Authorizations
Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).
Headers
A UUID you generate per operation. Required in production. Retrying with the same key returns the original response.
Path Parameters
The Therius payment id returned by POST /payment/authorization or POST /payment/purchase.
Body
application/json
Response
200 - application/json
Reverse result

