1MSG

Send order details (India payments template)

POST
/sendOrderDetails

Send a WhatsApp order details payment / invoice message using a pre-approved Utility template that has an ORDER_DETAILS button.

India only (WhatsApp Payments India). Requires:

  • India WhatsApp Business number
  • Commerce enabled on the channel (GET/POST /commerce)
  • Approved template with an ORDER_DETAILS button

Use this method when you need structured fields (order, referenceId, currency, paymentSettings). The API appends a template button sub_type: order_details and sends via the same path as POST /sendTemplate.

Works outside the 24-hour session window (template message).

You can also send the same payload yourself with POST /sendTemplate by including a button component in params with sub_type: order_details.

Authorization

JWT token
querytoken<token>

Request Body

application/json
  1. body
phone?integer

Recipient phone (India E.164 digits, no +). Use phone or chatId.

chatId?string

Recipient chatId (e.g. [email protected]). Use phone or chatId.

template*string

Approved Utility template name that includes an ORDER_DETAILS button

namespace*string

Template namespace from the channel / template list

language*

Template language

params?array<>

Extra template components (HEADER / BODY / etc.). If an order_details button is missing, the API appends one from order / referenceId / currency / paymentSettings.

referenceId?string

Unique order / payment reference id (maps to reference_id)

currency?string

Currency code for India payments

paymentSettings?

Optional payment settings (UPI / payment gateway / payment link). Forwarded as payment_settings on the order_details action.

order*

Order payload for the ORDER_DETAILS button. Typical fields: status, items[], subtotal, tax, shipping, discount. Amount objects use { "offset": 100, "value": <minor_units> } (e.g. value 50000 with offset 100 = ₹500.00).

[key: string]?any

Response Body

Server response example

application/json
  1. response
sent?boolean
id?string

unique message id

message?string

Posting status message

description?string

Result description

curl -X POST 'https://api.1msg.io/123/sendOrderDetails' \  -H 'Content-Type: application/json' \  -d '{  "phone": 919876543210,  "template": "order_details_utility",  "namespace": "your_namespace_uuid",  "language": {    "code": "en"  },  "referenceId": "order-123",  "currency": "INR",  "order": {    "status": "pending",    "items": [      {        "retailer_id": "SKU-1",        "name": "Item",        "amount": {          "offset": 100,          "value": 50000        },        "quantity": 1      }    ],    "subtotal": {      "offset": 100,      "value": 50000    }  }}'
{  "sent": true,  "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",  "message": "Sent to [email protected]",  "description": "Message has been sent to the provider"}