- Shipped
- October 23, 2026 at 12:06 AM UTC
- Author
- Kamo
- Commit
- 398f710
Owner rule 2026-10-22: every per-user add-on bills the licenses purchased, like seats; how many mailboxes or extensions may be in use is limited only by them. - GET /api/billing/licenses/usage (session, X-Org-Id): per add-on code (EMAIL_3P_INTEGRATION, EMAIL_HOSTING, PBX_3P_INTEGRATION, PBX_HOSTING) the licenses held, in use, available, over-by, and whether the org is exempt. - GET **************** guarded by X-Internal-Auth (constant-time compare with billing.internal-auth-secret), for EmailService and VOIPService to ask before putting one more unit into use. - Licensed = AddOnLicenses.licensed over the primary subscription's active_addon_codes / addon_quantities (or a plan that includes the add-on); the reserved __mailboxes:/__extensions: keys are never read as licenses. In use = OrgMailboxBillingAggregator / OrgPbxBillingAggregator, the counts the nightly bill uses. - Platform org and OWNER_UNLIMITED are exempt; PAID and COMP are capped; TRIAL, FREE and no subscription are left to the existing entitlement gates. - Only a change that ADDS a unit past the licenses is refused; a unit already counted, or a 3rd-party extension move that frees one, always goes through.
