Webhooks
Razorpay Connection Webhook
Receive Razorpay webhook events for a workspace’s own connected Razorpay account.
POST
Razorpay webhook receiver (per-connection, BYO)
Per-connection variant of the Razorpay webhook receiver
for workspaces that connected their own Razorpay account with
Connect a Gateway. The event is verified
with that connection’s own webhook secret (resolved from
When the event is acknowledged but deliberately not applied,
connID) before the
payload is trusted. Invoice, refund and virtual-account events are bound to
the connection’s workspace; token.confirmed is not (see below). Event
handling is otherwise identical to the platform receiver.
Each connection has its own URL. Read
webhook_path from
List Gateway Connections (for example
/webhooks/razorpay/{connID}), append it to https://api.recurso.dev, and
register that URL in the Razorpay Dashboard under Settings > Webhooks
using the webhook_secret you supplied when connecting, or set later with
Set Gateway Webhook Secret. A
connection without a webhook secret cannot verify deliveries and rejects them.Parameters
Request Body
The raw Razorpay event payload. Theevent field selects the handler:
Any other event is acknowledged with
status: "ignored". An invoice,
refund or virtual account that belongs to a different workspace than the
connection is never applied: an invoice is acknowledged as ignored with
reason unknown invoice_id, while a refund or virtual account is acknowledged
with status: "ok" and no reason, exactly as if it had been applied.
token.confirmed resolves the mandate by its Razorpay token id alone and is
not checked against the connection’s workspace.
Example Request
Razorpay sends a POST request with event data:Response
Returns200 OK on successful processing. A payment.captured or
order.paid whose invoice_id matches no invoice is acknowledged as
ignored; a payment.failed whose invoice_id matches no invoice is treated
as an error and returns 500, so Razorpay keeps redelivering it.
reason says
why:
Fields
Errors
Errors use the standard envelope — see Errors.
Authorizations
Headers
HMAC-SHA256 signature of the raw request body.
Path Parameters
The tenant's Razorpay gateway-connection id.
Body
application/json
Raw Razorpay event payload.