Razorpay - All Shops Bundle

Webhooks

Version: 1.0.9

Webhooks

Webhooks let Razorpay tell your store that a payment was captured, failed, or refunded even if the customer closes the browser.

Without a webhook, an order is confirmed only when the customer returns to your site. With one, a late UPI approval and a refund made in the Razorpay Dashboard still update the order.

Razorpay only accepts webhooks for a website domain that is verified on the account (Dashboard, Account & Settings, Business website details). Until then, payments still work and are confirmed when the customer returns. Webhooks cannot reach localhost or a site behind a password.

Add the webhook in Razorpay
  1. Log in to the Razorpay Dashboard and select Test Mode or Live Mode. Add one webhook in each mode.
  2. Open Account & Settings, then Webhooks, and click Add New Webhook.
  3. Paste the webhook URL for this shop.
  4. Type a long random secret and keep a copy.
  5. Set an alert email so Razorpay can warn you if the webhook keeps failing.
  6. Tick payment.captured, payment.failed, order.paid, and refund.processed.
  7. Click Create Webhook.
  8. Paste the same secret into the webhook secret field for that mode in the shop, and save.

order.paid is treated the same as payment.captured. Duplicate events are ignored. A request with a missing or wrong signature gets HTTP 400 and is logged as Webhook rejected. An event meant for a different shop on the same site is ignored.

Use the URL on that shop tab. You can use the same Razorpay keys for every shop. Each webhook needs its own secret.