Billing 0.12.0: The module ships its own billing emails
Billing 0.12.0 carries the content of its four emails itself (invoice, receipt, credit note and payment confirmation), so they keep sending once the shared email templates table is retired. Their default text is now also translated into Estonian and Russian.
Billing’s own email content
The four emails used to live only as seeded rows in a table that belongs to the Emails module. That table is being retired, and without this change the emails would stop sending when it goes. The module now passes its own subject and plain-text body to core as a default. The order in which an email’s content is chosen does not change: an active template in the database first, then an override file in the app, then the module’s default. A site that customized one of these emails keeps its version, because the database template still wins.
The defaults need PhoenixKit core 2.17 or later to be used; an older core ignores them.
Emails in Estonian and Russian
The default subjects and bodies are translated into Estonian and Russian and follow the recipient’s language. Before, every recipient got the English text, because the seeded rows held only English.
Upgrading
No migration and no configuration. Update the dependency; nothing changes on a running site while the database templates are still there. The module’s own defaults are plain text only: until core’s shared email layout arrives, they carry no HTML version.
Full release notes: Billing 0.12.0
0.12.0 · 7 September 2026
Phase B of retiring the phoenix_kit_email_templates table. Plan:
phoenix_kit/dev_docs/plans/2026-09-06-templates-table-split.md.
Added
-
PhoenixKitBilling.EmailDefaults— this package now owns the content of its own four emails. Invoice, receipt, credit note and payment confirmation were seeded rows in a table belonging tophoenix_kit_emails, which is why that package hardcoded billing’s copy. That table is being retired; without this, all four emails would stop sending when it goes.The content is passed to core as
:defaults(a zero-arity function, so core evaluates it inside the recipient’s locale rather than whatever locale a background job happens to be in). Resolution order is unchanged: an active database template, then a host override file, then this.Nothing changes for an existing install. A host that customized one of these templates keeps its customization, because the database row still wins. Requires core ≥ 2.17 to take effect; older cores ignore the option, so the pin stays at
~> 2.0. -
Subjects and bodies are now translated into
etandru. They were English-only for every recipient before, because the seeded rows carried a single"en"value.
Fixed
- Ten
et/rustrings were serving a translation matched from a different msgid — “Manage invoices” read as manage currencies, and “Subscription extended by %{days} days” had dropped the placeholder and hardcoded 30 days. Rewritten by hand.
Known gap
- The four emails no longer carry an HTML body once the templates table is dropped, only plain text. The shipped HTML was roughly 200 lines each of inline markup with the header and footer copy-pasted between them — the duplication the shared layout layer exists to remove — and re-homing it here would bake that into a second package immediately before deleting it. The layout layer has to land before the table is dropped. Until then nothing changes, because the database row still wins.
Billing 0.12.0. Install or update: {:phoenix_kit_billing, "~> 0.12"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.