Order Details Template Message

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.

Payments API is now available to all Indian businesses. If the account is in high or medium tiers, admins or finance editors users will have direct access to the Payment Gateway page and can manage payment settings in Meta Business Manager. If you have any trouble using this feature, please reach out to our Support Team.

Overview

Order details message template is one of the interactive message template that extends the call-to-action button to support sending order details as template and provides richer experience, compared 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 and refer to the Template documentation to create Templates through the API.

Creating an order details template from Meta Manager

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 and undergo the approval process, 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.

  7. Once approved template status 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 and take appropriate actions whenever such change occurs

Sending order details template message

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 or Payment Links) integration as button parameters.

To send an order details template message, make a POST call to /messages endpoint 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.

If you are using On-Premise API, remember that it is being discontinued by Meta. No new signups will be allowed with this type of integration from May 15, 2024.

Numbers registered before this date will still be supported, but should start planning a change of hosting type as soon as possible.

{
  "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.

{
  "messages": [{
    "id": "{message-id}"
  }]
}

Post order details template message flow

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 or Payment Links.

Last updated