For the complete documentation index, see llms.txt. This page is also available as Markdown.

Direct Payment

The Direct Payment action allows chatbot builders to collect payments directly inside chatbot workflows using integrated payment gateways.

This connection-based action helps businesses automate payment collection for products, services, bookings, and orders by dynamically generating payment requests using product details and customer variables.

The walkthrough demonstrates configuring payment gateway connections, product item variables, payment body text, goods type selection, reference IDs, tax details, expiration settings, and response storage configuration.

When to Use Direct Payment

Use the Direct Payment action when your chatbot needs to process customer payments directly within the conversation flow.

Common Use Cases

  • Product purchases

  • Restaurant orders

  • Service booking payments

  • Subscription payments

  • Delivery payments

  • Invoice collection

Example Interaction

Bot: Please complete your payment to confirm your order.

The chatbot automatically creates a payment request using the configured payment gateway.

How to Add Direct Payment

Follow these steps to add the Direct Payment action to your bot workflow.

  1. Open Bot Builder

  2. Click the Add Node button

  3. Open the Connections tab

  4. Select Payments

  5. Click Direct Payment

  6. Configure the payment settings

  7. Configure response variables

  8. Click Create

  9. Click Publish to deploy the workflow

The walkthrough demonstrates selecting the Direct Payment action from the Payments integration section.

Accessing the Connections Section

To access the Direct Payment action:

  1. Click Add Node

  2. Open the action selection panel

  3. Click the Connections tab

The walkthrough specifically notes:

Click the Connections tab to view available integration options.

Selecting Payments

Inside the Connections section:

  1. Locate Payments

  1. Click the Payments integration category

The walkthrough demonstrates opening the Payments integration options.

Selecting Direct Payment

Inside the Payments section:

  1. Locate Direct Payment

  1. Click the action to open the configuration panel

The walkthrough specifically notes:

Direct Payment to configure the payment method for customer transactions.

Direct Payment Configuration

When configuring the Direct Payment action, several fields must be completed.

Action Name

The Action Name identifies the payment workflow inside the bot builder.

This name is visible only within the workflow editor.

Example

Order Payment Restaurant Payment Booking Payment Request

The walkthrough demonstrates renaming the default value to:

Direct Payment

before saving the configuration.

Select Connection

The Select Connection field allows you to choose the configured payment gateway integration.

To configure:

  1. Open the Select Connection dropdown

  2. Select the required payment gateway

The walkthrough specifically selects:

OwnchatWhatsappPay live final

from the available connections list.

Product Items

The Product Items field contains the product or order details used for payment processing.

You can manually enter product information or dynamically insert variables.

To add variables:

  1. Click Add Variable

  1. Search for the required variable

  2. Select the variable from the list

The walkthrough demonstrates selecting:

orderMenuData

from the variables list.

The selected variable appears as:

{{variables.orderMenuData.product_items}}

inside the Product Items field.

Body Text

The Body Text field contains the payment request message shown to the customer.

Example

Pay the bill

The walkthrough demonstrates entering a payment request message inside the Body Text field.

Goods Type

The Goods Type field specifies the category of the product or service being purchased.

Available options shown in the walkthrough include:

  • Digital Goods

  • Physical Goods

The walkthrough specifically selects:

Physical Goods

as the payment category.

Reference ID

The Reference ID field stores the order or transaction reference associated with the payment.

To configure:

  1. Click Add Variable

  1. Select the required variable

The walkthrough demonstrates selecting:

ordered_details

from the variable list.

The selected variable appears as:

{{variables.ordered_details.orderId}}

inside the Reference ID field.

This reference ID helps track and validate payment transactions.

Razorpay Receipt

The Razorpay Receipt field contains the receipt description used for the payment transaction.

Example

Purchase

The walkthrough demonstrates entering the receipt text manually.

Tax Value

The Tax Value field specifies the applicable tax amount for the payment.

Example

18

The walkthrough demonstrates entering a tax value inside the payment form.

Tax Description

The Tax Description field explains the tax details applied to the transaction.

Example

GST Included

The walkthrough specifically notes:

Enter the tax description text to specify the applicable tax details.

Shipping Value

The Shipping Value field specifies additional shipping or delivery charges if applicable.

Example

50

This field can be used for physical product delivery workflows.

Expiration Data Format

The Expiration Data Format field defines the time unit used for payment link expiration.

Available options shown in the walkthrough include:

  • Minutes

  • Hours

  • Days

The walkthrough specifically selects:

Minutes

for the expiration format.

Expiration Data Value

The Expiration Data Value field defines when the payment request should expire.

Example

30

This means the payment request expires after 30 minutes.

Expiration Description

The Expiration Description field explains the expiration condition shown to the customer.

Example

This payment link expires in 30 minutes.

This helps customers understand payment validity.

Store Response Variable

The Store Response Variable field defines where the payment API response should be stored.

To configure:

  1. Select an existing variable or

  2. Create a new variable

This variable stores the payment response for later workflow processing.

Creating the Direct Payment Action

After configuring all payment settings:

  1. Review the payment configuration

  2. Click the Create button

The Direct Payment node will now appear in the workflow canvas.

Workflow Behavior

Once triggered, the Direct Payment action:

  • Connects with the configured payment gateway

  • Processes payment requests dynamically

  • Supports variable-based product information

  • Handles physical and digital goods

  • Stores payment responses automatically

The walkthrough demonstrates generating a payment request using dynamic order and menu variables.

Example Workflow

Example Chatbot Workflow

Get Order Menu ↓ Create Order ↓ Direct Payment ↓ Store Payment Response ↓ Send Payment Confirmation

Example Interaction

Bot: Your order total is ₹1,000. Please complete the payment to confirm your purchase.

The chatbot dynamically generates the payment request using the order details.

Publishing the Bot Changes

After configuring the Direct Payment workflow:

  1. Review all payment settings

  2. Click the Publish button

  3. Deploy the updated workflow to production

The walkthrough concludes by publishing the configured payment workflow successfully.

Best Practices

Follow these recommendations when using Direct Payment.

Use dynamic product variables

Automatically populate payment details using workflow variables.

Configure valid reference IDs

Use unique order IDs for accurate transaction tracking.

Set appropriate expiration limits

Avoid long expiration periods for payment requests.

Verify tax and shipping values

Ensure all payment calculations are accurate.

Test payment flows before publishing

Validate complete payment workflows before deploying to production.

Summary

The Direct Payment action allows chatbot builders to process customer payments directly inside Ownchat workflows.

With Direct Payment, you can:

  • Integrate payment gateways into chatbot workflows

  • Generate dynamic payment requests

  • Use variable-based product and order details

  • Configure taxes, shipping, and expiration settings

  • Store payment responses automatically

This connection action helps businesses create fully automated payment collection workflows and seamless commerce experiences inside Ownchat.

Last updated