To test Razorpay webhooks, you need a public HTTPS endpoint that Razorpay can POST to. WebhookWhisper gives you one instantly — no CLI, no deployment, no ngrok required. Paste the URL into your Razorpay dashboard, trigger a test event, and inspect the full payload in real time.
Why Test Razorpay Webhooks with WebhookWhisper?
Razorpay is India's leading payment gateway. Its webhooks cover the full payment lifecycle including UPI, cards, net banking, and subscriptions.
WebhookWhisper captures every incoming Razorpay event with full headers, body, and timing data — so you can debug integration issues without deploying to a public server.
Razorpay Webhook Events
The following events are commonly sent by Razorpay:
payment.capturedpayment.failedsubscription.activatedrefund.created
How to Test Razorpay Webhooks Locally
- Create your endpoint — Sign up free and get a permanent HTTPS URL in seconds.
- Add the URL to Razorpay — Paste your WebhookWhisper URL into your Razorpay webhook settings.
- Enable forwarding (optional) — Add a forwarding rule to relay events to
localhost:3000or any local port. - Trigger a test event — Use Razorpay's dashboard or the one-click test sender to fire a
payment.capturedevent. - Inspect in real time — See the full payload, headers, and response in your WebhookWhisper dashboard.
Razorpay Webhook Signature Verification
Razorpay signs every webhook request using the X-Razorpay-Signature header. Always verify this signature in production to prevent spoofed requests.
// Node.js — Verify Razorpay webhook signature
const crypto = require('crypto');
function verifyRazorpaySignature(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(signature)
);
}
Common Razorpay Webhook Errors
- 401 Unauthorized — Signature mismatch. Check that you are using the raw request body (not parsed JSON) for HMAC verification.
- Webhook not received — Verify the URL is publicly accessible. WebhookWhisper endpoints are always public — no tunneling needed.
- Timeout errors — Razorpay expects a 2xx response within a few seconds. Respond immediately and process the event asynchronously.
- Duplicate events — Razorpay retries failed webhooks up to 10 times over 24 hours using exponential backoff. Always use the event ID for idempotency checks.
Frequently Asked Questions
How do I test Razorpay webhooks for free?
Sign up for a free WebhookWhisper account and get a permanent HTTPS endpoint. Add it to your Razorpay webhook settings and trigger a test event from the Razorpay dashboard.
Can I test Razorpay webhooks without deploying?
Yes. WebhookWhisper gives you a public HTTPS URL that requires no deployment. Use the built-in forwarding rules to relay events to your local development server.
How do I receive Razorpay webhooks on localhost?
Create a forwarding rule in WebhookWhisper pointing to your local port (e.g. http://localhost:3000/webhook). Every incoming event is relayed to your local server with retry logic.
What is the Razorpay webhook retry policy?
Razorpay retries failed webhooks up to 10 times over 24 hours using exponential backoff.