Billing periods and invoices
An order bills in billing periods, set by its billingCycle, such as monthly from the 1st. At the start of each period it issues an invoice, and each charge lands on the invoice that matches its timing: fixed fees for the period that’s starting, usage for the period that’s just ended. You never create invoices one by one. Knowing which period a charge belongs to tells you exactly which invoice it’s on.
Understand billing periods to:
- Tell your customer when they’ll be billed for fees, usage and one-time charges.
- Predict partial periods, when an order starts, ends or changes mid-period.
- Reconcile late usage with invoices that have already been issued.
Billing periods
billingCycle on the order sets the period: intervalCount months long, 1 to 36, starting on anchorDay. The first period starts at the order’s startsAt, and the last ends at its exclusive endsAt.
The period is also the window usage is measured in. A meter’s quantity, a price’s tiers, its includedQuantity and a percent-of price’s minimum and maximum all apply per period, and reset at the start of the next.
Advance and arrears
Because one invoice is issued per period, a monthly order’s invoice usually carries the coming month’s fees and the past month’s usage together. A recurring price with a longer interval than the cycle, such as an annual fee on a monthly order, appears only on the invoice where each of its intervals starts.
Partial periods
An amendment’s preview shows every proration credit and charge before you apply it. Each is rounded once, half-up, on its invoice line.
Late usage
An event is billed in the period its timestamp falls in. If it arrives after that period’s invoice was issued, the issued invoice doesn’t change. The late usage is billed as an adjustment on the next invoice, at the rates and tiers of the period it belongs to.
To reconcile, list usage summaries with basis=invoice, which report usage as it was posted to invoices, so their totals match what your customer was charged. With basis=usage, the default view, late events show in the period they happened.
Pausing and ending
- Paused orders issue no invoices. Usage is still recorded, and is invoiced when the order resumes.
- An order that ends issues a final invoice after its
endsAt, carrying the usage from its last period. It has no fees in advance, because there’s no next period.
How it bills
Halberd LLP’s order with Clausebase runs for 2027 on a monthly cycle from 1 January. It has a $2,000.00 platform fee and 25 reviewer seats at $40.00, both in advance, and pages on graduated tiers of $0.40 for the first 10,000 a month and $0.25 after that. Halberd reviews 14,200 pages in January, and on 3 February events for 120 more January pages arrive late:
The late pages are billed at the second tier’s $0.25, because January had already passed 10,000 pages. The 1 February invoice stays as it was issued.