Skip to main content

Setup

Required env vars:

How it works

Checkouts and one-off payments are both built on Razorpay’s Payment Links. Subscriptions use a pre-existing Razorpay Plan instead — item_id maps to that plan’s plan_id:

Webhooks

Razorpay signs webhooks with a webhook secret you configure separately in the Razorpay dashboard — it’s not the same as your API key secret.
Razorpay sends the signature in the x-razorpay-signature header: HMAC-SHA256(webhookSecret, rawRequestBody).

Raw Razorpay events

Opt into any native Razorpay event — fully typed against Razorpay’s webhook payload shape:
Every webhook always emits its raw event first, alongside the matching standard PayKit event below where one applies. Razorpay has no delete-customer API and no cancel-payment API — use createRefund to reverse a captured payment instead of canceling it.

provider_metadata