Skip to content

Collect a Payment in a Chatbot

The Collect Payment block sends the customer a WhatsApp order: your items, their prices and a total, with WhatsApp’s Review and pay button. They pay without leaving the chat, through your own Razorpay or PayU account, and your bot carries on from On paid or On failed.

Use it for anything with a price you know at that point in the chat: a consultation fee, a booking advance, course fees, a quote you just worked out. You don’t need a product catalog.

  1. In Bot Builder, open a flow and click Add New Block → Collect Payment.

    The Select Block Type dialog with Collect Payment highlighted, next to Offer a Booking and Add to Segment
  2. Write the Message shown above the order, for example “Please pay to confirm your booking.” If you leave it empty, the customer sees “Please complete the payment to confirm your order”.

  3. Add your Order items: a name, a price in rupees and a quantity for each. The Total adds them up.

    Collect Payment block settings: a green card naming the Razorpay payment configuration, the message, two order items and the total
  4. Optionally add a Footer, a Message After Payment and a Message If Payment Fails.

    The footer, message after payment and message if payment fails fields
  5. Connect On paid and On failed on the canvas (see below), then save the flow.

  • Whole rupees only. 1499, 1,499 and ₹1499 all work. 99.50 is refused, and the block goes to On failed rather than rounding.
  • Quantity is optional and defaults to 1. It must be a whole number of 1 or more.
  • Empty rows are skipped. An order needs at least one item and a total above ₹0.
  • No tax is added. The customer pays exactly the total of your items. The Tax Percentage in Order Management is only for catalog orders.

Name, price and quantity can all use variables from earlier in the flow, so one block can charge each customer a different amount:

WriteComes from
{{reportFee}}A value saved earlier in the flow: a Question block’s answer, or a value saved by an HTTP Request block from your own system
{{$name}}The contact’s name, for example in an item name like Consultation for {{$name}}

When the price uses a variable, the editor shows the total as Worked out when sent.

A flow on the canvas: Send a Message, then Collect Payment with On paid connected to a confirmation message and On failed connected to a retry message

The block waits after it sends the order. Nothing after it runs until WhatsApp tells us how the payment went.

What happenedWhat runs
The customer paidMessage After Payment, then On paid. If On paid isn’t connected, the block’s normal output runs instead.
The payment failedMessage If Payment Fails, then On failed
The order couldn’t be sent at allMessage If Payment Fails, then On failed, straight away

If you leave a message empty and connect nothing, the customer still gets a default: “Payment received. Thank you!” or “Payment failed. Please try again.”

Things to put after On paid: a confirmation, Update Contact to set a status or tag, a link to the next step. After On failed: a retry nudge, or Start Live Chat so your team can help.

The block sends nothing and goes to On failed at once if:

  • payments aren’t set up in Order Management
  • an item has no name, the price isn’t a whole number, or the quantity is below 1
  • there are no items, or the total is ₹0

The editor warns you about the first one:

Warning in the Collect Payment block: Payments are not set up, with a link to Open Order Management

Open Order Management ↗ opens the settings in a new tab. When you come back to the flow, the warning clears on its own once payments are set up.

See every payment in Payments and orders in the inbox.