Skip to content
Meta Business PartnerStep-by-step guide

How to connect Razorpay to the WhatsApp Business API

Sending a Razorpay payment link over WhatsApp turns a chat into a checkout — the customer taps a button in the same thread where they asked about your product and pays without leaving the app. This guide walks through wiring Razorpay to the official WhatsApp Business API through InfiQ: generating links, delivering them inside an approved template, and catching the paid/failed webhook so you can auto-send a receipt. It assumes you already have an active WhatsApp Business API account and a live Razorpay account; everything else is covered below, including the mistakes that quietly break payment flows.

Razorpay Payment Links + WhatsApp API
Integration
Utility (transactional)
Template category
Per delivered message (ex-GST)
Billing
payment.captured, payment.failed
Key webhooks
Yes, for manual link sends
No-code path
India-based, InfiQ
Support

What you'll do

Generate a Razorpay Payment Link (via dashboard or API), drop the short URL into an approved WhatsApp utility template, send it through InfiQ, and listen for Razorpay's payment.captured webhook to fire an automatic confirmation message — all inside one WhatsApp thread.

Step 1 — Get your Razorpay keys and confirm both accounts are live

Before any message goes out, make sure the two systems you're joining are ready. On the Razorpay side you need API credentials and a live account; on the InfiQ side you need a verified WhatsApp Business API number with a green quality rating. Grab these first so you're not switching tabs mid-setup.

  • In the Razorpay Dashboard, go to Account & Settings > API Keys and generate a Key ID and Key Secret (use Live mode keys, not Test).
  • Confirm your Razorpay account has completed KYC — payment links will not activate otherwise.
  • In InfiQ, verify your WhatsApp Business API number is connected, verified, and showing a healthy quality rating.
  • Decide who sends the link: the Razorpay dashboard (manual/no-code) or your backend via the Payment Links API (automated).

Step 2 — Create the Razorpay Payment Link

A Payment Link is a short, self-contained checkout URL Razorpay hosts for you — no gateway integration on your website required. You can create one by hand for a single invoice, or generate them programmatically so every order gets its own link. For WhatsApp, the key detail is that you want the short URL Razorpay returns, and you want to prefill the customer's phone and amount so the checkout feels finished, not generic.

  • No-code: Dashboard > Payment Links > Create Payment Link, enter amount, description, and customer details, then copy the generated short_url.
  • API: POST to /v1/payment_links with amount (in paise), currency INR, and a customer object — Razorpay returns a short_url in the response.
  • Set reference_id to your own order or invoice number so you can reconcile the payment later.
  • Enable 'Send notification' off if InfiQ is delivering the message — you don't want Razorpay double-sending an SMS.

Step 3 — Build and approve the WhatsApp template that carries the link

You cannot paste a raw payment link into WhatsApp business-initiated messaging without an approved template. The right choice here is a Utility template, because sending a payment request tied to a specific order is a transactional event, not promotion — and utility messages are cheaper to deliver than marketing ones. Put the Razorpay short URL in a variable and, ideally, in a URL button so the customer taps rather than copies. Keep the copy transactional; anything that reads like an upsell risks a Marketing reclassification or rejection.

  • In InfiQ, create a template under the Utility category with variables for customer name, order number, and amount.
  • Add a dynamic URL button and map its variable to the Razorpay short_url.
  • Avoid promotional phrasing ('special offer', 'buy now') — describe the specific transaction instead.
  • Submit for Meta approval; utility templates are usually reviewed quickly, but leave buffer before a launch.

Step 4 — Send the payment message through InfiQ

With the template approved, sending is a matter of passing the customer's number and the variable values — including the freshly generated Razorpay link — to the template. You can trigger this from InfiQ's dashboard for one-off sends, from a no-code flow when an order is created, or from the API for high volume. Remember the billing model: WhatsApp charges per delivered message by category, so each utility payment message is billed at the utility rate, shown in InfiQ as transparent ₹ pricing (ex-GST). There's no per-conversation bundle to reason about — it's per delivered message.

  • Populate the template variables: {{1}} name, {{2}} order number, {{3}} amount, and the button URL with the short_url.
  • For automation, call InfiQ's send API right after your order-created event so the link is fresh.
  • Test to your own number first and tap the button to confirm it opens the correct Razorpay checkout.

Step 5 — Listen for payment status and auto-confirm

The flow feels complete to the customer only when they get a confirmation the moment they pay. Razorpay pushes webhooks for events like payment.captured (success) and payment.failed. Point that webhook at your backend (or an InfiQ automation), match the reference_id back to the order, and fire a second WhatsApp message — a receipt on success, or a gentle retry link on failure. This closes the loop entirely inside one thread.

  • In Razorpay Dashboard > Settings > Webhooks, add your endpoint URL and subscribe to payment.captured and payment.failed.
  • Verify the X-Razorpay-Signature header on every webhook so you only trust genuine events.
  • On payment.captured, send a Utility confirmation template with the amount and reference_id.
  • On payment.failed, optionally re-send the payment link so the customer can retry without leaving WhatsApp.

Tips and common mistakes to avoid

Most Razorpay-on-WhatsApp problems are not integration bugs — they're template and timing issues. The recurring failures are choosing the wrong template category (which raises cost or gets the template rejected), letting a payment link expire before the customer opens it, and skipping webhook signature verification. A little discipline up front keeps delivery rates high and reconciliation clean.

  • Don't use a Marketing template for a payment request — Utility is correct and costs less per delivered message.
  • Regenerate the link per order; never reuse one link for multiple customers or you can't reconcile payments.
  • Always verify the webhook signature — an unverified endpoint can be spoofed into sending false 'paid' confirmations.
  • Set a sensible link expiry and handle the expired state, so a customer who pays days later doesn't hit a dead page.
  • Never send unsolicited payment links — the customer must have opted in and be expecting the transaction.

Do this in InfiQ now

Talk to InfiQ

Want us to set this up with you?

Tell us where you’re stuck — we’ll walk you through it and get you live.

Step 1 of 2
WhatsApp

Protected by invisible spam checks · replies within 1 working day

Frequently asked questions

Can I collect a Razorpay payment entirely inside WhatsApp?+
The customer never leaves WhatsApp to receive and tap the link, and Razorpay's checkout opens in-app. Payment is completed on the secure Razorpay page, and the confirmation lands back in the same WhatsApp thread — so from the customer's view it's one continuous conversation.
Which WhatsApp template category should a payment link use?+
Use the Utility category. A payment request tied to a specific order is transactional, so it belongs in Utility — which is also billed at the lower utility rate. Sending it as Marketing risks rejection and costs more per delivered message.
How is this billed?+
WhatsApp charges per delivered message by category, so each utility payment message and each utility confirmation is billed at the utility rate. InfiQ shows this as transparent ₹ pricing (ex-GST). Razorpay's own transaction fees are separate and charged by Razorpay.
Do I need a developer to set this up?+
For a manual flow — creating a Payment Link in the Razorpay dashboard and sending it via an approved template — no code is required in InfiQ. Automating link generation on every order and auto-confirming via webhooks does need a small amount of backend work with the Razorpay and InfiQ APIs.
How do I automatically send a receipt after payment?+
Subscribe to Razorpay's payment.captured webhook, verify the signature, match the reference_id to your order, and trigger a Utility confirmation template through InfiQ. On payment.failed you can re-send the payment link so the customer retries in the same thread.
Why did my payment template get rejected?+
The most common cause is promotional wording ('offer', 'discount', 'buy now') in what should be a plain transactional message, which pushes Meta to reclassify or reject it. Keep the copy specific to the order and amount, and submit under the Utility category.
Can I reuse one payment link for several customers?+
You shouldn't. Generate a fresh link per order with a unique reference_id, otherwise you can't reconcile which customer paid, and Razorpay's amount and expiry won't match each recipient. Per-order links keep both delivery and accounting clean.
How long does the whole setup take?+
Once both accounts are live, the manual flow takes minutes: generate a link, drop it into an approved template, and send. Building the automated version — link-on-order plus webhook confirmation — is typically a short afternoon of backend work, and InfiQ's India-based support can guide you through it.

Turn WhatsApp chats into paid orders

Talk to InfiQ's India-based team and get Razorpay payment links, approved templates, and auto-confirmations live on the official WhatsApp Business API — with transparent ₹ pricing and full BSUID ownership.