Skip to content

Incoming order message#

This section describes the messageData object incoming webhook format for an incoming order (cart) message. For a description of the general format of incoming webhooks, refer to the Incoming messages section.

To get incoming webhooks of this type, two conditions must be true:

typeWebhook = incomingMessageReceived

messageData.typeMessage = orderMessage

Configuring an instance

To receive incoming notifications about order messages, you need to enable the settings using one of the following options:

  1. Through the console enable the setting Receive notifications about incoming messages and files and the catalog notifications setting

  2. Through the SetSettings method enable the settings incomingWebhook and catalogWebhook

Getting order details

The orderId, token, and sellerJid fields from this notification contain the data required to call the GetOrderDetails method, which returns the full contents of the order.

Webhook#

Webhook parameters#

messageData object parameters

Parameter Type Description
typeMessage string Received message type. For messages of this type, the field takes the value: orderMessage
orderMessage object Order data object

orderMessage object parameters

Parameter Type Description
orderId string Order identifier. Used in the GetOrderDetails method
token string Order access token. Used in the GetOrderDetails method
totalPrice string Total order price (in minor currency units, e.g., 250000 = 2500.00 RUB)
totalCurrencyCode string Order currency code in ISO 4217 format (e.g., RUB)
sellerJid string JID of the seller who owns the catalog, in the format 79876543210@c.us. Used in the GetOrderDetails method
itemsCount integer Number of items in the order
jpegThumbnail string Order image preview in base64

Webhook body example#

{
  "typeWebhook": "incomingMessageReceived",
  "idMessage": "3EB00DAD87A9587390FE46",
  "instanceData": {
    "idInstance": 1101111111,
    "wid": "79876543210@c.us",
    "typeInstance": "whatsapp"
  },
  "timestamp": 1783335527,
  "senderData": {
    "chatId": "79001234567@c.us",
    "sender": "79001234567@c.us",
    "senderName": "Ivan",
    "senderContactName": "Ivan",
    "chatName": "Ivan"
  },
  "messageData": {
    "typeMessage": "orderMessage",
    "orderMessage": {
      "orderId": "1300936245456254",
      "token": "AeBZD0f8NlE/H8JVglqhlYLaQq4r9PoaTKCJmT9csclblQ==",
      "totalPrice": "250000",
      "totalCurrencyCode": "RUB",
      "sellerJid": "79876543210@c.us",
      "itemsCount": 1,
      "jpegThumbnail": "/9j/2wCEAAEBAQ="
    }
  }
}