Notifications

These are the messages sent to the policyholder as an invoice moves through its lifecycle.

Each notification is an email or SMS template you write and enable under Communications.
Nothing is sent for an event whose template you have not enabled.

The notifications

NotificationSent whenDocument attached
invoice_createdAn open invoice is sent to the policyholderThe invoice PDF
invoice_refundedA credit note is sent, crediting an earlier invoiceThe credit note PDF
invoice_paidAn invoice is marked paid and its receipt is generatedThe receipt PDF
invoice_voidedAn invoice is voidedThe void PDF
invoice_uncollectibleAn invoice is written off as uncollectibleNone
📘

A credit note is an invoice in its own right, so it sends invoice_refunded rather than
invoice_created. That lets the credit note read as a credit rather than as a new amount
owed. Its original_invoice_id points at the invoice being credited.

Attachments

The document is attached to the email for you. You do not reference it in the template, and
you do not need to render its contents: the PDF is the itemised document, and the email body
is the covering message.

Attachments are email only. An SMS template for the same event sends the message on its own.

Merge variables

Three objects are available to an invoice notification template:

VariableWhat it holds
invoiceThe invoice the notification is about
policyThe policy the invoice was raised against
policyholderThe policyholder the invoice is addressed to

policy and policyholder hold the same fields they do in any other notification.

The invoice object

FieldTypeNotes
invoice_idstring
organization_idstring
policy_idstringThe policy the invoice was raised against
environmentstringsandbox or production
typestringYour own invoice type, from settings.invoices.invoiceTypes
messagestringThe free-text note captured when the invoice was created
statusstringOne of draft, open, paid, void, refunded, uncollectible
referencestringThe invoice reference, assigned when the invoice is finalised
invoice_datestringCalendar day, YYYY-MM-DD
due_datestringCalendar day, YYYY-MM-DD
totalintegerWhat the recipient owes, in the currency's minor unit
currencystringISO 4217, for example ZAR
document_file_idstringThe rendered invoice PDF
receipt_document_file_idstringThe receipt PDF, once the invoice is paid
void_document_file_idstringThe void PDF, once the invoice is voided
proof_of_payment_file_idstringProof of payment, if one was attached
original_invoice_idstringPresent on a credit note, pointing at the invoice it credits
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Things worth knowing

total is what the recipient owes, as a positive number. Invoicing stores ledger amounts
from the policyholder's perspective, where a premium owed is negative. The merge variable is
already flipped for you, so {{invoice.total}} on a premium invoice renders a positive figure
and needs no handling in the template. A credit note's total is likewise positive, being the
value of the credit.

Amounts are in the currency's minor unit. A total of 150000 in ZAR is R1 500.00.
Divide by 100 before displaying it.

invoice_date and due_date are calendar days, not timestamps. They render as
2026-09-01, so formatting them as a date needs no timezone handling.

A field with no value is absent, not empty. An invoice that is not yet paid carries no
receipt_document_file_id at all, rather than an empty one, so guard optional fields with
{{#if}} rather than testing them for a blank value.

Example

<p>Hi {{policyholder.first_name}},</p>

<p>
  Invoice {{invoice.reference}} for your {{policy.package_name}} policy comes to
  {{invoice.currency}} {{invoice.total}}, due on {{invoice.due_date}}.
</p>

<p>The invoice is attached.</p>

{{#if invoice.message}}
  <p>{{invoice.message}}</p>
{{/if}}

Did this page help you?