Order Details Template Message
Last updated
Was this helpful?
Was this helpful?
{
"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"
}
}
}
]
}
]
}
}{
"messages": [{
"id": "{message-id}"
}]
}