Billing 0.1.3: A tax rate other modules can read
Billing 0.1.3 lets other PhoenixKit modules, such as a shop, read the tax rate set in the billing settings, and makes sure that rate is zero while tax is switched off.
Three functions now give the billing tax settings to other modules: whether tax is enabled, the default rate as a fraction (20% as 0.20), and the rate as a whole percentage. They are also available under the older PhoenixKit.Modules.Billing name.
The percentage used to ignore the tax switch and return the saved rate even with tax turned off; it now returns zero in that case, like the fraction. A tax rate setting that is not a number no longer causes a crash; it counts as zero.
Full release notes: Billing 0.1.3
0.1.3 · 30 March 2026
Added
- Public tax rate API:
tax_enabled?/0,get_tax_rate/0,get_tax_rate_percent/0for cross-module use - Compat delegates for tax rate API and
get_config/0inPhoenixKit.Modules.Billing
Fixed
get_tax_rate_percent/0now respectstax_enabled?flagget_tax_rate/0handles non-numeric settings values without crashingget_config/0usestax_enabled?/0instead of inlining the check
Billing 0.1.3. Install or update: {:phoenix_kit_billing, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.