Skip to content

Billing 0.19.0: Rebuilt billing emails with a line-items table

Billing 0.19.0 rebuilds the four billing emails (invoice, receipt, credit note and payment confirmation) with a button to the document and a table of line items, and sends them in the customer’s own language.

New email defaults

Each email is now a subject, a formatted body and a separate plain-text body. The HTML version has a button to the document online, the line items as a table, and the company’s details as a closing block. The button, the invoice’s bank-transfer section and each empty company line are left out when the send has no value for them. A template saved in the database still wins over all of this, so a site that customized an email keeps its own copy.

Item names and descriptions in the line items are now HTML-escaped. They used to be inserted as they were, also in the rows offered to database templates.

Language, preview and layout

The emails go out in the customer’s preferred language instead of the site’s default; billing’s own text follows it on core 2.48.0 and later. The four emails appear with sample values in core’s email preview at /admin/settings/email-sending/preview. They are sent in a billing layout group, so a site can restyle them with _layout-billing, _header-billing and _footer-billing files. The payment confirmation email can show the company’s VAT number.

Upgrading

This release needs PhoenixKit >= 2.44.0 and < 3.0.0. A site on core 2.38 to 2.43 stays on Billing 0.18 until it updates core. No migration. Customers start receiving the new emails, in their own language, unless a database template overrides them.

Full release notes: Billing 0.19.0

0.19.0 · 4 October 2026

Billing emails rebuilt on core’s Markdown email parts, with a line-items table, the billing layout group and the customer’s own language (PR #46).

Changed

  • ⚠️ Requires phoenix_kit >= 2.44.0 and < 3.0.0 (was >= 2.38.0). The email defaults are a markdown part sent in the billing layout group, and the emails register with core’s preview through email_templates/0 — all first shipped in core 2.44.0. Hosts on core 2.38–2.43 stay on 0.18.x.
  • The four financial emails (invoice, receipt, credit note, payment confirmation) are now a subject, a markdown body and a separate text body. The HTML version has a button to the document, the line items as a styled table, and the company’s details as a closing block. The button, the invoice’s bank-transfer section and each blank company line are left out when the send has no value for them. A database template still wins over all of it, so an install that customized one keeps its copy.
  • Line items are HTML-escaped. line_items_html (the bare <tr> rows for database templates) used to interpolate item names and descriptions raw.
  • The emails are sent in the customer’s own preferred_locale rather than the site’s default language (billing’s own copy follows it on core 2.48.0 and up).

Added

  • PhoenixKitBilling.email_send_opts/4 — everything a financial email’s send passes: the defaults, layout: "billing" and the customer’s locale:.
  • PhoenixKitBilling.email_templates/0 (and the compat delegate): the four emails, with sample values, in core’s email preview at /admin/settings/email-sending/preview.
  • EmailDefaults.line_items_table_html/2 and the {{{line_items_table_html}}} variable, plus company_vat on the payment-confirmation email.
  • A host can restyle billing emails with _layout-billing, _header-billing and _footer-billing files.

Billing 0.19.0. Install or update: {:phoenix_kit_billing, "~> 0.19"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.