Payments Docs
Error codes

Errors / The payment did not go through

The payment did not go through

Code
payment_failed
HTTP status
None: never an HTTP answer
Where you see it
A deposit's failure_code

How to fix it

Tip

The customer's payment did not go through. Create a new deposit if they want to try again. In test mode the simulator's "failed" outcome ends a deposit, or a test withdrawal, with this code.

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 failed, with its failure_message. You read it in the deposit (GET /v1/deposits/{id}) and in the data of the deposit.failed webhook. A test withdrawal the simulator failed has it too (withdrawal.failed).

The deposit (JSON)
{
  "id": "dep_01k6c3s0v1m2n3p4q5r6s7t8v9",
  "object": "deposit",
  "mode": "test",
  "status": "failed",
  "method": "account_transfer",
  "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": "payment_failed",
  "failure_message": "The payment did not go through",
  "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
}

Learn more