# Payment Create Dynamic

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

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

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

Workflow Triggered\
&#x20;       ↓\
Customer Details Retrieved\
&#x20;       ↓\
Dynamic Payment Link Generated\
&#x20;       ↓\
WhatsApp Payment Message Sent\
&#x20;       ↓\
Customer Completes Payment

### Prerequisites &#x20;

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

#### Required Access &#x20;

You must have access to:

* OwnChat Account
* Flow Builder
* Commerce Module
* WhatsApp Payment Integration

***

Payment Gateway Setup &#x20;

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

Step 1: Open Flow Builder &#x20;

1. Log in to OwnChat.
2. Navigate to Flow Builder.
3. Click Create New Flow.

***

Step 2: Enter Workflow Details &#x20;

In the Create New Flow window:

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

Example:

Payment Create Dynamic

2. Click the Create button.

This saves the workflow and opens the workflow builder canvas.

***

Selecting the Payment Application &#x20;

After creating the workflow, configure the payment application.

Step 1: Choose Application &#x20;

Select the application used for payment processing.

Example:

WhatsApp Payment

***

Configuring Payment Integration &#x20;

Step 1: Select Connection &#x20;

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

After selecting the connection, choose the required event.

Example event:

payment.create.dynamic

This event generates a dynamic payment link.

***

Adding Response Variable &#x20;

Store the response from the payment service in a variable.

Variable Name &#x20;

response

This variable stores the payment information including:

* Payment link
* Order details
* Customer details
* Transaction data

***

Updating the Trigger Configuration &#x20;

After configuring the connection and event:

Click:

Update

This saves the trigger configuration.

***

Workflow Trigger Node &#x20;

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

After the trigger is configured:

1. Click Add Node
2. Select the required action.

***

Configuring Dynamic Payment Creation &#x20;

The next step is to configure the dynamic payment request.

Step 1: Action Name &#x20;

Enter a descriptive name.

Example:

Create Dynamic Payment Link

***

Configuring Payment Amount &#x20;

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

Step 1: Add Variable &#x20;

Click Add Variable to insert the dynamic amount.

Example variable:

order\_amount

This variable fetches the order amount dynamically.

***

Selecting Currency &#x20;

Choose the currency for the payment.

Example:

INR

***

Payment Description &#x20;

Enter the payment description.

Example:

Order Payment

***

Adding Customer Information &#x20;

The system requires customer details to send the payment link.

Customer Contact Number &#x20;

Enter the customer contact number.

Click Add Variable to insert the dynamic phone number.

Example:

customer\_phone

***

Customer Name &#x20;

Insert the dynamic customer name variable.

Example:

customer\_name

***

Sending the Payment Link &#x20;

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

Action Name &#x20;

Send Dynamic Payment Link

***

Message Configuration &#x20;

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

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

After configuring the message:

Click:

Add Action

This saves the workflow action.

***

Searching Workflow Actions &#x20;

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

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

After completing the configuration:

Click:

Publish

Example workflow status:

Payment Create Dynamic – Published

The workflow will now run automatically when triggered.

***

Testing the Workflow &#x20;

Before using the workflow in production, perform a test.

Steps &#x20;

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

Payment Link Not Generated &#x20;

Possible reasons:

* Payment gateway not connected
* Incorrect event selected
* Trigger configuration not saved

***

WhatsApp Message Not Sent &#x20;

Check the following:

* Customer phone number variable
* Message configuration
* Workflow publishing status

***

Best Practices &#x20;

Use Dynamic Variables &#x20;

Always use variables such as:

response

to dynamically access payment data.

***

Verify Payment Integration &#x20;

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

***

Test Payment Flow &#x20;

Perform test payments before enabling the workflow in production.

***

Summary &#x20;

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ownchat.app/work-flows/whatsapp-payment/payment-create-dynamic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
