Templates
Seven of them, each validated on the way in. A missing invoice total is a 422 naming the field, not a blank line in a customer’s inbox. Every preview here is rendered by the code that sends the real thing, with a sample shop’s branding.
Set your name, colour and logo once in your API console, under Settings → API → How your emails look, and every template comes out looking like you. Nothing to pass per request, and no HTML to maintain.
Receipt
After a payment lands. The one email customers keep and search for later.
template{"name": "receipt","receiptNumber": "R-1042","total": "25,000","paidOn": "5 August 2026","customerName": "Neema","paymentMethod": "M-Pesa","items": [{"description": "Kitenge fabric, 2 metres","quantity": 2,"amount": "18,000"},{"description": "Delivery, Kariakoo","amount": "7,000"}]}
Invoice
Asking to be paid. Add payUrl and the button takes them straight to checkout.
template{"name": "invoice","invoiceNumber": "INV-2026-118","total": "480,000","dueDate": "19 August 2026","customerName": "Neema","items": [{"description": "Monthly retainer, August","amount": "400,000"},{"description": "Extra support hours","quantity": 4,"amount": "80,000"}],"payUrl": "https://example.co.tz/pay/inv-2026-118"}
Order confirmation
Straight after checkout, while they are still wondering whether it worked.
template{"name": "order_confirmation","orderNumber": "ORD-8891","total": "62,000","customerName": "Neema","items": [{"description": "Sandals, size 39","quantity": 1,"amount": "62,000"}],"deliveryEstimate": "Thursday, 7 August","deliveryAddress": "Mikocheni B, Dar es Salaam","trackUrl": "https://example.co.tz/orders/8891"}
One-time code
The code leads the subject line, so it is readable from the notification banner.
template{"name": "otp","code": "482913","app": "Duka Langu","expiresMinutes": 10}
Password reset
Says plainly that ignoring it is safe. This is the message phishing imitates most.
template{"name": "password_reset","resetUrl": "https://example.co.tz/reset/abc123","userName": "Neema","expiresMinutes": 30}
Welcome
First contact after signup.
template{"name": "welcome","userName": "Neema","message": "Your shop is ready. Add your first product and you are live.","actionUrl": "https://example.co.tz/start","actionLabel": "Open my shop"}
Notification
Anything else you need to tell someone. Title, message, optional button.
template{"name": "notification","title": "Your delivery is on the way","message": "The rider left the shop a few minutes ago and should reach you within the hour.","actionUrl": "https://example.co.tz/track/8891","actionLabel": "Track it"}
Money and dates
#Amounts are strings you have already formatted, so write "25,000", not 25000. currency defaults to TZS. That is deliberate: formatting shillings automatically means deciding on your behalf that 25,000/= should read "TZS 25,000.00", which is not how anybody writes it here. Dates are strings too, so they read the way your customers expect.
Send anything else
#Skip template and write the message yourself. Give html, text, or both; whichever you leave out is derived from the other.
json{"from": "Receipts <billing@yourdomain.co.tz>","to": ["customer@gmail.com"],"subject": "Your statement for July","text": "Asante! Your July statement is attached."}