Overdue Payment Reminder
The second reminder a utility's credit control team sends a business customer whose invoices are past due. It is a letter on the supplier's stationery, addressed for a window envelope, and it states what is owed, why the amount has grown, the date to pay by and how to pay. A receivables system sends one for every account that is late, so every value on it comes from that account's record.
- The overdue invoices, from data. A table bound to the
invoicesarray draws one row per invoice: its number, issue and due dates, days late, amount, what was paid and the balance. A totals row closes it, drawn once. - Interest and recovery sums as the law states them. The letter names the Act it relies on, the reference rate and the margin over it, and the fixed sum for each invoice paid late. The amounts sit on the starter
invoice-totalscomponent, which ends with the amount to pay and the pay-by date. - Window address and references. The starter
invoice-partycomponent, restyled, holds the return line and the customer's address where a window envelope shows it. The customer number, the reference, the reminder level and the date sit beside it, each label a row header. - Two ways to pay, and a way to object. Bank transfer details on the starter
invoice-paymentcomponent, a QR code that opens the payment page, a note to disregard the letter if payment has crossed, and the credit controller's phone, email and web page oncontact-block-shortfor a dispute. - Archival and accessible. It claims PDF/A-2a and PDF/UA-1. The invoice table has its header cells and a caption, the QR code has alternate text, the signature is text set in a handwriting face (Mr De Haviland), and the running footer is an artifact.
Features used: PDF/A-2a, PDF/UA-1 conformance, columns, tables, rules, SVG, barcodes (qrcode), data binding, components, headers and footers
- Output
- Template
- Data
How it's built
The invoice rows repeat from the data. A row that holds an $item token is drawn once per invoice; the totals row holds none, so it is drawn once, after them:
{
"table": {
"style": "invTable",
"caption": "[span, capText]Overdue invoices at $data.reminder.date[/span]",
"source": "$data.invoices",
"widths": [8, 6, 6, 4, 6, 6, 6],
"rows": [
[{ "th": "INVOICE", "style": "th" }, { "th": "ISSUED", "style": "th" }, /* … */ { "th": "BALANCE", "style": "thR" }],
[
{ "td": "$item.number", "style": "td" },
{ "td": "$item.issued", "style": "td" },
{ "td": "$item.due", "style": "td" },
{ "td": "$item.daysOverdue", "style": "tdLate" },
{ "td": "$item.amount", "style": "tdR" },
{ "td": "$item.paid", "style": "tdR" },
{ "td": "$item.balance", "style": "tdBal" }
],
[
{ "td": "Total $data.currency", "style": "tfLabel", "colspan": 4 },
{ "td": "$data.totals.amount", "style": "tfValue" },
{ "td": "$data.totals.paid", "style": "tfValue" },
{ "td": "$data.totals.balance", "style": "tfValue" }
]
]
}
}
Each entry in invoices is one row: { "number": "VU-2026-2207", "issued": "12 Aug 2026", "due": "26 Aug 2026", "daysOverdue": "82", "amount": "3,418.60", "paid": "1,500.00", "balance": "1,918.60" }. The engine adds nothing up: the totals, the interest and the amount to pay are values in the data, worked out by the system that issues the reminder. Here the interest is 12 % a year on each balance for the days it is late, 127.06 in all, and the fixed sums are three invoices at 40.00.
The charges are the starter invoice-totals component. The document passes its own labels, and restyles the component by defining the component's style names in its own styles, here in the supplier's teal:
{
"styles": {
"itDueLabel": { "fontFamily": "Sans", "fontSize": 7.5, "fontWeight": "bold", "color": "#FFFFFF", "backgroundColor": "#146C70", "verticalAlign": "middle", "border": "none", "paddingTop": 9, "paddingBottom": 9, "paddingLeft": 8 },
"itDueValue": { "fontFamily": "Sans", "fontSize": 12, "fontWeight": "bold", "color": "#FFFFFF", "backgroundColor": "#146C70", "textAlign": "right", "verticalAlign": "middle", "border": "none", "paddingTop": 7, "paddingBottom": 7, "paddingRight": 8 }
},
"content": [
{
"use": {
"name": "invoice-totals",
"params": {
"rows": [
{ "label": "Overdue balance", "value": "$data.totals.balance" },
{ "label": "Interest at $data.law.rate % a year", "value": "$data.totals.interest" },
{ "label": "Fixed recovery sums, $data.reminder.invoiceCount × $data.currency $data.law.fixedSum", "value": "$data.totals.recovery" }
],
"dueLabel": "To pay by $data.reminder.payBy",
"dueValue": "$data.currency $data.totals.due"
}
}
}
]
}
The QR code is a barcode drawn in an svg, so it takes a title a screen reader announces. It encodes the payment page for this reminder, https://pay.utilities.verdania.example/r/CC-2026-0417, read from the data:
{
"svg": {
"width": 72,
"height": 72,
"viewBox": [72, 72],
"title": "QR code linking to the payment page for reminder $data.reminder.number",
"children": [
{ "barcode": { "x": 0, "y": 0, "width": 72, "height": 72, "spec": { "type": "qrcode", "code": "$data.payment.url" } } }
]
}
}