Bill phone service by the extension

FeatureBillingService
Shipped
August 27, 2026 at 3:21 AM UTC
Author
Kamo
Commit
facbc36

PricingModel.PER_EXTENSION, its own reserved quantity key, an allocator, a nightly reconciler, a removal gate and the summary API - the phone twin of the per-mailbox work, differing everywhere the data does. Multi-instance is the difference that runs through all of it. An org can run a KamoPBX server and a RingCentral server at once, so both add-ons can bill in the same month: the allocator returns a count per subscription PER CODE, and every subscription carries both codes with zero where nothing was attributed. That makes driving an unused code to zero the ordinary path rather than the special case the mail reconciler needs. PER_EXTENSION is its own PricingModel, not a reuse of PER_MAILBOX, and parks its count under __extensions: rather than __mailboxes:. The two reconcilers run independently and neither may disturb the other's quantity. Licensed, never metered - a metered Stripe price rejects a quantity outright and fails the whole subscription call. PhoneCostMode is a sibling of MailCostMode for the same reason: reusing mail_cost_mode would make the column name false and would silently move the phone money when an owner changed who pays for mail. Attribution follows the assigned member directly - extensions need no primary concept, because MEMBER_VOIP_CONFIG.MEMBER_ID is unique and MemberVoipConfigController returns 409 on a second claimant, so the link is already exclusive on both sides. org_extension_billing_days is keyed on the subscription as well as the day and code. The mail table is not, so under GROUP_PAYS_OWN its second billing group overwrites the first and the day's audit row is wrong for every group but the last. Recorded as a follow-up rather than copied. The shared-lib voip.billing package is named in @EnableJpaRepositories - that list is explicit, and the failure mode is the service refusing to start.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing