Send order details (India payments template)
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_DETAILSbutton
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.
JWT tokentoken<token>application/json- body
phone?integerRecipient phone (India E.164 digits, no +). Use phone or chatId.
chatId?stringRecipient chatId (e.g. [email protected]). Use phone or chatId.
template*stringApproved Utility template name that includes an ORDER_DETAILS button
namespace*stringTemplate 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?stringUnique order / payment reference id (maps to reference_id)
currency?stringCurrency 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]?anyServer response example
application/json- response
sent?booleanid?stringunique message id
message?stringPosting status message
description?stringResult 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"}