Promptwatch Logo

Razorpay-Webhook

Razorpay-Webhook delivers asynchronous payment notifications to a merchant's configured URL.
RazorpayRazorpay-Webhook
Webhook

What is Razorpay-Webhook?

Razorpay-Webhook delivers asynchronous payment notifications to a merchant's configured URL. The merchant selects the events in the Razorpay Dashboard, and Razorpay sends the matching payload after a payment, refund, or another subscribed account event changes state. Test mode transactions can exercise the same payload structure before the live endpoint is used.

A webhook secret lets the receiver authenticate the callback. Razorpay computes an HMAC-SHA256 over the raw request body with that secret and sends the result in X-Razorpay-Signature. Parsing the JSON and then serializing it again can change the bytes, so verification must use the body exactly as received. The webhook secret is separate from the Razorpay API key secret.

The endpoint must return a 2xx status within 5 seconds. Razorpay treats any other status or a timeout as a failed delivery and retries with exponential backoff for 24 hours. Continued failure disables the webhook. Delivery is at least once and event order is not guaranteed, so x-razorpay-event-id should be stored as the unique event key.

Razorpay-Webhook is a payment callback, not a crawler. It neither indexes the merchant's pages for search nor gathers their text for AI training. A robots.txt rule cannot affect a POST sent to a URL that the merchant registered in Razorpay.

Not relevant for AI search

Is Razorpay-Webhook relevant for AI search?

No. Razorpay-Webhook is not part of AI search or training, so allowing or blocking it does not change your AI visibility.

Razorpay-Webhook is not a crawler. It delivers webhook notifications to endpoints you registered, so it never fetches public content for an AI product. Robots.txt does not apply, and allowing or blocking it has no effect on AI search or training.

How to handle Razorpay-Webhook

Set a dedicated webhook secret in the Razorpay Dashboard and store the same value in the receiving service. Verify X-Razorpay-Signature against the raw body before parsing the event or changing an order. When a secret has just been rotated, an older delivery being retried still needs the secret that was active when that event occurred.

Make handling idempotent around x-razorpay-event-id. Save the identifier with the resulting transaction, accept valid events in any order, and return a 2xx response within 5 seconds. Move reconciliation or notification work out of the request path when it cannot finish inside that window.

Inspect failed attempts before re-enabling a webhook that Razorpay disabled. Remove the webhook in the Dashboard if callbacks are no longer required. Do not publish a robots.txt rule for this client, since crawler directives do not authenticate or reject webhook requests.

Examples

  • A `payment.captured` callback has a valid `X-Razorpay-Signature`. The merchant records its event ID, acknowledges it, and marks the matching order paid.
  • The first response is lost after processing. Razorpay sends the event again, and the receiver returns 200 without repeating the order update because `x-razorpay-event-id` is already stored.
  • A captured-payment callback arrives before the related authorized-payment callback. The handler applies each state change without assuming the HTTP requests will follow transaction order.

Frequently asked questions about Razorpay-Webhook

Learn about AI visibility monitoring and how Promptwatch helps your brand succeed in AI search.

Razorpay uses HMAC-SHA256 with the webhook secret as the key and the raw request body as the message. The result arrives in `X-Razorpay-Signature`.

Be the brand AI recommends

Monitor your brand's visibility across ChatGPT, Claude, Perplexity, and Gemini. Get actionable insights and create content that gets cited by AI search engines.

Promptwatch Dashboard