Cancel Payment β Reference
Looking up the PAYMENT_CANCELLED webhook payload or a cancel error scenario. For the conceptual model, see Cancel Payment Flow. For the request/response walkthrough, see How to Cancel a Payment.
Webhook β PAYMENT_CANCELLEDβ
{
"name": "PAYMENT_CANCELLED",
"source": "merchant-portal",
"payload": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"merchantTransactionId": "preauth-20260404-001",
"amount": 25000,
"status": "CANCELLED",
"paymentAllocations": [
{
"id": "cccc1111-2222-3333-4444-555566667777",
"amount": 25000,
"status": "CANCELED"
}
]
}
}
Error Scenariosβ
| Scenario | HTTP Status | Error Title | Detail |
|---|---|---|---|
Payment in COMPLETED state | 422 | UNPROCESSABLE_ENTITY | Payment cannot be cancelled in COMPLETED state |
Payment in FAILED state | 422 | UNPROCESSABLE_ENTITY | Payment already failed |
| Payment not found | 404 | NOT_FOUND | paymentId not found |
Missing paymentCancellationReason | 400 | INVALID_REQUEST | paymentCancellationReason is required |
| Invalid cancellation reason value | 400 | INVALID_REQUEST | Invalid enum value |
| Stripe void failed | 422 | PAYMENT_ERROR | Cancellation processing failed |