When the message carries money
Billing emails land in the promotions tab and SMS with a link looks like a scam. WhatsApp gets higher open rates precisely because the customer recognizes the sender. If you build recurring billing software, business banking or financial management for small companies, that moves the metric that matters: days between the due date and the payment.
The typical customer scenario is a platform where each registered business bills its own customers. The school bills tuition, the property manager bills fees, the service provider bills an invoice. The message has to come from that business's number, not from a central platform number, and that's what one connection per customer solves.
A payment reminder flow on WhatsApp
A design that works well for most platforms:
| When | What to send | How |
|---|---|---|
| Invoice issued | Invoice PDF with a readable file name | messages/send/document |
| 3 days before the due date | Short reminder with amount and date | messages/send/text |
| Due date | Payment link button for card payments | interactive/send/template |
| Payment confirmed | Receipt in PDF | messages/send/document |
| Overdue and unread | Second reminder; still unread, human queue | message.read webhook |
The logic of when to charge lives entirely on your side. The API delivers and reports back what happened. A deeper look at tone, frequency and timing is in payment reminders on WhatsApp.
Invoice and payment link in the same chat
The example below sends the invoice and then a button with the payment link. The sessionId is the connection of the business doing the billing; to is the payer.
import { DApi } from 'd-api-sdk'
const dapi = new DApi({ apiKey: process.env.DAPI_KEY! })
const sessionId = 'business-7310'
await dapi.messages.sendDocument({
sessionId,
to: '15551234567',
document: 'https://files.yourplatform.com/invoices/inv-99812.pdf',
fileName: 'Invoice-September.pdf',
mimetype: 'application/pdf',
})
await dapi.interactive.sendTemplate({
sessionId,
to: '15551234567',
title: 'Invoice 99812: $189.90',
content: 'Prefer to pay now? Use the secure link below.',
footer: 'Acme Services',
buttons: [{ type: 'url', title: 'Pay now', url: 'https://pay.yourplatform.com/inv-99812' }],
})The document can be a public URL or base64. If invoices sit in a private bucket, generate a short-lived signed URL just for the send instead of leaving the file exposed.
Sensitive data: checklist before going to production
- Only what's needed in the message. Amount, due date and the business name. Full ID numbers, balances and card data stay out of the text.
- Confirmed phone number. A wrong number means someone's invoice delivered to a stranger. Confirm the number on sign-up before enabling billing messages.
- Protected webhook. Use a URL with a secret in the path and check that the
sessionIdbelongs to an active customer before processing. - Send log. Store the ID of every message sent alongside the invoice. In a dispute, you know what was sent, when, and whether it was read.
- Receipts with an owner. Incoming files arrive with
media_url. Copy them to your storage, tie them to the right customer and apply the same retention policy as your other financial documents, in line with GDPR and LGPD.
Unofficial, official or both
Fintechs usually have two different uses for WhatsApp, and each calls for a different model:
- Your platform's customers billing their own customers: each business connects its own number by QR code, with no approval and no per-message cost. That's the case for the unofficial WhatsApp API.
- The fintech talking to its own base from a verified brand number: transaction alerts, login alerts, communication that needs a badge and predictability. Here the official WhatsApp API (Meta Cloud API) makes more sense, with Meta-approved templates and per-template-message pricing that varies by category and country.
On D-API both connection types use the same sending routes. The type is chosen when you create the session (unofficial or cloud_api), and your payment reminder flow doesn't need to know which one is on the other end. The difference only shows up in templates, which exist only on the official API. The full comparison is in official vs unofficial.
How to get started
The shortest rollout we see on financial platforms: first the due date reminder as text, then the invoice PDF, then the payment link, and finally receiving receipts. Each step ships on its own and already shows up in your delinquency numbers. With the D-API WhatsApp API, billing is per connection, not per message, and it gets cheaper as your base grows. For the product design with one connection per customer, see WhatsApp API for SaaS. Talk to sales for a 14-day free trial, with implementation support in a WhatsApp group.
