Cancel Payment
Last updated
Cancels a pending payment. Triggers the payment.canceled webhook event.
POST /v1/api/payments/:id/cancelRequired scope: payments:create
id
string
Payment UUID or short ID
curl -X POST https://apipay.byastra.ai/v1/api/payments/pXk9mQ/cancel \
-H "X-Api-Key: ap_live_your_api_key"200 OKReturns the updated payment object with "status": "CANCELED".
Only PENDING payments can be canceled. Attempting to cancel a COMPLETED or EXPIRED payment returns 422.
Last updated