KamoCRM

License-based add-on pricing and a real subscription invoice lifecycle

Featurekamo-shared-library
Shipped
October 22, 2026 at 10:00 PM UTC
Author
Kamo
Commit
21fa7d9

One rule for add-on quantity (AddOnLicenses): every add-on bills the licenses PURCHASED, like seats - per-user add-ons default to the seat count, storage to the blocks bought - never usage. The order calculator charged anything not PER_SEAT once, so a 10-seat order with 3rd-party e-mail and phone was priced $5 instead of $50. Order lines now carry real quantity and unit price; a draft reprice keeps the licenses it states. Activation turns the order's add-on lines into licensed add-on instances (they were dropped, so no invoice ever billed an add-on), anchors the billing day, includes add-ons in MRR, and raises the first invoice as a draft. Approving an order paid by invoice, wire, ACH or check now grants access as PAID; only COMP did anything. SubscriptionInvoiceService: - renewal drafts raised lead-days ahead, once per period (unique constraint) - periods roll on the billing day only once invoiced - trials convert; non-renewing subscriptions end - payments recorded with the date received, method and reference, partial payments supported (new **************** - draft editing with server-side totals - guarded void/refund - overdue marking and reminder scheduling - view-online tokens (SHA-256 at rest) - race-safe INV-YYYY-NNNN numbering on the shared document counter Per-market MarketInvoicePolicy: auto-send vs hold (default hold), lead days, due days, payment instructions. PaymentMethod gains ACH and CHECK. New email templates commerce.invoice_sent / invoice_reminder / invoice_ready and NotificationKind BILLING_INVOICE.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing