Available in🇮🇳 India
Every call you might retry must be safe to repeat. Create an order with unique_receipt: true so a retried create returns the same order instead of a duplicate. Retry a payment on the same order so a customer cannot pay twice.
Scenarios to test your integration
Open questionsFetching the order’s payments before retrying a create-payment call (BP-08) assumes you retry on the same order; confirm this matches your integration if you create a new order per attempt instead. Idempotency keys on refunds (BP-12) are not yet confirmed to work in Test Mode — verify before you rely on this behaviour.
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.capturedlands beforeorder.paid; handle whichever arrives first. - Webhook first, callback second. The browser callback can be lost, blocked or forged. Fulfil on the webhook.