n8n Razorpay WhatsApp Sheets Automation: A Complete Guide for Surat Retailers

Automate WhatsApp orders in Surat with n8n, Razorpay and Sheets: payment links, confirmations and live tracking. Setup, flow, costs and mistakes explained

AITech
Skip to article text

n8n Razorpay WhatsApp Sheets automation connects a WhatsApp order chat to a Razorpay payment link and a Google Sheets order log, so a Surat retailer can confirm an order, collect payment, and update stock records without manual copy paste. When a customer confirms items, n8n creates the link, sends it on WhatsApp, listens for payment, and writes the paid order to Sheets.

Direct answer: Build the flow in four states: order confirmed, payment link sent, payment received, and order ready for dispatch. Write the Sheets row before you create the Razorpay link, use the order ID as the only key, verify every webhook before you update the row, and send the paid confirmation only after the Sheet write succeeds. Use the official WhatsApp Business Platform through an approved provider, not a personal number.

If you run a shop in Surat and take orders on WhatsApp, you know the real cost is not the chat. It is the follow up. A customer says "book this," you send a price, you send a UPI number or a link, you wait, you check the bank app, you write the order in a notebook or a sheet, and you forget one step when five chats arrive at once. This guide shows a flow that closes that loop. You keep WhatsApp as the storefront. n8n becomes the operator. Razorpay becomes the cash counter. Google Sheets becomes the single order book.

What this automation does and what it does not do

This automation handles the repeatable middle of an order. It captures the confirmed items, creates a payment link for the exact amount, sends the link on WhatsApp, confirms payment, and logs the result in Sheets. It also sends a payment failed message and a link expired message when those events happen, so the customer is not left guessing.

It does not replace judgment. It does not decide if a design is in stock, negotiate a bulk price, or handle a custom order that needs a photo approval. It does not replace your accounting software or your GST filing. Think of it as a reliable order desk, not a replacement for the owner or the ops manager.

The test is simple. If the same order message happens ten times a week, automate it. If it happens once and needs a human eye, keep it manual and let the automation log the outcome after a human confirms it.

How n8n Razorpay WhatsApp Sheets automation works

The flow has four states, and every order should live in only one state at a time. Those states are order confirmed, payment link sent, payment received, and order ready for dispatch or pickup. A fifth state, payment failed or link expired, sends the customer back to the payment step instead of creating a duplicate order.

The sequence is direct. A customer confirms items on WhatsApp. n8n receives that confirmation, checks the order details, and creates a Razorpay payment link with the order number as the reference. n8n sends the link in the same chat with the total and the expiry time. Razorpay sends a webhook when the payment is captured, failed, or when the link expires. n8n verifies that webhook, updates the Sheets row from payment link sent to paid or failed, and sends the matching WhatsApp confirmation. Your team sees one clean row per order, not five chats to decode.

Order flow from WhatsApp to n8n to Razorpay to one Google Sheets row

One order, one Order ID, one Sheet row. Failed and expired payments stay on the same row.

This state discipline is what most quick tutorials skip. Without it, you get two rows for one order, a paid message for a failed payment, or a dispatch for an unpaid order. The automation is only useful if the Sheet always matches Razorpay.

What you need before you build

You need four accounts and one decision about hosting. The accounts are n8n, Razorpay, WhatsApp Business Platform access through an approved provider, and Google Sheets. The decision is whether n8n runs self-hosted on your own server or on n8n Cloud. Self-hosted can lower running costs and keep data in accounts you control. Cloud can be faster to start and easier to maintain for a small team.

For WhatsApp, use the official WhatsApp Business Platform through an approved Business Solution Provider, often called a BSP. Providers such as Wati, AiSensy, Interakt, and 360dialog appear in competitor guides; that is not an endorsement. Compare template support, per-message pricing, API limits, and who owns the number if you switch. Do not build a retail order flow on a personal WhatsApp number, unofficial automation, or screen scraping. Those approaches risk a number ban and break without warning, and they do not support approved templates at scale.

For Razorpay, you need a live account with KYC complete, API keys stored securely, and webhook secrets configured. For Sheets, you need one master order sheet with locked columns and one owner who can fix data. For n8n, you need credentials for Razorpay, WhatsApp, and Google Sheets stored in n8n, not pasted into chat messages or shared sheets.

Step-by-step build in n8n

Build in this order. Test each step before you add the next one. A workflow that is half tested will create the exact chaos it was meant to remove.

n8n workflow nodes for WhatsApp order capture, Razorpay link, webhook verification and Sheets update

Two workflows: order capture and link sending, then webhook verification and one-time Sheet update.

Step 1: Capture the confirmed order

Start with a WhatsApp trigger or a webhook from your WhatsApp provider. The trigger should capture the customer phone number in E.164 format, the message text, and the timestamp. Add a validation step that checks for three fields before anything else: customer name or phone, items with quantity, and total amount. If any field is missing, n8n sends a clarification message and stops. It does not create a payment link for an incomplete order.

Write the order to Sheets before you create the payment link. Use a unique order ID, such as SUR-2026-1041, as the single key for the whole flow. Set the status to payment link sent. This early write matters. If the workflow fails later, you can see which orders never got a link and follow up.

Call Razorpay to create a payment link for the exact total, with the order ID as the reference and a clear expiry time. Store the link ID and the link URL in the Sheets row. Send the link on WhatsApp with the order summary, total, and expiry. Use an approved WhatsApp template for this message. Do not send a raw link in a freeform message outside the allowed window and expect it to work at scale.

Step 4: Listen for Razorpay webhooks

Create a second n8n workflow that listens only for Razorpay webhooks. Subscribe to payment.captured, payment.failed, payment_link.paid, payment_link.expired, and payment_link.cancelled. Verify the signature on every event using the raw request body. If verification fails, log it and stop. Never trust a webhook payload that cannot be verified, and never update Sheets from an unverified request.

Step 5: Update Sheets once, then message the customer

When a verified payment_link.paid or payment.captured event arrives, n8n should look up the order ID, check if the row is already marked paid, and only then update it. This duplicate check prevents double counting when Razorpay retries a webhook. After the Sheet update succeeds, n8n sends the paid confirmation on WhatsApp with order ID, amount, and next step for pickup or dispatch. If the event is payment failed or link expired, n8n updates the status, sends a retry message with a new link if the customer wants it, and does not create a new order row.

Step 6: Alert your team on exceptions

Add a failure branch that sends an alert to your team when a webhook fails, a Sheet update fails, or an order stays in payment link sent for too long. The alert should include order ID, phone, amount, and the exact error. A quiet failure is worse than a loud one. Your team should know the same day, not at month end.

Google Sheets setup that prevents messy data

Your Sheet is your order book, so design it like one. Use one row per order and one tab for orders. Do not let staff add columns, merge cells, or type over formulas in the master tab. If staff need a working view, give them a filtered view or a second tab that reads from the master.

Google Sheets order book schema with Order ID, payment status and order status columns

One row per order. Lock the master tab and keep status values controlled.

Use these columns in this order: Order ID, Customer Name, Phone, Items, Quantity, Total Amount, Payment Link ID, Payment Status, Razorpay Payment ID, Order Status, Created At, Paid At, and Notes. Keep Phone as text, not as a number, so leading zeros and country codes survive. Keep Total Amount as a number with two decimals. Keep Payment Status and Order Status as controlled values, not free text. Allowed Payment Status values are link sent, paid, failed, and expired. Allowed Order Status values are awaiting payment, ready for dispatch, dispatched, picked up, and cancelled.

Add a daily check tab that counts orders by status and sums paid amounts. That tab is your five-minute morning check. If paid orders in Sheets do not match paid payments in Razorpay, stop and fix the webhook or the duplicate check before you process dispatches.

WhatsApp templates and compliance basics

WhatsApp Business messaging has two modes that matter here. Inside the 24-hour customer service window, you can reply more freely. Outside that window, you must use an approved template for notifications such as payment links, order confirmations, and reminders. Build your templates early and get them approved before launch. Typical templates for this flow are order confirmation with payment link, payment received confirmation, payment failed retry, and link expired notice.

Keep templates short, factual, and personalised with name, order ID, amount, and expiry. Do not add marketing claims to a utility template. Do not send bulk marketing messages from the same number without understanding the separate rules and costs for marketing templates. If a customer replies STOP or asks not to be messaged, respect it and log the opt out in Sheets.

Illustrative example: a Surat retailer day with automation

This example is illustrative, not a verified client case. It shows how the flow behaves under real shop pressure.

A textile retailer in Adajan takes WhatsApp orders for sarees and dress materials. At 11:04 AM, a customer confirms two items for ₹3,850. n8n validates the order, writes row SUR-2026-1041 as payment link sent, creates a Razorpay link for ₹3,850, and sends it on WhatsApp. At 11:07 AM, Razorpay sends a verified payment captured webhook. n8n checks for duplicates, marks the row paid, and sends a confirmation with pickup details. At 11:09 AM, the ops manager sees one clean paid row and packs the order. At 6:30 PM, another customer lets a link expire. n8n marks that row expired, sends a polite retry message, and does not create a second order. The day ends with no bank app checks, no notebook search, and no "did she pay" chats.

The value is not speed alone. It is that the Sheet, Razorpay, and WhatsApp all agree. That agreement is what makes dispatch safe and month-end reconciliation fast.

Costs, time, and build versus buy

Costs have four parts: n8n hosting, WhatsApp provider and Meta template fees, Razorpay transaction fees, and build and maintenance time. Do not compare only the monthly tool fee. Compare the cost of missed payments, duplicate orders, and staff time spent chasing confirmations.

Razorpay's India pricing page (accessed 29 November 2026) lists a 2% platform fee per successful domestic transaction plus 18% GST on the fee, with no setup fee, annual maintenance charge, or refund fee. Meta charges per-message rates for WhatsApp templates that vary by category and country; check the official WhatsApp Business pricing page for current India rates. BSPs add their own fees, so ask for a line-item quote for templates, conversations, and support.

A simple flow can be built and tested in days, not months, if templates and Razorpay webhooks are ready. The slowest parts are usually WhatsApp template approval, Razorpay KYC, and cleaning the existing Sheets process. If your order process is still unclear on paper, fix it on paper first. Automation will make a messy process faster, not cleaner.

Use this build versus buy checklist. Build in n8n if you need custom order logic, you want data in your own accounts, and you have someone to maintain webhooks. Use a no-code connector such as Pabbly Connect if you want a faster start and your flow is simple. Use a WhatsApp commerce tool if you need catalog, storefront, and marketing in one place and can accept less custom logic. Choose the option that your team can maintain after launch, not the one that looks fastest in a demo.

Common mistakes that break reconciliation

  • Creating a new order row on every webhook: Use Order ID as the key and update the same row. Never append a new row for a payment event.
  • Skipping webhook verification: An unverified webhook can mark an unpaid order as paid. Verify every event with the raw request body.
  • Ignoring duplicate webhooks: Razorpay can retry delivery. Check if the row is already paid before you update or message.
  • Sending links without expiry and status: A link without expiry creates confusion. Always store expiry and update status on expired events.
  • Using personal WhatsApp for order automation: It risks a ban and does not scale with templates. Use the official Business Platform.
  • Letting staff edit the master Sheet: Lock columns, use controlled status values, and keep a separate working view.
  • No failure alerts: If n8n fails silently overnight, orders pile up. Alert on every exception and check the daily status tab each morning.

Failure matrix for duplicate webhooks, expired links, failed payments and Sheet errors

Decide the action before launch. Each failure updates the same row; it does not create a new order.

Limitations and when to involve a specialist

This flow works best for confirmed, fixed-price orders with standard items. It is weaker for custom orders that need photos, measurements, or approvals before payment. It is also weaker if you need inventory sync across multiple shops, GST invoicing, or courier tracking in the same flow. Those can be added, but they add failure points and need careful testing.

Involve a specialist if you need webhook security review, high order volume, multi-store inventory, refunds and partial payments, or integration with Tally, Zoho Books, or a POS. Also involve a specialist if your team has no one to monitor failures. An automation that no one owns will fail quietly. For related builds, see WhatsApp order automation and the WhatsApp Razorpay payment link guide. If your reconciliation already breaks between WhatsApp and Tally, the Tally automation failure guide covers that side.

This guide is not legal advice. For WhatsApp opt-in, data handling, and payment compliance, consult a qualified professional and check the official WhatsApp Business and Razorpay documentation as of your launch date.

A note on evidence

This guide is based on researched workflows, the official Razorpay and Meta documentation cited below, and competitor gap analysis. It is not a claimed JUHENZA client deployment. No client result, order log, or screenshot is presented as real. The Surat example is illustrative. If you want proof for a specific build, ask for the order state map, the webhook log, the Sheet schema, and a failed-payment test result with customer data removed.

FAQ

Can I automate WhatsApp orders without n8n?

Yes. You can use a no-code connector or a WhatsApp commerce tool to send payment links and log orders. n8n is a good choice when you need custom validation, duplicate checks, and full control over webhooks and Sheets logic.

Do I need WhatsApp Business API for this automation?

For a durable retail flow, yes. The official WhatsApp Business Platform through an approved provider supports templates, reliable delivery, and compliance at scale. Personal WhatsApp automation is not a safe base for order payments.

The link expired event should mark the order as expired, not paid. If a payment still arrives, Razorpay will show it separately. Your team should check the Razorpay dashboard, match it to the Order ID, and update Sheets manually. Do not auto-mark an expired order as paid without a verified payment captured event.

How do I stop duplicate orders when Razorpay retries a webhook?

Use Order ID as the single key. Before any Sheet update, check if the row is already marked paid. If it is, log the duplicate and stop. Never append a new row for a payment event.

Can this automation handle cash on delivery orders?

Yes, with a separate path. For cash on delivery, set Order Status to confirmed COD and Payment Status to COD, and skip the Razorpay link step. Keep COD orders in the same master Sheet so your dispatch list stays complete.

How do I handle refunds or cancellations?

Handle refunds in Razorpay first, then update Sheets to refunded or cancelled with a note and timestamp. Do not delete the row. A cancelled row is still evidence for reconciliation and for customer follow up.

How long does it take to launch this flow?

A simple flow can be tested in days if WhatsApp templates, Razorpay KYC, and Sheets design are ready. The slowest parts are usually template approval and cleaning the current order process. Test with real phones, real links, and real failed payments before you go live.

Will this work for a small shop with 10 orders a day?

Yes. Even at low volume, the value is fewer missed payments and a clean order book. Start with one product category or one order type, prove the flow, then expand to other categories.

Where this fits

This post sits in Workflow Automation > WhatsApp Automation. It is the how-to companion to a WhatsApp automation service offer. For the build, see AI automation services. For related reading, browse all JUHENZA articles.

Conclusion

Manual WhatsApp orders feel fast until you count the follow ups, the missed payments, and the month-end reconciliation. A n8n Razorpay WhatsApp Sheets automation removes the repeatable middle, keeps one true order book, and lets your team focus on packing, service, and sales.

If you want this built for your Surat shop with your products, your templates, and your Sheets structure, send your project brief and bring one week of real WhatsApp orders plus your current Sheet. That is enough to design the flow, test it, and launch it without disrupting live sales.

References

  1. Razorpay — Payment Links webhook events
  2. Razorpay — India pricing
  3. Meta — WhatsApp service messages and the 24-hour window

Related articles

Let’s discuss
your project.

Tell us what you need to build or change. If you’re still planning, use AI to draft an approach before deciding whether to share it.