Account statement

What a customer owes, since when and how to pay it, with movements, aging buckets and a clickable payment link.

estado-de-cuenta, with the premium design: what a customer owes, since when and how to pay it.

"statement": { "number": "EC-0012", "cutoffDate": "13-09-2026" },   // number is optional
"movements": [
  { "number": "FV-0231", "type": "Factura de venta", "date": "10-06-2026", "dueDate": "10-07-2026",
    "daysOverdue": 65, "amount": 4200000, "payments": 0, "balance": 4200000 }
],
"aging": [
  { "label": "61 a 90", "amount": 4200000, "highlighted": true }
],
"totals": { "invoiced": 12700000, "payments": 1100000, "balance": 11600000 },
"payment": { "enlace": "https://…", "textoDelEnlace": "Pagar en línea con PSE" },
"paymentLegend": "Consignar a nombre de…"
  • Nothing is calculated here. Days overdue don’t come from the dates, each movement’s balance is not the amount minus payments, aging is not distributed from the movements and the total balance is not invoiced minus paid: everything arrives ready and is printed as it arrives.
  • A movement that has no payments, balance or due date of its own —a receipt, a credit note— is sent without those fields, and the cells stay blank. If you send a 0, $ 0,00 is printed.
  • Buckets with highlighted stand out with color, a thick border and bold text, so they can be told apart even when printed in black and white. You decide which bucket is worrying.
  • The payment link is clickable in the PDF, next to the payment legend. Without either, the box is not drawn.
  • Without cutoffDate it says «Sin fecha de corte» (“No cutoff date”); without movements, «Sin movimientos» (“No movements”); without totals.balance, «Sin saldo» (“No balance”). It also accepts notes, fields and sideNotes.

Example: estado-de-cuenta.json.