How to Perform Payments in MSG91 Chatbots

MSG91 Hello Chatbots allow businesses to automate payments directly through WhatsApp. Payments can be handled seamlessly using catalog-based or custom (non-catalog) flows.


To enable payments, ensure that your payment gateway is integrated with the WhatsApp microservice. Refer to this Help Doc for the non catalog payments through msg91 chatbots.


Catalog Payments

Users can directly browse products, place orders, and make payments through Hello Chatbots.

Steps:

  1. Create a Chatbot in Hello Contact Center

    • Go to your Hello dashboard and create a new bot.

    • Give your bot a name.

    • Add a normal flow with a message card to greet users.

  2. Integrate Payment Gateways

  3. Create an Order-Based Flow

    • An order-based flow is a special type of conversation flow designed for product ordering and payment handling.

    • It works like a normal flow but includes special connectors and a default variable (catalog) for order lifecycle management.


Order-Based Flow: Key Elements

  • Start Connector
    Works the same as in normal flows — triggers nodes based on keyword matches.

  • Order-Complete Connector

    • Triggered automatically when a payment is successful.

    • Use this node to:

      • Send payment confirmation messages.

      • Share order details.

      • Provide post-purchase updates or product recommendations.

  • Order-Canceled Connector

    • Triggered automatically when a payment fails or is canceled.

    • Use this node to:

      • Notify users about the failed/canceled transaction.

      • Guide them on retrying payment or alternate steps.

  • Default Variable (catalog)
    The chatbot system provides a catalog variable containing complete details of the order process, including product selection, payment status, and transaction details.

Example Structure

{

  "id": "964657958481334",

  "selected_products": [

    {

      "id": "byix3rxqxo",

      "name": "SMS service",

      "quantity": 1,

      "price": 1

    }

  ],

  "order": {

    "reference_id": "XMUNE7YIGJ",

    "status": "completed",

    "amount": 1,

    "currency": "INR"

  },

  "transaction": {

    "id": "order_R7rfvHTBsJWyJj",

    "status": "success",

    "method": "upi",

    "type": "razorpay",

    "amount": 1,

    "currency": "INR"

  }

}


Notes

  • A chatbot can have only one order-based flow

  • Ensure your payment gateway integration is completed before enabling order flows.

  • Payment success/failure is detected automatically by the chatbot.