Verify a Razorpay payment webhook and receipt the customer on WhatsApp
Verifies a Razorpay webhook's HMAC signature over the raw body, records the payment in PostgreSQL with an idempotent insert, and sends the customer a WhatsApp receipt carrying the payment reference.
Razorpay has no dedicated n8n node, so this is a webhook with Raw Body enabled — necessary because the signature must be computed over the exact bytes Razorpay sent, and re-serialising the JSON breaks it. Razorpay is answered immediately, before any work, so a slow run never turns into a retry queue. A Code node then computes HMAC-SHA256 with the webhook secret, compares it to the header in constant time, and flattens the payment entity in the same pass with the amount converted from paise. An IF sends anything that fails to a Stop And Error. Verified payments go into PostgreSQL through a parameterised INSERT … ON CONFLICT DO NOTHING keyed on the payment id, so Razorpay's normal retries cannot double-count revenue, and the customer gets a WhatsApp receipt with the reference they would quote in a dispute. Failures route to an error rail on Slack.
Key benefits
- ✓The webhook signature is actually verified, so nobody can write fake payments into your ledger
- ✓Raw-body handling means the HMAC matches — the mistake that silently breaks most Razorpay integrations
- ✓ON CONFLICT DO NOTHING makes Razorpay's retries harmless instead of double-counting revenue
- ✓The customer gets a WhatsApp receipt with the payment reference, on the channel they read
- ✓No Razorpay API key is needed — the workflow only receives, so there is nothing to leak
Use cases
- →Indian businesses taking payments through Razorpay with no ledger of their own
- →Teams reconciling Razorpay against orders by exporting CSVs
- →Anyone who built a Razorpay webhook without signature verification and knows it
- →Merchants whose customers ask for a payment reference days later
Integrations
Workflow preview (11 nodes)
The template's actual node layout and connections. Node parameters and credential slots unlock with the download.
What's inside (11 nodes)
A look at the node types this workflow uses. No purchase required — full parameters and credentials are yours after you buy.
From download to running in 3 steps
- 1Import. In n8n, open Workflows → menu → “Import from File” and pick the downloaded JSON.
- 2Connect. Add your own credentials on the app nodes - n8n highlights exactly which ones need them.
- 3Activate. Run it once to test, then toggle Active. The automation is live.
What you'll learn
Production levelProduction-grade: idempotency, dead-letter handling, and reconciliation included.
- •Moving data between PostgreSQL and Slack in a single run
- •Failing loudly on a bad run instead of letting it pass silently
- •Adding retries and an explicit error path to external calls
Every node carries its own documentation on the canvas, plus notes explaining why the architecture was built this way, a credential setup guide, troubleshooting, and three practice exercises. Sample data comes pinned to the trigger, so you can hit Execute and watch data flow before connecting a single account.
Common questions
What exactly do I get?
The complete, ready-to-import n8n workflow as a JSON file, delivered instantly after payment. Import it into your own n8n (cloud or self-hosted), add your credentials, and it runs.
How do I import it into n8n?
In n8n, open Workflows, click the three-dot menu, choose “Import from File”, and select the downloaded JSON. Then connect your own app credentials on the highlighted nodes.
Do I need anything else for it to work?
You need your own n8n instance and accounts/credentials for the apps this workflow connects to (HTTP / REST API, PostgreSQL, WhatsApp, Slack). No coding is required.
What if it doesn't work for me?
If the file is faulty, won't import, or isn't as described, contact us within 7 days and we'll fix it or refund you - see our refund policy.
Can I modify or resell it?
You can freely adapt and use it in your own or your clients' projects. Reselling or redistributing the template file itself is not permitted.
Related templates
Issue contracts with PostgreSQL
Reconciliation on n8n: runs when a webhook arrives across PostgreSQL, Gmail, Slack and Google Sheets, starting at "Gather API Numbers". Rolls the rows up into a few numbers. 21 documented nodes.
Issue contracts for expenses
Expenses on n8n: runs when a webhook arrives across PostgreSQL, Outlook, Slack and Google Sheets, starting at "Gather API Numbers". Drops anything it has already handled. 21 documented nodes.
Reconcile expenses: Slack
Expenses on n8n: runs when mail lands in the inbox across Slack, Google Sheets, PostgreSQL and Telegram, starting at "Stamp & Shape Invoice". 23 documented nodes.
Power an assistant workflow with Google Sheets, Slack and PostgreSQL
Multi-tool agent on n8n: runs when a webhook arrives across Google Sheets, Slack, PostgreSQL and Telegram, starting at "Normalize Request Payload". 23 documented nodes.