Skip to content

Razorpay webhook

Failed payments, disputes, halted subscriptions and refunds from Razorpay.

Setup

  1. In PingLoom open Webhooks, choose New webhook source, pick Razorpay and create it. Copy the endpoint URL and the webhook secret. The secret is shown once.
  2. In the Razorpay Dashboard go to Account & Settings, then Webhooks, then Add New Webhook.
  3. Paste the PingLoom endpoint URL into Webhook URL and the PingLoom secret into Secret.
  4. Tick the alert events you want: payment.failed, payment.dispute.created, subscription.halted, subscription.cancelled, refund.processed. Add payment.captured and subscription.charged if you want sales alerts.
  5. Save, then use Send test webhook in Razorpay. The request appears under Recent requests on the PingLoom source page.

Verification

Razorpay signs the raw request body with HMAC-SHA256 and your webhook secret, and sends it in the X-Razorpay-Signature header. Razorpay does not sign a timestamp, so PingLoom uses the x-razorpay-event-id header to drop repeats.

Events

You choose which events become alerts when you create the source, and you can change it later on the source page.

EventPriorityOn by default
Payment failedhighYes
Dispute openedhighYes
Subscription haltedhighYes
Subscription cancellednormalYes
Refund processednormalYes
Sales (payment captured)lowNo
Subscription chargedlowNo

PingLoom keeps the amount, the payment and order ids, the payment method and a masked email such as g***@example.com. Phone numbers, card details and names are never copied.

If you change the secret in Razorpay, rotate the secret on the PingLoom source with the one-hour overlap so retries still verify.