> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/partner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/partner/messaging/commerce-and-payments/payments-india-only/receive-whatsapp-payments-via-payment-links.md).

# Receive WhatsApp Payments via Payment Links

{% hint style="danger" %}
The Payments API feature is available only for Indian businesses using the 360dialog WhatsApp Business API with phone numbers only from India. Review [WhatsApp Business Compliance for India](https://www.facebook.com/help/1104628230079278).
{% endhint %}

{% hint style="success" %}
This feature is now available to all Indian businesses. If the account is in [high or medium tiers](/partner/messaging/messaging-limits-and-quality-rating.md), admins or finance editors users will have direct access to the [Payment Gateway](https://business.facebook.com/billing_hub/payment_settings) page and can manage [payment settings in Meta Business Manager](https://www.facebook.com/business/help/915454841921082?id=180505742745347). If you have any trouble using this feature, please reach out to our Support Team.
{% endhint %}

Currently, customers browse business catalogs, add products to cart, and send orders in with our set of commerce messaging solutions, which includes [Single Product Message, Multi Product Message, and Product Detail Page](https://developers.facebook.com/docs/whatsapp/guides/commerce-guides/share-products-with-customers).

Businesses can enable customers to pay for their orders using all the UPI Apps installed on their devices via WhatsApp. Businesses can send customers invoices (`order_details`) messages, then get notified about payment status updates via webhook notifications from Payment Gateway.<br>

### How It Works <a href="#how-it-works" id="how-it-works"></a>

The business must send an `order_details` message for the consumer to initiate payment. This type of message is a new type of `interactive` message, which always contains the same 4 main components: **header**, **body**, **footer**, and **action**. Inside the `action` component, the business includes all the information needed for the customer to complete their payment.

Each `order_details` message contains a unique `reference_id` provided by the business, and that unique number is used throughout the flow to track the order. This `reference_id` is used to generate the payment link from Payment Gateway.

Once the message is sent, the business waits for a payment or transaction status updates directly from Payment Gateway. Upon receiving a payment signal for an order, business should relay this payment signal to the consumer client through interactive order status(`order_status`) message.

{% hint style="warning" %}
Please note that neither 360dialog nor WhatsApp supports payment reconciliations.&#x20;

You must reconcile the payment with the business payment service provider using the respective order `reference_id.`
{% endhint %}

## Purchase Flow in App <a href="#purchase-flow-in-app" id="purchase-flow-in-app"></a>

In the WhatsApp customer app, the purchase flow has the following steps:

1. Customer sends an order with selected products to the business or business identifies the products that the customer has shown interest to purchase.
2. After receiving the order or identifying the product, if a business accepts payment methods other than UPI, such as credit cards and payment wallets, etc. then business will send a message to the user to get their preferred payment method for the order.

<figure><img src="/files/9mJN2MgutfObckwrnlup" alt="" width="290"><figcaption></figcaption></figure>

3. When consumers want to pay using other payment method option, the business should generate the payment link by calling Payment Gateway by providing the unique "reference-id" and other information like amount, validity etc, then business can use the generated payment link to construct the order details message and send to the consumer.

<figure><img src="/files/mR9C6yK54gfRyHAs7YCV" alt="" width="375"><figcaption></figcaption></figure>

4. When the consumer taps the Pay now/continue button, consumer will be redirected to the payment link within specially designed In-App browser to present with the list of supported payment options such as credit card, debit card, wallet or UPI apps. Consumers can choose any one of the payment option to pay for the order.

{% hint style="info" %}
The following is a sample payment link redirect within In-App Browser accepting various payment methods like credit, debit, wallet and UPI apps.
{% endhint %}

<figure><img src="/files/sw2g7DNAWhph2Jo3dvdN" alt="" width="375"><figcaption></figcaption></figure>

5. Once the payment is complete, the business will receive a notification from Payment Gateway and the business needs to send order status updates to the consumer client notifying consumers about the progress on their order, this will update the order details message CTAs, Order details screen and Order status. The order status should contain the matching "reference-id" of order details.

<figure><img src="/files/jkpiJByUCFR35E19Eamj" alt="" width="375"><figcaption></figcaption></figure>

### Integration Steps <a href="#integration-steps" id="integration-steps"></a>

The steps outlined below assume that the business is about to send order details message to consumer client.

The following sequence diagram demonstrates the typical integration flow for WA Payments API:

### Step 1: Get Payment Link from Payment Gateway <a href="#step-1" id="step-1"></a>

Once the consumer has expressed their interest to purchase an item using payment link. Business needs to call payment gateway with necessary information like reference-id, amount and validity to generate the payment link. Following is a sample payment link:

```json
https://rzp.io/i/rNiAagU8y
```

Business needs to use the same reference-id, amount and expiration in invoice(`order_details`) interactive message.

### Step 2: Assemble the Interactive Object <a href="#step-2--assemble-the-interactive-object" id="step-2--assemble-the-interactive-object"></a>

To send an `order_details` message, businesses must assemble an interactive object of type `order_details` with the following components:<br>

| Object                                  | Description                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>type</code></p><p>object</p>   | <p><strong>Required.</strong></p><p>Must be "<code>order\_details</code>".</p>                                                                                                                                                                                                                                                                                                                        |
| <p><code>header</code></p><p>object</p> | <p><strong>Optional.</strong></p><p>Header content displayed on top of a message. If a header is not provided, the API uses an image of the first available product as the header,</p>                                                                                                                                                                                                                |
| <p><code>body</code></p><p>object</p>   | <p><strong>Required.</strong></p><p>An object with the body of the message. The object contains the following field:</p><p><code>text</code> string</p><ul><li><strong>Required</strong> if <code>body</code> is present. The content of the message. Emojis and markdown are supported. Maximum length is 1024 characters</li></ul>                                                                  |
| <p><code>footer</code></p><p>object</p> | <p><strong>Optional.</strong></p><p>An object with the footer of the message. The object contains the following fields:</p><p><code>text</code> string</p><ul><li><strong>Required</strong> if <code>footer</code> is present. The footer content. Emojis, markdown, and links are supported. Maximum length is 60 characters</li></ul>                                                               |
| <p><code>action</code></p><p>object</p> | <p><strong>Required.</strong></p><p>An action object you want the user to perform after reading the message. This action object contains the following fields:</p><p><code>name</code> string</p><ul><li><strong>Required</strong>. Must be "review\_and\_pay"</li></ul><p><code>parameters</code> object</p><ul><li>See <a href="#parameters-object">Parameters Object</a> for information</li></ul> |

#### **Parameters Object**

| Object                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>reference\_id</code></p><p>string</p> | <p><strong>Required.</strong></p><p>Unique identifier for the order or invoice provided by the business. This cannot be an empty string and can only contain English letters, numbers, underscores, dashes, or dots, and should not exceed 35 characters.</p><p>The <code>reference\_id</code> must be unique for each <code>order\_details</code> message for the same business. If the partner would like to send multiple order\_details messages for the same order, invoice, etc. it is recommended to include a sequence number in the <code>reference\_id</code> (for example, -) to ensure <code>reference\_id</code> uniqueness.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| <p><code>type</code></p><p>object</p>          | <p><strong>Required.</strong></p><p>The type of goods being paid for in this order. Current supported options are <code>digital-goods</code> and <code>physical-goods</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| <p><code>beneficiaries</code></p><p>array</p>  | <p><strong>Required for shipped physical-goods.</strong></p><p>An array of beneficiaries for this order. A beneficiary is an intended recipient for shipping the physical goods in the order. It contains the following fields:<br></p><p><em>Beneficiary information isn't shown to users but is needed for legal and compliance reasons.</em><br></p><p><code>name</code> string</p><ul><li><strong>Required.</strong> Name of the individual or business receiving the physical goods. Cannot exceed 200 characters</li></ul><p><code>address\_line1</code> string</p><ul><li><strong>Required.</strong> Shipping address (Door/Tower Number, Street Name etc.). Cannot exceed 100 characters</li></ul><p><code>address\_line2</code> string</p><ul><li><strong>Optional.</strong> Shipping address (Landmark, Area, etc.). Cannot exceed 100 characters</li></ul><p><code>city</code> string</p><ul><li><strong>Optional.</strong> Name of the city.</li></ul><p><code>state</code> string</p><ul><li><strong>Optional.</strong> Name of the state.</li></ul><p><code>country</code> string</p><ul><li><strong>Required.</strong> Must be "India".</li></ul><p><code>postal\_code</code> string</p><ul><li><strong>Required.</strong> 6-digit zipcode of shipping address.</li></ul> |
| `payment_type`                                 | <p><strong>Required.</strong></p><p>Must be "upi".</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `payment_settings`                             | **Required.** See [Payment Settings Object](#payment-setting-object) for more details.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `currency`                                     | <p><strong>Required.</strong></p><p>The currency for this order. Currently the only supported value is <code>INR</code>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| <p><code>total\_amount</code></p><p>object</p> | <p><strong>Required.</strong></p><p>The <code>total\_amount</code> object contains the following fields:</p><p><code>offset</code> integer</p><ul><li><strong>Required.</strong> Must be <code>100</code> for <code>INR</code>.</li></ul><p><code>value</code> integer</p><ul><li><strong>Required.</strong> Positive integer representing the amount value multiplied by offset. For example, ₹12.34 has value 1234.</li></ul><p><code>total\_amount.value</code> must be equal to <code>order.subtotal.value</code> + <code>order.tax.value</code> + <code>order.shipping.value</code> - <code>order.discount.value</code>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| <p><code>order</code></p><p>object</p>         | <p><strong>Required.</strong></p><p>See <a href="#step-2--assemble-the-interactive-object">order object </a>for more information.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

#### **Payment Setting Object**

| Object                                      | Description                                                                           |
| ------------------------------------------- | ------------------------------------------------------------------------------------- |
| <p><code>type</code><br>string</p>          | **Required.** Must be `payment_link`.                                                 |
| <p><code>payment\_link</code><br>object</p> | **Required.** Refer[ Payment Link Object](#payment-link-object) for more information. |

#### **Payment Link Object**

| Object                            | Description                                                                                                                                                                                                                                   |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>uri</code><br>string</p> | <p><strong>Required.</strong> A valid payment link generated through payment gateway.</p><p>Generated payment links domains needs to be enabled to accept payments. Please reach out to the Meta Business Engineering teams to know more.</p> |

**Order Object**

| Object                                       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>status</code></p><p>string</p>      | <p><strong>Required.</strong></p><p>Only supported value in the <code>order\_details</code> message is <code>pending</code>.</p><p>In an <code>order\_status</code> message, <code>status</code> can be: <code>pending</code>, <code>captured</code>, or <code>failed</code>.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| <p><code>items</code></p><p>object</p>       | <p><strong>Required.</strong></p><p>An object with the list of items for this order, containing the following fields:</p><p><code>retailer\_id</code> string</p><ul><li><strong>Required.</strong> Unique identifier for an item in the order.</li></ul><p><code>name</code> string</p><ul><li><strong>Required.</strong> The item’s name to be displayed to the user. Cannot exceed 60 characters</li></ul><p><code>amount</code> amount object with value and offset -- refer total amount field above</p><ul><li><strong>Required.</strong> The price per item</li></ul><p><code>sale\_amount</code> amount object</p><ul><li><strong>Optional.</strong> The discounted price per item. This should be less than the original amount. If included, this field is used to calculate the subtotal amount</li></ul><p><code>quantity</code> integer</p><ul><li><strong>Required.</strong> The number of items in this order, this field cannot be decimal has to be integer.</li></ul><p><code>country\_of\_origin</code> string</p><ul><li><strong>Required</strong> if <code>catalog\_id</code> is not present. The country of origin of the product</li></ul><p><code>importer\_name</code> string</p><ul><li><strong>Required</strong> if <code>catalog\_id</code> is not present. Name of the importer company</li></ul><p><code>importer\_adress</code> string</p><ul><li><strong>Required</strong> if <code>catalog\_id</code> is not present. Address of importer company</li></ul> |
| <p><code>subtotal</code></p><p>object</p>    | <p><strong>Required.</strong></p><p>The value <strong>must be equal</strong> to sum of <code>order.amount.value</code> \* <code>order.amount.quantity</code>. Refer to <code>total\_amount</code> description for explanation of <code>offset</code> and <code>value</code> fields</p><p>The following fields are part of the <code>subtotal</code> object:</p><p><code>offset</code> integer</p><ul><li><strong>Required.</strong> Must be <code>100</code> for <code>INR</code></li></ul><p><code>value</code> integer</p><ul><li><strong>Required.</strong> Positive integer representing the amount value multiplied by offset. For example, ₹12.34 has value 1234</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| <p><code>tax</code></p><p>object</p>         | <p><strong>Required.</strong></p><p>The tax information for this order which contains the following fields:</p><p><code>offset</code> integer</p><ul><li><strong>Required.</strong> Must be <code>100</code> for <code>INR</code></li></ul><p><code>value</code> integer</p><ul><li><strong>Required.</strong> Positive integer representing the amount value multiplied by offset. For example, ₹12.34 has value 1234</li></ul><p><code>description</code> string</p><ul><li><strong>Optional.</strong> Max character limit is 60 characters</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| <p><code>shipping</code></p><p>object</p>    | <p><strong>Optional.</strong></p><p>The shipping cost of the order. The object contains the following fields:</p><p><code>offset</code> integer</p><ul><li><strong>Required.</strong> Must be <code>100</code> for <code>INR</code></li></ul><p><code>value</code> integer</p><ul><li><strong>Required.</strong> Positive integer representing the amount value multiplied by offset. For example, ₹12.34 has value 1234</li></ul><p><code>description</code> string</p><ul><li><strong>Optional.</strong> Max character limit is 60 characters</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <p><code>discount</code></p><p>object</p>    | <p><strong>Optional.</strong></p><p>The discount for the order. The object contains the following fields:</p><p><code>offset</code> integer</p><ul><li><strong>Required.</strong> Must be <code>100</code> for <code>INR</code></li></ul><p><code>value</code> integer</p><ul><li><strong>Required.</strong> Positive integer representing the amount value multiplied by offset. For example, ₹12.34 has value 1234</li></ul><p><code>description</code> string</p><ul><li><strong>Optional.</strong> Max character limit is 60 characters</li></ul><p><code>discount\_program\_name</code> string</p><ul><li><strong>Optional.</strong> Text used for defining incentivised orders. If order is incentivised, the merchant needs to define this information. Max character limit is 60 characters</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| <p><code>catalog\_id</code></p><p>object</p> | <p><strong>Optional.</strong></p><p>Unique identifier of the Facebook catalog being used by the business.</p><p>If you do not provide this field, you must provide the following fields inside the items object: <code>country\_of\_origin</code>, <code>importer\_name</code>, and <code>importer\_address</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| <p><code>expiration</code></p><p>object</p>  | <p><strong>Optional.</strong></p><p>Expiration for that order. Business must define the following fields inside this object:</p><p><code>timestamp</code> string – UTC timestamp in seconds of time when order should expire. Minimum threshold is 300 seconds</p><p><code>description</code> string – Text explanation for expiration. Max character limit is 120 characters</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

By the end, the interactive object should look something like this for a catalog-based integration:

```json
{
  "interactive": {
    "type": "order_details",
    "header": {
      "type": "image",
      "image": {
        "link": "http(s)://the-url",
        "provider": {
          "name": "provider-name"
        }
      }
    },
    "body": {
      "text": "your-text-body-content"
    },
    "footer": {
      "text": "your-text-footer-content"
    },
    "action": {
      "name": "review_and_pay",
      "parameters": {
        "reference_id": "reference-id-value",
        "type": "digital-goods",
        "payment_type": "upi",
        "payment_settings": [
          {
            "type": "payment_link",
            "payment_link": {
              "uri": "https://the-payment-link"
            }
          }
        ],
        "currency": "INR",
        "total_amount": {
          "value": 21000,
          "offset": 100
        },
        "order": {
          "status": "pending",
          "catalog_id": "the-catalog_id",
          "expiration": {
            "timestamp": "utc_timestamp_in_seconds",
            "description": "cancellation-explanation"
          },
          "items": [
            {
              "retailer_id": "1234567",
              "name": "Product name, for example bread",
              "amount": {
                "value": 10000,
                "offset": 100
              },
              "quantity": 1,
              "sale_amount": {
                "value": 100,
                "offset": 100
              }
            }
          ],
          "subtotal": {
            "value": 20000,
            "offset": 100
          },
          "tax": {
            "value": 1000,
            "offset": 100,
            "description": "optional_text"
          },
          "shipping": {
            "value": 1000,
            "offset": 100,
            "description": "optional_text"
          },
          "discount": {
            "value": 1000,
            "offset": 100,
            "description": "optional_text",
            "discount_program_name": "optional_text"
          }
        }
      }
    }
  }
}
```

For a non-catalog based integration i.e. when catalog-id is not present, an example payload looks as follows:

```json
{
  "interactive": {
    "type": "order_details",
    "header": {
      "type": "image",
      "image": {
        "id": "your-media-id"
      }
    },
    "body": {
      "text": "your-text-body-content"
    },
    "footer": {
      "text": "your-text-footer-content"
    },
    "action": {
      "name": "review_and_pay",
      "parameters": {
        "reference_id": "reference-id-value",
        "type": "digital-goods",
        "payment_type": "upi",
        "payment_settings": [
          {
            "type": "payment_link",
            "payment_link": {
              "uri": "https://the-payment-link"
            }
          }
        ],
        "currency": "INR",
        "total_amount": {
          "value": 21000,
          "offset": 100
        },
        "order": {
          "status": "pending",
          "expiration": {
            "timestamp": "utc_timestamp_in_seconds",
            "description": "cancellation-explanation"
          },
          "items": [
            {
              "retailer_id": "1234567",
              "name": "Product name, for example bread",
              "amount": {
                "value": 10000,
                "offset": 100
              },
              "quantity": 1,
              "sale_amount": {
                "value": 100,
                "offset": 100
              },
              "country_of_origin": "country-of-origin",
              "importer_name": "name-of-importer-business",
              "importer_address": {
                "address_line1": "B8/733 nand nagri",
                "address_line2": "police station",
                "city": "East Delhi",
                "zone_code": "DL",
                "postal_code": "110093",
                "country_code": "IN"
              }
            },
            {
              "retailer_id": "14325",
              "name": "Product name, for example bread",
              "amount": {
                "value": 10000,
                "offset": 100
              },
              "quantity": 1,
              "sale_amount": {
                "value": 100,
                "offset": 100
              },
              "country_of_origin": "country-of-origin",
              "importer_name": "name-of-importer-business",
              "importer_address": {
                "address_line1": "B8/733 nand nagri",
                "address_line2": "police station",
                "city": "East Delhi",
                "zone_code": "DL",
                "postal_code": "110093",
                "country_code": "IN"
              }
            }
          ],
          "subtotal": {
            "value": 20000,
            "offset": 100
          },
          "tax": {
            "value": 1000,
            "offset": 100,
            "description": "optional_text"
          },
          "shipping": {
            "value": 1000,
            "offset": 100,
            "description": "optional_text"
          },
          "discount": {
            "value": 1000,
            "offset": 100,
            "description": "optional_text",
            "discount_program_name": "optional_text"
          }
        }
      }
    }
  }
}
```

### Step 3: Add Common Message Parameters <a href="#step-3--add-common-message-parameters" id="step-3--add-common-message-parameters"></a>

Once the interactive object is complete, append the other parameters that make a message: `recipient_type`, `to`, and `type`. Remember to set the `type` to `interactive`.

```json
{
   "messaging_product": "whatsapp",
   "recipient_type": "individual",
   "to": "PHONE_NUMBER",
   "type": "interactive",
   "interactive": {
     // interactive object here     
   }
 }
```

### Step 4: Make a POST Call to Messages Endpoint <a href="#step-4-make-a-post-call-to-messages-endpoint" id="step-4-make-a-post-call-to-messages-endpoint"></a>

Make a POST call to the [endpoint ](https://docs.360dialog.com/docs/messaging-api/api-reference/messages#post-messages)with the `JSON` object you have assembled. If your message is sent successfully, you get the following response:

```json
{
  "messaging_product": "whatsapp",
  "contacts": [ {
      "input": "[PHONE_NUMBER_ID]",
      "wa_id": "[PHONE-NUMBER_ID]"
  } ],
  "messages": [ {
      "id": "wamid.HBgLMTY1MDUwNzY1MjAVAgARGBI5QTNDQTVCM0Q0Q0Q2RTY3RTcA"
  } ]
}
```

### Step 5: Consumer Pays for the Order <a href="#step-5--consumer-pays-for-the-order" id="step-5--consumer-pays-for-the-order"></a>

Consumers can pay using WhatsApp payment method or using any UPI supported app that is installed on the device.

### Step 6: Get Notified About Transaction Status Updates from payment gateway <a href="#step-6--get-notified-about-transaction-status-updates-from-payment-gateway" id="step-6--get-notified-about-transaction-status-updates-from-payment-gateway"></a>

Businesses receive updates to the invoice via payment gateway webhooks, when the status of the user-initiated transaction changes. The unique identifier reference-id passed in `order_details` message can be used to map the transaction to the consumer invoice or interactive order details message.&#x20;

### Step 7: Update order status <a href="#step-7--update-order-status" id="step-7--update-order-status"></a>

Upon receiving transaction signals from payment gateway through webhook, the business must update the order status to keep the user up to date. Currently we support the following order status values:

<figure><img src="/files/6GKPsku0Jf9gmEuYOPbp" alt=""><figcaption></figcaption></figure>

| Value               | Description                                                                                                                                                                                                       |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pending`           | User has not successfully paid yet                                                                                                                                                                                |
| `processing`        | User payment authorized, merchant/partner is fulfilling the order, performing service, etc.                                                                                                                       |
| `partially-shipped` | A portion of the products in the order have been shipped by the merchant                                                                                                                                          |
| `shipped`           | All the products in the order have been shipped by the merchant                                                                                                                                                   |
| `completed`         | The order is completed and no further action is expected from the user or the partner/merchant                                                                                                                    |
| `canceled`          | The partner/merchant would like to cancel the `order_details` message for the order/invoice. The status update will fail if there is already a `successful` or `pending` payment for this `order_details` message |

Typically businesses update the `order_status` using either the WhatsApp payment status change notifications or their own internal processes. To update `order_status`, the partner sends an `order_status` message to the user.

```json
{
  "recipient_type": "individual",
  "to": "whatsapp-id",
  "type": "interactive",
  "interactive": {
    "type": "order_status",
    "body": {
      "text": "your-text-body-content"
    },
    "action": {
      "name": "review_order",
      "parameters": {
        "reference_id": "reference-id-value",
        "order": {
          "status": "processing | partially_shipped | shipped | completed | canceled",
          "description": "optional-text"
        }
      }
    }
  }
}
```

The following table describes the returned values:

| Value          | Description                                                                                                                                                |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `reference_id` | The ID provided by the partner in the `order_details` message                                                                                              |
| `status`       | The new order `status`                                                                                                                                     |
| `description`  | Optional text for sharing status related information in `order_details`. Could be useful while sending cancellation. Max character limit is 120 characters |

### Step 8: Reconcile Payments <a href="#step-8--reconcile-payments" id="step-8--reconcile-payments"></a>

Please note that neither 360dialog nor WhatsApp supports payment reconciliations. Businesses should use their bank statements to reconcile the payments using the `reference_id` provided in the `order_details` messages.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.360dialog.com/partner/messaging/commerce-and-payments/payments-india-only/receive-whatsapp-payments-via-payment-links.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.
