Charges
Charges
Overview
Charges are the first billing artifact created from finalized Usage Records.
They represent the billable result of usage after:
- rate matching
- quantity calculation
- charge-rule evaluation
In the billing flow:
Usage Record
↓
Charge
↓
Invoice
↓
StatementCharges are the most granular financial record in Colabmacs. They are the best place to investigate how a billed amount was calculated before it is grouped into an invoice or statement.
Where Charges Come From
Charges are generated from Usage Records, not directly from bookings.
Those usage records may come from:
- completed usage sessions
- manual administrative usage entry
- recurring subscription cycles
A Charge is created only when:
- a usage record exists
- the billable item has a matching rate
- the matching rate belongs to the project's rate group
If no matching rate exists, no charge is created.
What a Charge Represents
A charge captures:
- the related usage record
- the billable item and unit
- the calculated quantity
- the raw total before adjustments
- the final total after charge rules
- any billing comments or rule outputs used during generation
Charge totals may be affected by:
- rate configuration
- after-hours rate logic
- tag-targeted charge rules
- regenerated usage corrections
States
Charges support the following lifecycle states:
| State | Meaning |
|---|---|
PENDING | Editable and not yet attached to a finalized billing document |
BILLED | Attached to an invoice and treated as locked for normal billing flow |
PAID | Read-only because payment settlement has finalized the downstream billing state |
Charge Regeneration
When usage changes, Colabmacs can regenerate the associated charge.
Archived Rate Behavior
When a charge is first created, Colabmacs retains a snapshot of the rate information used for that charge.
During regeneration:
- the system prefers the archived rate unit and value
- this preserves historical consistency
- later rate edits do not silently rewrite old billing
If staff want a charge to use a newly changed rate, the original charge must be removed before regeneration so a new charge can be created from the current rate.
Pending or Billed Charges
If a charge is still Pending or Billed, regeneration updates that charge in place.
This means Colabmacs can:
- recalculate quantity
- recalculate total
- reapply charge rules
- retain the historical rate basis for that charge
Paid Charges and Offset Charges
If a charge is already Paid, Colabmacs does not overwrite the original paid charge.
Instead, it compares the recalculated result to the original amount and creates or updates an Offset Charge when a difference exists.
Offset charges:
- preserve the original paid charge
- store only the delta
- remain attached to the same underlying usage
- may be positive or negative
This allows corrections without breaking historical billing integrity.
Rule Application
Charge rules operate at the charge level.
They may affect:
- quantity
- total
- billable targeting through tags or billable-type filters
Usage Record tags are especially important here, because charge rules can be targeted to tagged usage such as:
in-kindfailed-runinternal-review
Working With Charges
The main operational surfaces for charges are:
- Billing Admin → Charges for billing-focused investigation
- Usage Records when tracing from operational usage into billing
Use Charges when you need to:
- understand why a billed amount looks the way it does
- review adjustments before invoice generation
- validate charge-rule behavior
- trace invoice or statement totals back to specific usage