1. Home
  2. WABA & Outreach
  3. Basic
  4. WhatsApp’s Native Payment Integration
  1. Home
  2. WABA & Outreach
  3. WhatsApp’s Native Payment Integration
  • User Guide
  • Developer Docs
Frequently visited sections What is verloop?, FAQ Overview?

WhatsApp’s Native Payment Integration

This help documentation provides step-by-step instructions on setting up the order detail messages, which can be sent to customers to enable WhatsApp’s native payment integration. By following these instructions, business admins can streamline the payment process and enhance the customer experience using the block of the order on the Bot Builder.

We bring our new orders block in the bot builder to help you get the most out of WhatsApp’s Native Payment Integration.

How The Order Block on Bot Builder Works

1. URL to Exchange Information Needed for Order Block:

A webhook URL is required to exchange information for the Order Block. The client’s server typically provides this URL, and is mandatory for the Order Block to fetch the necessary order details.

2. Order Detail Variable:

Within the Order Block, the “order_detail” variable is defined. This mandatory variable serves as a container to store the order details fetched from the client’s server. The retrieved order details, such as the item list, prices, and other relevant information, will be stored in this variable.

3. Payment Status Variable:

The “payment_status” variable is used to capture and track the order’s payment status. This mandatory variable stores the payment status updates received from the payment service. Businesses will have to send these updates to a Payment status callback URL. More details to be discussed going ahead.

4. Order Status Variable:

The “order_status” variable is used to capture and track the order’s status. This mandatory variable stores the order status updates from the client’s server.

Configuring these variables within the Order Block allows the necessary information for order processing, payment status updates, and order status updates to be effectively captured and managed.

The business must send these updates to an Order status callback URL. More details to be discussed going ahead.

How to Enable WhatsApp Order Details Message Integration:

Step 1: Gather the Necessary Details

We require the following items to be available to trigger an order detail message.

  • Order ID
  • Reference ID – payment ID
  • List of items – along with the price of items
  • Total order value with taxes or extra charges

An example of the request structure

// When a request is made to the order-detail endpoint, variable containing //order_deatils, payment and order status  URL callbacks along with all the //variables are sent.

{
"order_details": {
"meta": {
"orderId": "order_id",
"type": 1
},
"paymentOptions": {
"paymentMethodName": "wwwgauravduatestcomtest",
"currency": "INR",
"totalAmount": {
"value": 10000,
"offset": 100
},
"subtotal": {
"value": 10000,
"offset": 100
},
"tax": {
"value": {
"value": 0,
"offset": 100
},
"description": "Sales Tax"
}
},
"lineItems": [
{
"retailerId": "retailer id",
"name": "Mouse",
"amount": {
"value": 10000,
"offset": 100
},
"quantity": 1,
"countryOfOrigin": "India",
"importerName": "Mouse Importer",
"importerAddress": {
"addressLine1": "address line 1",
"addressLine2": "address line 2",
"city": "Hyderabad",
"zoneCode": "zone code",
"postalCode": "500084",
"countryCode": "INR"
}
}
]
},
"order_status_callback_url": "https://example.url",
"payment_status_callback_url": "https://example.url",
"variables": {}
}

Response structure expected for Order Detail:

// In response entire order-details along with payment information is expected

{
"meta": {
"orderId": "order_id",
"type": 1
},
"paymentOptions": {
"paymentMethodName": "wwwgauravduatestcomtest",
"currency": "INR",
"id": "56724524",
"totalAmount": {
"value": 10000,
"offset": 100
},
"subtotal": {
"value": 10000,
"offset": 100
},
"tax": {
"value": {
"value": 0,
"offset": 100
},
"description": "Sales Tax"
},
"lineItems": [
{
"retailerId": "retailer id",
"name": "Mouse",
"amount": {
"value": 10000,
"offset": 100
},
"quantity": 1,
"countryOfOrigin": "India",
"importerName": "Mouse Importer",
"importerAddress": {
"addressLine1": "address line 1",
"addressLine2": "address line 2",
"city": "Hyderabad",
"zoneCode": "zone code",
"postalCode": "500084",
"countryCode": "INR"
}
}
]
}
}

Response expected for order/payment status updates:

Please note that when making an API request to Verloop.io, the following information is included:

1. Order_details: These are gathered through a webhook block.

2. Payment status callback URLs.

3. Order status callback URLs.

There are two methods to send this information to Verloop.io

1. Utilising the webhook block: Contact the Customer Success Manager (CSM) to set up the integration.

2. Utilising the Order-detail webhook URL: Go to orders block > Settings > Enter the Order-detail webhook URL, 

3. Verloop.io will send an API request to this endpoint to retrieve order detail information.

Additionally, you can create and select a variable under the Order detail variable section, where you can store the response of the API call.

Important: It is mandatory to set up the Order-detail client-side webhook URL. We cross-check between the details obtained through the webhook block and the details collected from the URL to ensure consistency.

Gathering Reference ID: 

1. The client has to assign a unique reference_id to each order_details message to track the order. 

2. Obtaining this reference_id from the UPI intent link generated by the Payment Gateway for the business order is to be done by the business and its payment gateway partner.

3. Business Provides the respective details to verloop via Order-detail client-side webhook URL on the order block.

Step 3: Send the Order_Details Message

Example:

Header: ”You are all set to pay your April 2023 electricity bill for account #123456.

Body: Payment will be sent to Gotham Electricity Board

Footer: –

When the block of the order is executed inside the recipe, we will collect the information from the client about order details, ref id and using the settings above, and the order message will be sent to your customer on whatsapp.

(add header, body and footer)

Step 4: Monitor Payment Status

The updates on the payments will have to be sent to verloop on the payment status callback url  provided in the API call request. Upon receiving a payment signal for an order, Verloop.io will relay the payment status to the customer.


Payment update to the customer is handled natively by Whatsapp.

Businesses can also set up additional messages to be sent by Verloop.io to customers under the Payment status list and using the 3 dot menu. Responses can be configured individually for both possible response types.

Step 7: Update Customers About The Order Status

The Order Status messages are a part of the order block that allows you to send order status update messages to the customer in your conversational flow. It enables you to track and communicate the progress of an order to the visitor based on the status updates received.

The order status list includes the following statuses:

  • Cancelled: Indicates that the order has been cancelled.
  • Completed: Indicates that the order has been successfully fulfilled.
  • Partially Shipped: Indicates that only a portion of the order has been shipped.
  • Processing: Indicates that the order is being processed.
  • Shipped: Indicates that the entire order has been sent.

Every time the business sends an order update to Verloop.io on order status callback URLs sent to you on the API request, we send an order status message with the configured message.

Businesses can also set up messages to be sent by Verloop.io to customers under the order status list and using the 3 dot menu. Responses can be configured individually for all 5 response types possible. This ensures that your customers stay up-to-date and well-informed about their orders.

Important Note: The order status and payment updates messages cannot be sent to the: customer if the conversation has been transferred to an agent. If that’s not the case, the messages will be sent to customers as soon as we receive a call back from the business informing an update.

Facebook Messenger and Instagram:

Please note that the following behaviour is not supported on Facebook Messenger and Instagram channels:

  • Add a Gif or Video.

Order update messages are handled natively within the workflow by Verloop.io.

Verloop.io constructs an interactive order_status message and sends it to the customer on behalf of the business.

The order_details and order_status messages allow businesses to share order details, initiate payments, and update customers on the status of their orders. This integration enhances customer satisfaction and improves overall efficiency for businesses.

By following these steps, businesses can successfully integrate Verloop.io with WhatsApp’s native payment integration, streamlining the payment process. 

For more information, reach out to us at support@verloop.io.

Updated on October 20, 2023

Was this article helpful?

Related Articles

Schedule a demo

Get Started with Verloop.io