> For the complete documentation index, see [llms.txt](https://docs.ownchat.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ownchat.app/bot/connections/direct-payment.md).

# 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.

{% embed url="<https://app.supademo.com/demo/cmncpnzyd0tehxtgup2tmnk20?utm_source=link>" %}

### When to Use Direct Payment &#x20;

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

### Common Use Cases &#x20;

* Product purchases
* Restaurant orders
* Service booking payments
* Subscription payments
* Delivery payments
* Invoice collection

**Example Interaction** &#x20;

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 &#x20;

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 &#x20;

To access the Direct Payment action:

1. Click **Add Node**
2. Open the action selection panel
3. Click the **Connections** tab

{% embed url="<https://app.supademo.com/demo/cmpc75bgr0cwtxa0jxoo98ige?utm_source=link>" %}

The walkthrough specifically notes:

Click the Connections tab to view available integration options.

### Selecting Payments &#x20;

Inside the Connections section:

1. Locate **Payments**

{% embed url="<https://app.supademo.com/demo/cmpc77vx80cltz70jiboup14o?utm_source=link>" %}

2. Click the Payments integration category

The walkthrough demonstrates opening the Payments integration options.

### Selecting Direct Payment &#x20;

Inside the Payments section:

1. Locate **Direct Payment**<br>

{% embed url="<https://app.supademo.com/demo/cmpc78shk0clvz70jyqbxcmga?utm_source=link>" %}

2. 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 &#x20;

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

#### Action Name &#x20;

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

This name is visible only within the workflow editor.<br>

{% embed url="<https://app.supademo.com/demo/cmpc7jun40cm9z70jqqo1jywc?utm_source=link>" %}

**Example** &#x20;

Order Payment\
Restaurant Payment\
Booking Payment Request

The walkthrough demonstrates renaming the default value to:

Direct Payment

before saving the configuration.

### Select Connection &#x20;

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

{% embed url="<https://app.supademo.com/demo/cmpc7qj3m02uov70jh5fde6fi?utm_source=link%E2%80%8B>" %}

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.<br>

{% embed url="<https://app.supademo.com/demo/cmpc7riyl000kwo0j7zo4yu0p?utm_source=link>" %}

### Product Items &#x20;

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**

{% embed url="<https://app.supademo.com/demo/cmpc7sx5202uqv70jylh3ztqh?utm_source=link>" %}

2. Search for the required variable
3. Select the variable from the list

The walkthrough demonstrates selecting:

orderMenuData

from the variables list.<br>

{% embed url="<https://app.supademo.com/demo/cmpc7u3ik0d0rxa0jir23nefv?utm_source=link>" %}

The selected variable appears as:

{{variables.orderMenuData.product\_items}}

inside the Product Items field.

### Body Text &#x20;

The **Body Text** field contains the payment request message shown to the customer.<br>

{% embed url="<https://app.supademo.com/demo/cmpc7vr760d0txa0jyy9ip3v6?utm_source=link>" %}

#### Example &#x20;

Pay the bill

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

#### Goods Type &#x20;

The **Goods Type** field specifies the category of the product or service being purchased.<br>

{% embed url="<https://app.supademo.com/demo/cmpc7ylvk0d0vxa0jcko80ebd?utm_source=link>" %}

Available options shown in the walkthrough include:

* Digital Goods
* Physical Goods

The walkthrough specifically selects:

Physical Goods

as the payment category.<br>

{% embed url="<https://app.supademo.com/demo/cmpc7zspc02wbv70jd0a2w3z6?utm_source=link>" %}

### Reference ID &#x20;

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

To configure:

1. Click **Add Variable**<br>

{% embed url="<https://app.supademo.com/demo/cmpc824of0cqvz70jj7zlwies?utm_source=link>" %}

2. Select the required variable

The walkthrough demonstrates selecting:

ordered\_details

from the variable list.<br>

{% embed url="<https://app.supademo.com/demo/cmpc83yrk000pwo0jswwoz66l?utm_source=link>" %}

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 &#x20;

The **Razorpay Receipt** field contains the receipt description used for the payment transaction.<br>

{% embed url="<https://app.supademo.com/demo/cmpc86c93001cwo0jqdkvkp0z?utm_source=link>" %}

**Example** &#x20;

Purchase

The walkthrough demonstrates entering the receipt text manually.

### Tax Value &#x20;

The **Tax Value** field specifies the applicable tax amount for the payment.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8b1ni0cqxz70j6ht9j3u0?utm_source=link>" %}

Example &#x20;

18

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

### Tax Description &#x20;

The **Tax Description** field explains the tax details applied to the transaction.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8cr600cqzz70jwxoy6gqi?utm_source=link>" %}

**Example** &#x20;

GST Included

The walkthrough specifically notes:

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

### Shipping Value &#x20;

The **Shipping Value** field specifies additional shipping or delivery charges if applicable.<br>

**Example** &#x20;

50

This field can be used for physical product delivery workflows.

### Expiration Data Format &#x20;

The **Expiration Data Format** field defines the time unit used for payment link expiration.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8e2l7001xwo0jv78nad03?utm_source=link>" %}

Available options shown in the walkthrough include:

* Minutes
* Hours
* Days

The walkthrough specifically selects:

Minutes

for the expiration format.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8kkx7009gwo0jie46bt8u?utm_source=link>" %}

### Expiration Data Value &#x20;

The **Expiration Data Value** field defines when the payment request should expire.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8lhd80d2pxa0j3c81fzjl?utm_source=link>" %}

**Example** &#x20;

30

This means the payment request expires after 30 minutes.

### Expiration Description &#x20;

The **Expiration Description** field explains the expiration condition shown to the customer.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8n0yt0cr2z70j3knf1756?utm_source=link>" %}

**Example** &#x20;

This payment link expires in 30 minutes.

This helps customers understand payment validity.

### Store Response Variable &#x20;

The **Store Response Variable** field defines where the payment API response should be stored.<br>

{% embed url="<https://app.supademo.com/demo/cmpc8o4m0009iwo0j4q73fxph?utm_source=link>" %}

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 &#x20;

After configuring all payment settings:

1. Review the payment configuration
2. Click the **Create** button<br>

{% embed url="<https://app.supademo.com/demo/cmpc8oz4k0cr6z70jwkp1khud?utm_source=link>" %}

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

### Workflow Behavior &#x20;

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 &#x20;

#### Example Chatbot Workflow &#x20;

Get Order Menu\
&#x20;       ↓\
Create Order\
&#x20;       ↓\
Direct Payment\
&#x20;       ↓\
Store Payment Response\
&#x20;       ↓\
Send Payment Confirmation

**Example Interaction**&#x20;

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 &#x20;

After configuring the Direct Payment workflow:

1. Review all payment settings
2. Click the **Publish** button
3. Deploy the updated workflow to production<br>

{% embed url="<https://app.supademo.com/demo/cmpc8q03x0cr8z70jm3xf9elw?utm_source=link>" %}

The walkthrough concludes by publishing the configured payment workflow successfully.

### Best Practices &#x20;

Follow these recommendations when using **Direct Payment.**

### Use dynamic product variables &#x20;

Automatically populate payment details using workflow variables.

### Configure valid reference IDs &#x20;

Use unique order IDs for accurate transaction tracking.

### Set appropriate expiration limits &#x20;

Avoid long expiration periods for payment requests.

### Verify tax and shipping values &#x20;

Ensure all payment calculations are accurate.

### Test payment flows before publishing &#x20;

Validate complete payment workflows before deploying to production.

### Summary &#x20;

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.**
