# Order Details Template Message

{% hint style="info" %}
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" %}
Payments API is now available to all Indian businesses. If your 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 %}

### Overview <a href="#overview" id="overview"></a>

Order details message template is one of the interactive message template that [extends the call-to-action button ](/partner/messaging/template-messages.md#buttons)to support sending order details as template and provides richer experience compare to the standard message templates.

Once your Order details message templates have been created and approved, you can use the approved template to send the template message with order or bill information to prompt them to make a payment.

Before sending an order details template message, businesses need to create a template with an “open order details” call-to-action button. See [Utility Templates](/partner/messaging/template-messages.md#utility-templates) and refer to the Template documentation to create Templates through the API.&#x20;

### Creating an order details template from Meta Manager <a href="#creating-an-order-details-template" id="creating-an-order-details-template"></a>

To create an order details template, the business should use their Meta Business Manager within their WhatsApp Business Platform account. Once logged into a WhatsApp Platform account, they  access the `Message Templates` under `WhatsApp Manager > Account tools` section and follow the below steps.

1. Click on `create template`
2. Select `Utility` category to expand `Order details message` option
3. Enter the desired `template name` and supported `locale`
   * Depending on the number of `locales` selected there will be an equal number of template variants and businesses need to fill in the template details in respective locale.
4. Please fill in template components such as `Header`, `Body` and optional `footer` text and submit.
5. Once submitted, templates will be [categorized as per the guidelines](/partner/messaging/template-messages.md#template-rejection-due-to-miscategorization) and undergo the [approval process](/partner/messaging/template-messages.md#template-rejection-due-to-miscategorization), please refrain from having marketing content as part of template components.
6. The template will be approved or rejected after the template components are verified by the system.
   * If business believe the category determined is not consistent with our template category guidelines, please confirm there are no [common issues](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#common-rejection-reasons) that leads to rejections and if you are looking for further clarification you may [request a review](https://developers.facebook.com/docs/whatsapp/updates-to-pricing/new-template-guidelines#requesting-review) of the template via [Business Support](https://business.facebook.com/business-support-home/)
7. Once approved template [status](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#statuses) will be changed to `ACTIVE`
   * Please be informed that template's status can change automatically from `ACTIVE` to `PAUSED` or `DISABLED` based on customer feedback. We recommend that you [monitor status changes](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#monitoring-status-changes) and take appropriate actions whenever such change occurs

{% embed url="<https://www.facebook.com/business/help/2055875911147364?id=2129163877102343>" %}

### Sending order details template message <a href="#sending-order-details-template-message" id="sending-order-details-template-message"></a>

Order details template message allows the businesses to send invoice(order\_details) message as predefined `Open order details` call-to-action button component parameters. It supports businesses to send all payment integration ([Payment Gateway](/partner/messaging/commerce-and-payments/payments-india-only/receive-whatsapp-payments-via-payments-gateway.md) or [Payment Links](/partner/messaging/commerce-and-payments/payments-india-only/receive-whatsapp-payments-via-payment-links.md)) integration as button parameters.

To send an order details template message, make a call to the [endpoint](https://docs.360dialog.com/docs/messaging-api/api-reference/messages#post-messages) and attach a message object with `type=template`. Then, add a template object with a predefined `Open order details` call-to-action button.

For example following sample describes how to send order details template message parameters to prompt the consumer to make a payment.

```json
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "PHONE_NUMBER",
  "type": "template",
  "template": {
    "name": "TEMPLATE_NAME",
    "language": {
      "policy": "deterministic",
      "code": "LANGUAGE_AND_LOCALE_CODE"
    },
    "components": [
      {
        "type": "header",
        "parameters": [
          {
            "type": "image", // Uses header with image as an example
            "image": {
              "link": "http(s)://the-url"
            }
          }
        ]
      },
      {
        "type": "button",
        "sub_type": "order_details",
        "index": 0,
        "parameters": [
          {
            "type": "action",
            "action": {
              "order_details": {
                "currency": "INR",
                "order": {
                  "discount": {
                    "offset": 100,
                    "value": 250
                  },
                  "items": [
                    {
                      "amount": {
                        "offset": 100,
                        "value": 400
                      },
                      "name": "ORDER_ITEM_NAME",
                      "product_id": "ORDER_ITEM_PRODUCT_ID",
                      "quantity": 1,
                      "retailer_id": "ORDER_ITEM_RETAILER_ID",
                      "country_of_origin": "ORIGIN_COUNTRY",
                      "importer_name": "IMPORTER_NAME",
                      "importer_address": {
                        "address_line1": "IMPORTER_ADDRESS",
                        "city": "CITY",
                        "country_code": "COUNTRY",
                        "postal_code": "ZIP_CODE"
                      }
                    }
                  ],
                  "shipping": {
                    "offset": 100,
                    "value": 0
                  },
                  "status": "pending",
                  "subtotal": {
                    "offset": 100,
                    "value": 400
                  },
                  "tax": {
                    "offset": 100,
                    "value": 500
                  }
                },
                "payment_configuration": "unique_payment_config_id",
                "payment_type": "upi",
                "reference_id": "reference_id_value",
                "total_amount": {
                  "offset": 100,
                  "value": 650
                },
                "type": "digital-goods"
              }
            }
          }
        ]
      }
    ]
  }
}
```

Once the order details template message is delivered, a successful response will include an object with an identifier prefixed with wamid. Use the ID listed after `wamid` to track your message status.

```json
{
    "messaging_product": "whatsapp",
    "contacts": [
        {
            "input": "PHONE_NUMBER",
            "wa_id": "WHATSAPP_ID"
        }
    ],
    "messages": [
        {
            "id": "wamid.ID"
        }
    ]
}
```

### Post order details template message flow <a href="#post-order-details-template-message-flow" id="post-order-details-template-message-flow"></a>

After the order details template message delivery the rest of the payment flow is the same as “Sending invoice in customer session window” and depends on the chosen payment integration order details parameters. For more details refer to [Payment Gateway](/partner/messaging/commerce-and-payments/payments-india-only/receive-whatsapp-payments-via-payments-gateway.md) or [Payment Links](/partner/messaging/commerce-and-payments/payments-india-only/receive-whatsapp-payments-via-payment-links.md).


---

# 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.360dialog.com/partner/messaging/commerce-and-payments/payments-india-only/order-details-template-message.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.
