- 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: