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

  1. Log in to Ownchat.

  2. Navigate to the Workflows section from the dashboard.

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

  1. Navigate to Commerce.

  2. Select Payments.

  3. Click Payment Links.

Step 2: Select WhatsApp Payment Configurations

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

  1. Locate the Available Events column.

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

  1. Navigate to Workflows.

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

  1. Enter the session message text:

Payment received

  1. Enter the Customer Contact Number.

Adding Customer Phone Number Variable

  1. Click Add Variable.

  2. Select the Phone Number variable.

  3. Insert it into the Customer Contact Number field.

Adding Customer Name Variable

  1. Click Add Variable.

  2. Select the Customer Name variable.

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

  1. Search for Session Message in the search bar.

  2. Select Session Message action.

Configure Action

Action Name

Enter a descriptive name for the action.

Example:

Payment Failed Notification

Customer Contact Number

  1. Click Add Variable.

  2. 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:

  1. Use the search bar.

  2. Enter the node or action name.

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

  1. Create a test payment.

  2. Complete the payment successfully.

  3. 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:

  1. Payment gateway sends payment.paid event

  2. Ownchat workflow is triggered

  3. Payment response is stored in a variable

  4. Order status is updated automatically

  5. WhatsApp commerce notifications can be triggered

This automation ensures efficient payment tracking and order management.

Last updated