Send a PDF invoice via WhatsApp API (sendFile)
This scenario sends a PDF document with sendFile during the 24-hour WhatsApp customer service window.
Common errors
| Status | API response | Cause | Fix |
|---|---|---|---|
| 200 | Message was not sent: provide chatId, phone, bsuid, or username | No recipient the channel could resolve. | Pass exactly one recipient: phone (country code plus number, digits only), chatId (for example [email protected]) or bsuid. |
| 200 | wrong file | The media could not be fetched or uploaded: the URL is not reachable or the base64 is invalid. | Pass a public HTTPS URL or valid base64 in body, or upload the file with /uploadMedia and send mediaId with mediaType. |
| 200 | Message was not sent: filename | sendFile was called without filename, so the file has no extension. | Add filename with an extension, for example invoice.pdf. |
Common questions
Related
Payments & Invoices
Payment due reminder via WhatsApp API
The scenario sends the customer a personalised WhatsApp template before a payment due date.
Payments & Invoices
Subscription renewal reminder via WhatsApp API
The scenario sends the customer a personalised WhatsApp template before a subscription renewal date.
Payments & Invoices
Subscription activated message via WhatsApp API
The scenario sends the customer a personalised WhatsApp template when a new subscription is activated.
Payments & Invoices
Subscription cancellation message via WhatsApp API
The scenario sends the customer a personalised WhatsApp template when a subscription is cancelled.
Payments & Invoices
Plan expiry reminder via WhatsApp API
The scenario sends the customer a personalised WhatsApp template before a plan or subscription ends.
Payments & Invoices
Payment confirmation message via WhatsApp API
The scenario sends the customer a personalised WhatsApp template when a payment succeeds.
Payments & Invoices
Overdue payment reminder via WhatsApp API
The scenario sends the customer a personalised WhatsApp template when their payment becomes overdue.
Payments & Invoices
Payment method choice with WhatsApp buttons (API)
The scenario sends the customer a personalised WhatsApp template when billing needs to know the payment method.


