Billing 0.21.0: Editing a billing profile works, one form everywhere
Billing 0.21.0 fixes editing a billing profile from the user dashboard, which created a copy instead, and uses one billing profile form in the dashboard, the admin and the shop checkout.
Editing a billing profile from the dashboard
On the user dashboard, the edit link of a billing profile opened the New Billing Profile form, and saving it created a duplicate profile. The link now opens the profile for editing. Saving a profile as the default also clears the default on the user’s other profiles in the same step, so each user keeps one default. A first and last name too long for the display name is shortened instead of failing to save.
One billing profile form
The billing profile fields are now defined once and used by the dashboard form, the admin form and other modules, such as the e-commerce checkout. Callers can require the email and the address. The validation messages are translated, and the business profile option now reads Business billing profile, without “(EU)”.
More languages
The printed billing documents and the billing profile form are now translated into Ukrainian. The billing profile form also has German and French translations; the rest of the module stays in English for those languages.
Upgrading
No migration and no configuration. Update the dependency.
Full release notes: Billing 0.21.0
0.21.0 · 10 October 2026
A shared billing profile form (PR #50), the dashboard edit-link fix (PR #49) and Ukrainian printed documents (PR #51).
Added
Web.Components.BillingProfileFields— the billing profile form fields, defined once and rendered by the dashboard form, the admin form and any other caller (the e-commerce checkout). Inputs bind to@form[:field]; the caller owns the<form>, its events and the submit button.BillingProfile.fields_changeset/3andBillingProfile.form_fields/0— the user-facing field rules without the owner oris_default, with:require_emailand:require_addressoptions, so a form with no persisted owner yet can validate. Field lengths mirror the column sizes and count code points like Postgres.- German (
de) and French (fr) catalogues for the shared billing profile form; every other string falls back to English. - Ukrainian translations for the printed billing documents and the billing profile form.
Changed
- The billing profile validation messages are translated through
PhoenixKitBilling.Gettext. - The business billing profile label drops its “EU” qualifier.
get_default_billing_profile/1returns the most recently updated default instead of raising when older data holds several.
Fixed
- The dashboard “Edit billing profile” link opened the “New Billing Profile”
form, and saving created a duplicate. Core routes the page with
:uuid; the form read onlyid. Both are accepted now. - Saving a billing profile as default clears the flag on the user’s other profiles in the same transaction, so a user keeps one default.
- An over-long display name (first + last name) is cut to the column size
instead of raising
Postgrex.Error.
Billing 0.21.0. Install or update: {:phoenix_kit_billing, "~> 0.21"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.