Error codes
Errors / The customer cancelled the payment
The customer cancelled the payment
- Code
deposit_cancelled- HTTP status
- None: never an HTTP answer
- Where you see it
-
A deposit's
failure_code
How to fix it
Tip
A deposit's failure_code: the customer pressed Cancel on the payment page before paying, so nothing was paid. Create a new deposit if the customer wants to pay after all.
Where you see it
No request is ever answered with this code: the request that made the deposit got its 201
long before the deposit ended.
It is the failure_code of a deposit that ended cancelled (only a live deposit ends this way),
with its failure_message. You read it in the deposit (GET /v1/deposits/{id}) and in the
data of the deposit.cancelled webhook.
The deposit (JSON)
{
"id": "dep_01k6c3s0v1m2n3p4q5r6s7t8v9",
"object": "deposit",
"mode": "live",
"status": "cancelled",
"method": "card_to_card",
"amount": 1500000,
"currency": "IRR",
"amount_rials": 1500000,
"fee_rials": null,
"reference": "order-10542",
"customer": {
"id": "customer-77",
"level": "default"
},
"payer": {
"card_number": null,
"account": null,
"bank": null
},
"redirect_url": "https://shop.example/orders/order-10542/return",
"webhook_url": "https://shop.example/webhooks/payments",
"allowed_methods": null,
"failure_code": "deposit_cancelled",
"failure_message": "The customer cancelled the payment",
"version": 2,
"created_at": "2026-10-03T09:30:00Z",
"updated_at": "2026-10-03T09:30:12Z",
"expires_at": "2026-10-03T10:00:00Z",
"paid_at": null
}