Payment Paid
This workflow allows businesses to automate actions when a payment is successfully completed through a payment gateway such as Razorpay, Petpooja, or other connected payment services.
When a payment is marked as Paid, the workflow triggers automation in Ownchat Flow Builder, allowing businesses to:
Update order status
Trigger WhatsApp commerce notifications
Automate payment confirmation workflows
Overview
The Payment Paid workflow is triggered when the payment gateway sends the payment.paid event.
The workflow processes the payment response and updates the corresponding order status in the system.
Workflow Automation Flow
Payment Gateway ↓ Payment Paid Event Triggered ↓ Ownchat Receives Event ↓ Workflow Triggered ↓ Order Status Updated ↓ WhatsApp Commerce Notification Sent
Accessing Workflow Builder
Step 1: Open Workflows
Log in to Ownchat.
Navigate to the Workflows section from the dashboard.
Use the search bar if needed to locate specific workflows.
You will see existing workflows such as:
Send Invoice
Send Status Petpooja
WhatsApp Payment Configurations
Shopify Order Paid
Configuring WhatsApp Payment Settings
Before creating the workflow, configure the payment settings.
Step 1: Open Payment Configurations
Navigate to Commerce.
Select Payments.
Click Payment Links.
Step 2: Select WhatsApp Payment Configurations
Click WhatsApp – Payment Configurations.
This section allows configuration of payment-related events and integrations.
Viewing Payment Events
Inside the configuration screen you will see:
Connection Name
Available Events
Subscribed Events
Step 1: View Available Events
Locate the Available Events column.
Click the Available Events number.
This will open the list of events available for the payment integration.
Subscribing to Payment Event
You must subscribe to the Payment Paid event.
Event
Payment Paid
Event Description
Triggered when the payment is successfully completed.
Once subscribed, the system will send this event to Ownchat workflows.
Creating a New Workflow
Step 1: Open Workflow Builder
Navigate to Workflows.
Click Create New Flow.
This opens the Create New Workflow screen.
Creating the Workflow
Two options are available:
Build from Scratch
Use a Template
Step 1: Select Build from Scratch
Choose:
Build from Scratch
This allows you to configure custom automation logic.
Step 2: Enter Flow Details
Enter the workflow information.
Flow Name
Example:
Payment Paid
Description
Provide a description for the workflow.
Step 3: Create Workflow
Click:
Create
The workflow canvas will open.
Selecting the Application
After creating the workflow, configure the application that sends the payment event.
Step 1: Choose App
Click Choose App.
Available applications include:
WooCommerce
Stripe
Petpooja
Razorpay
Shopify
Webhook
Zoho Subscriptions
Zoho Bookings
Calendly
Google Sheets
MoEngage
Configuring the Payment Integration
Step 1: Select the Connection
Choose the connected payment account.
Example:
Connection: Test
Step 2: Select Event
Choose the event from the dropdown.
payment.paid
This event is triggered when the payment is successfully completed.
Adding Response Variable
Store the response received from the payment gateway.
Variable Name
response
This variable stores payment event data received from the payment provider.
Step 3: Update Configuration
Click:
Update
This saves the trigger configuration.
Workflow Trigger Node
Once configured, the workflow will display the trigger node.
Trigger
payment.paid
This indicates the workflow starts when the payment.paid event is received.
Adding Next Action
After the trigger is configured, you can add the next action.
Click:
Add Node
This allows adding conditions or actions.
Configuring Actions
Actions define what happens after the payment is completed.
Update Order Status Action
Add the Update Order Status action.
This action updates the order status after the payment is successfully completed.
Step 1: Configure Action Name
Example:
Order Status for Payment
Step 2: Set Order Status
Select the appropriate order status.
Example statuses may include:
Processing
Paid
Confirmed
Step 3: Configure Payment Status
Set the payment status.
Example:
Paid
Adding Order ID Variable
The system needs the Order ID to update the order.
Step 1: Add Variable
Click:
Add Variable
Select the order ID from the payment response.
Example:
response.order_id
This allows the workflow to dynamically update the correct order.
Sending Session Message for Successful Payment
If the payment status is Success, configure a session message to notify the customer.
Steps
Enter the session message text:
Payment received
Enter the Customer Contact Number.
Adding Customer Phone Number Variable
Click Add Variable.
Select the Phone Number variable.
Insert it into the Customer Contact Number field.
Adding Customer Name Variable
Click Add Variable.
Select the Customer Name variable.
Insert it into the Customer Name field.
Configure Message Text
Enter the message content in the message field.
Example:
Hi {{customer_name}}, your payment has been successfully received. Thank you for your purchase.
Save the Action
Click:
Add Action
This saves the session message configuration.
Adding Session Message for Failed Payment
If the payment fails, configure a message to notify the customer.
Steps
Search for Session Message in the search bar.
Select Session Message action.
Configure Action
Action Name
Enter a descriptive name for the action.
Example:
Payment Failed Notification
Customer Contact Number
Click Add Variable.
Insert the customer phone number variable.
Customer Name
Enter the customer name variable.
Message Text
Enter the message text.
Example:
Hi {{customer_name}}, unfortunately your payment was not successful. Please try again or contact support.
Save Action
Click:
Add Action
This completes the failed payment message configuration.
Searching for Actions
To quickly add actions:
Use the search bar.
Enter the node or action name.
Select from the filtered results.
Workflow Activation
After closing the configuration screen and returning to the workflow list:
The workflow appears in an Active state.
Checking the Workflow
Before publishing the workflow, verify the flow configuration.
Flow Builder Sections
The workflow builder includes:
Summary
Flow Builder
History
These sections help review workflow changes.
Publishing the Workflow
After completing configuration:
Click:
Publish
Example workflow status:
Payment Paid – Published
The workflow will now run automatically whenever the payment.paid event is triggered.
Testing the Workflow
Before using the workflow in production, test the automation.
Steps
Create a test payment.
Complete the payment successfully.
Confirm that:
The payment.paid event triggers
The workflow runs
The order status updates
Troubleshooting
Workflow Not Triggering
Possible reasons:
Payment event not subscribed
Integration not connected
Incorrect event selected
Order Status Not Updating
Check:
Order ID variable configuration
Payment response variable mapping
Action configuration
Best Practices
Always Use Response Variables
Store payment data in variables such as:
response
This helps dynamically map order data.
Verify Payment Events
Ensure the correct event is selected:
payment.paid
Test Before Publishing
Run test payments before activating the workflow.
Summary
The WhatsApp Payment – Payment Paid workflow allows Ownchat to automatically process completed payments and update order status.
The automation works as follows:
Payment gateway sends payment.paid event
Ownchat workflow is triggered
Payment response is stored in a variable
Order status is updated automatically
WhatsApp commerce notifications can be triggered
This automation ensures efficient payment tracking and order management.
Last updated