Use cases
Order notifications on WhatsApp
Confirm the order, say when it ships and when it arrives, from a number your customer can answer.
One request per update
Your backend calls POST /v1/messages when an order changes. The request is queued and answered at once, so your order flow never waits on WhatsApp.
Templates with order details
Write each message once with variables such as {{customer_name}} and {{order_number}}, then fill them per order. They are your own templates and need no approval.
Retries never double-send
Pass an idempotency key such as the order number and the status. If your job runs twice, the customer still gets one message.
Know what was delivered
Each message moves from queued to sent, delivered and read. Look it up by ID or receive each change as a webhook.
How it works
Link your number
Scan a QR code with the phone that owns the number customers already know.
Save a template
For example: Hi {{customer_name}}, your order {{order_number}} has been confirmed.
Call the API
Send the template name and the variables when the order status changes.
Send an order confirmation
The response is 202 Accepted with a message ID and status: "queued".
curl https://api.getoxtro.com/v1/messages \
-H "Authorization: Bearer $OXTRO_API_KEY" \
-H "Idempotency-Key: order-4821-confirmation" \
-H "Content-Type: application/json" \
-d '{
"connection_id": "conn_123",
"to": "+213555123456",
"template": {
"name": "order_confirmed",
"variables": {
"customer_name": "Ahmed",
"order_number": "ORD-4821"
}
}
}'Questions about Order notifications
Can customers reply to an order notification?
Yes. Messages come from your own WhatsApp number, so a reply is a normal chat. It appears in the Oxtro shared inbox and can be sent to your backend as a message.received webhook.
Do order messages need approved WhatsApp templates?
No. Oxtro templates are your own reusable text with variables. Oxtro is not the official WhatsApp Business Platform, so there is no template review, and WhatsApp terms still apply to your number.
What if the customer phone number is not on WhatsApp?
The message cannot be delivered. Watch the message status or subscribe to the message.failed webhook, so your backend can fall back to another channel of your own.
Can I attach an invoice?
Yes. Send a message with the type DOCUMENT and a public URL to the file. The text becomes the caption.
Related
Connect your first number today
Create a workspace, scan the QR code and send a message.