Payment Create Dynamic

The Payment Create Dynamic workflow allows businesses to generate dynamic payment links and send them to customers through WhatsApp.

Unlike static payment links, dynamic payment links generate the payment amount dynamically based on workflow variables, making it suitable for orders with varying prices.

This workflow automatically creates a payment request and sends the payment link to the customer through WhatsApp.

Overview

The Payment Create Dynamic workflow creates a dynamic payment request and sends the payment link to the customer.

The payment amount and order details are dynamically fetched from workflow variables.

Workflow Automation Flow

Workflow Triggered ↓ Customer Details Retrieved ↓ Dynamic Payment Link Generated ↓ WhatsApp Payment Message Sent ↓ Customer Completes Payment

Prerequisites

Before configuring the workflow, ensure the following requirements are met.

Required Access

You must have access to:

  • OwnChat Account

  • Flow Builder

  • Commerce Module

  • WhatsApp Payment Integration


Payment Gateway Setup

The payment gateway must be connected in the Apps section.

Supported integrations may include:

  • Razorpay

  • Stripe

  • Petpooja

  • Shopify

  • Other supported payment providers

Only connected apps can be selected in the workflow configuration.


Creating a New Workflow

Step 1: Open Flow Builder

  1. Log in to OwnChat.

  2. Navigate to Flow Builder.

  3. Click Create New Flow.


Step 2: Enter Workflow Details

In the Create New Flow window:

  1. Enter the workflow name in the Flow Name field.

Example:

Payment Create Dynamic

  1. Click the Create button.

This saves the workflow and opens the workflow builder canvas.


Selecting the Payment Application

After creating the workflow, configure the payment application.

Step 1: Choose Application

Select the application used for payment processing.

Example:

WhatsApp Payment


Configuring Payment Integration

Step 1: Select Connection

Under the Connection section:

Choose the configured payment account.

Example:

Connection: Test

The application must first be connected in the Apps section before it can be used in the workflow.


Selecting the Event

After selecting the connection, choose the required event.

Example event:

payment.create.dynamic

This event generates a dynamic payment link.


Adding Response Variable

Store the response from the payment service in a variable.

Variable Name

response

This variable stores the payment information including:

  • Payment link

  • Order details

  • Customer details

  • Transaction data


Updating the Trigger Configuration

After configuring the connection and event:

Click:

Update

This saves the trigger configuration.


Workflow Trigger Node

Once configured, the workflow builder displays the trigger node.

Example trigger:

payment.create.dynamic

This indicates the workflow starts when the dynamic payment creation event is executed.


Adding the Next Action

After the trigger is configured:

  1. Click Add Node

  2. Select the required action.


Configuring Dynamic Payment Creation

The next step is to configure the dynamic payment request.

Step 1: Action Name

Enter a descriptive name.

Example:

Create Dynamic Payment Link


Configuring Payment Amount

Unlike static payment creation, the payment amount is dynamically retrieved.

Step 1: Add Variable

Click Add Variable to insert the dynamic amount.

Example variable:

order_amount

This variable fetches the order amount dynamically.


Selecting Currency

Choose the currency for the payment.

Example:

INR


Payment Description

Enter the payment description.

Example:

Order Payment


Adding Customer Information

The system requires customer details to send the payment link.

Customer Contact Number

Enter the customer contact number.

Click Add Variable to insert the dynamic phone number.

Example:

customer_phone


Customer Name

Insert the dynamic customer name variable.

Example:

customer_name


Sending the Payment Link

After generating the dynamic payment link, send the payment request message to the customer.

Action Name

Send Dynamic Payment Link


Message Configuration

Enter the message text in the message field.

Example message:

Hi {{customer_name}}, Please complete your payment using the link below. {{payment_link}} Thank you!


Adding Payment Link Variable

Insert the generated payment link using a variable.

Click Add Variable.

Example:

response.payment_link

This dynamically inserts the generated payment URL.


Saving the Action

After configuring the message:

Click:

Add Action

This saves the workflow action.


Searching Workflow Actions

To quickly locate workflow actions:

  1. Use the Search Bar

  2. Enter the action name

  3. Select the required action from the filtered results.


Verifying the Workflow

Before publishing the workflow, verify the configuration.

The Flow Builder includes three sections:

  • Summary

  • Flow Builder

  • History

These sections help review workflow configuration and activity.


Publishing the Workflow

After completing the configuration:

Click:

Publish

Example workflow status:

Payment Create Dynamic – Published

The workflow will now run automatically when triggered.


Testing the Workflow

Before using the workflow in production, perform a test.

Steps

  1. Trigger the Payment Create Dynamic workflow.

  2. Confirm that the system generates a payment link.

  3. Verify that the WhatsApp message is sent to the customer.

  4. Test the payment link to ensure it redirects correctly to the payment gateway.


Troubleshooting

Payment Link Not Generated

Possible reasons:

  • Payment gateway not connected

  • Incorrect event selected

  • Trigger configuration not saved


WhatsApp Message Not Sent

Check the following:

  • Customer phone number variable

  • Message configuration

  • Workflow publishing status


Best Practices

Use Dynamic Variables

Always use variables such as:

response

to dynamically access payment data.


Verify Payment Integration

Ensure the payment gateway is connected in the Apps section before configuring the workflow.


Test Payment Flow

Perform test payments before enabling the workflow in production.


Summary

The Payment Create Dynamic workflow generates a payment link dynamically and sends it to the customer via WhatsApp.

Automation flow:

  1. Workflow is triggered

  2. Dynamic payment link is generated

  3. Customer receives payment link

  4. Customer completes payment

This workflow enables businesses to collect variable payments efficiently through WhatsApp automation.

Last updated