The Payment Cancellation API allows merchants to cancel payments that are still in the “processing” stage, giving you full control to stop transactions before they reach a final status. This is particularly useful for scenarios such as:Documentation Index
Fetch the complete documentation index at: https://docs.monxa.co/llms.txt
Use this file to discover all available pages before exploring further.
- Managing inventory when an item is out of stock.
- Enforcing time-sensitive payment rules.
- Applying custom business logic to align with operational policies or customer requests.
How to Cancel a Payment
Step 1. Call the Cancel Payment API
Step 1. Call the Cancel Payment API
Use the following endpoint to cancel a payment:
Replace
| Method | Endpoint |
|---|---|
| GET | https://api.monxa.dev/v1/payments/{id}/cancel |
{id} with the payment_id of the transaction you want to cancel.Step 2. Handle the API Response
Step 2. Handle the API Response
After calling the API, the response will indicate the final status of the transaction. If the status is
cancelled, the payment has been successfully cancelled.Example Response: