Skip to main content
Available in🇮🇳 India
Keep the order open after payment.failed and accept a later success on it. A payment with no bank response is marked failed after about 10 minutes, but Razorpay keeps polling the bank for up to 3 days — it can turn authorized later. Capture manually only inside your capture window; an authorized payment you do not capture in time is auto-refunded. Best way to integrate:
  • Create one order per purchase and store its order_id against your cart. Retry payments on the same order.
  • Drive fulfilment from the order: fulfil when it is paid, on order.paid or payment.captured.
  • Keep the order open after payment.failed, so the customer can retry and a late authorisation is caught.
  • Move states forward only; accept failed → authorized.
  • Set capture to match how you fulfil: auto-capture for most businesses; manual only if you check stock or risk first.
  • Reconcile any order still created or attempted after 15 minutes.
  • Disable the pay button once an order is paid.

Scenarios to test your integration

Scenario details

BP-06 — Late authorisation, auto-capture on Before you start: stored events, or hand-written ones that match the live payloads. How to test: send payment.failed for a payment on an open order. Send payment.authorized for the same payment with late_authorized: true. Send payment.captured and order.paid. Expected result: the order stays open after payment.failed and is fulfilled once on order.paid. Your integration should: never close the order on payment.failed. Live mode differs: real late authorisations cannot be simulated.
Watch Out!Late authorisation depends on delayed bank polling and is not simulated in Test Mode. Verify it in a controlled live test. Listen for payment.authorized for 3 days, then capture and fulfil or let it auto-refund.

Webhooks: What Fires, and What It Lets You Decide

Every scenario above delivers a specific set of events, in a specific order. This table is the one place that says which, and — the part that actually matters — what each one entitles you to do. Most integration bugs that reach production are not missing webhooks; they are acting on the wrong one. Before you trust any of them
  • Verify the signature on every event. Replay one event to your endpoint and send one with a changed body. The replay must be ignored and the tampered event rejected. An endpoint that skips this is an open write to your order state.
  • Expect duplicates. The same event can arrive more than once. Key your handler on the event ID and make it idempotent.
  • Order is not guaranteed across events. Do not assume payment.captured lands before order.paid; handle whichever arrives first.
  • Webhook first, callback second. The browser callback can be lost, blocked or forged. Fulfil on the webhook.

Common integration gaps to avoid

Simulate failures

Available in test mode Not available in test mode
Last modified on November 12, 2026