Tutorial: collect payments in a WhatsApp chatbot
🎯 Goal
A customer picks a product, pays by UPI in the chat, and gets an automatic confirmation, without anyone on your team lifting a finger.
🧰 What you need
- A live Razorpay account
- Razorpay connected in Integrations (Payment links)
Step 1: connect Razorpay
Section titled “Step 1: connect Razorpay”Integrations → Razorpay: Key ID + secret, then add the webhook URL in Razorpay with the same secret, ticking payment_link.paid, payment_link.expired, payment_link.cancelled and payment.failed. Full steps: Payment links.
Step 2: the order flow
Section titled “Step 2: the order flow”Automation → New chatbot Quick order. Click the Trigger card → Match keyword order, buy. Use a chatbot, not a rule: the payment step waits for the customer, which run-alongside flows can’t do.
- Click + beside the trigger and add a List message “What would you like?” with rows Kaju katli 500 g — ₹560, Rasgulla 1 kg — ₹420, Mixed box — ₹750.
- Click + beside each row’s branch and add Save variable
item= the product name andamount= the price (e.g.560). - Ask question “Delivery address?” → Save the answer to
address. The answer is saved on the contact too.
Step 3: the payment step
Section titled “Step 3: the payment step”Add Send payment link:
- Amount (₹):
{{amount}} - Description:
{{item}} - Message:
Please complete your payment of ₹{{payment_amount}} here:, Button label Pay now - Link expires after (minutes):
60
Branches:
- paid → Send message
✅ Payment received — thank you! Your {{item}} will be delivered to {{address}} today.→ Set / remove tagpaid→ Notify agentPaid order: {{item}} → {{address}}. - failed / expired → Reply buttons “The payment didn’t go through. Try again?” → Try again (→ Go to step: Send payment link) / Pay on delivery (→ Human handoff).
Step 4: test end to end
Section titled “Step 4: test end to end”Click Test first: the simulator stops at the payment step, because it can’t pay. Then Check and Publish. Use Razorpay test keys first. Run it from your phone, pay with Razorpay’s test UPI/card, and watch the flow continue. Then switch to live keys.
Pay inside the chat; the flow continues by itself.
Step 5 (optional): one thank-you flow for every payment
Section titled “Step 5 (optional): one thank-you flow for every payment”Payments started from the inbox or Orders also fire the Payment trigger. Create a New rule with the trigger Payment, When the payment: is paid, that sends a thank-you and asks for a review 3 days later (Delay → Template message). Sending links from the inbox: Tutorial: collect a payment in chat.
What’s next
Section titled “What’s next”Was this page helpful?
Thank you — we read every comment.
Could not send right now. Please try again later.
© 2026 MeAPI by TheWebStore028 · RADHAMADHAV WEBSTORE LLP · GSTIN 27ABJFR6148J1ZO · Contact us ·Cookie settings