> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holace.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing

> Firm billing dashboard, pay-per-use rates, document pricing config, and CSV export.

HoLaCe's billing model is **pay-per-use** for AI-generated artifacts (demand letters, chronologies, document summaries, investigations) on top of a base subscription. The Billing page in the admin portal is where firm admins see what they're being charged, configure per-document rates, and export usage statements.

\[Screenshot: Billing dashboard showing month-to-date usage, rate table, and recent generation list]

## What gets billed

Every time HoLaCe generates a chargeable artifact for a journey, a billing line item is recorded. The artifact types that trigger charges include:

* **Demand letters** (drafted, edited, finalized — generation events count, not edits)
* **Medical chronologies** and chronology refreshes
* **Document summaries / extractions** processed through the AI pipeline
* **Investigation reports** (when generated through HoLaCe rather than uploaded)

Read-only views, status checks, and routine CRM activity (creating contacts, adding notes, assigning tasks) are **not** billed.

## The billing dashboard

The dashboard surfaces three things:

1. **Current month-to-date usage** — total generations and accrued charges since the 1st of the month.
2. **Rate table** — what you're paying per document type today. This reflects your `FirmPricingConfig` (see below).
3. **Recent activity** — the last N generations with timestamp, journey, type, page count, and computed charge.

Use the date-range filter to scope the view to last month, the current quarter, or any custom window.

## Per-document pricing (`FirmPricingConfig`)

Each firm has a `FirmPricingConfig` row per document type. Three numbers control the price:

| Field            | What it means                                            |
| ---------------- | -------------------------------------------------------- |
| `flatFee`        | The base price for an artifact below the page threshold. |
| `pageThreshold`  | Number of pages included in the flat fee (default: 500). |
| `overagePerPage` | Per-page rate charged on every page above the threshold. |

So a demand letter with `flatFee = $25`, `pageThreshold = 500`, `overagePerPage = $0.05` and 600 actual pages would cost `$25 + (100 × $0.05) = $30`.

Default rates are set by HoLaCe when your firm is provisioned. SUPER\_ADMIN can adjust them per firm; FIRM\_ADMIN sees the rates here as read-only unless your firm has been granted an editable contract tier.

<Note>
  Pricing changes apply to **future** generations only. Anything already
  generated is locked at the rate that was in effect when it ran.
</Note>

## CSV export

Click **Export CSV** to download every billable line item in the selected date range. The export includes:

* Generation date / time
* Journey number and client name (so your accounting team can map charges to matters)
* Document type
* Page count and computed charge
* Generated by (the user who triggered it)

Use the CSV to reconcile against your client billing system, audit unexpected charges, or prepare end-of-month invoicing.

\[Screenshot: Export CSV button highlighted, with a sample CSV row preview]

## Disputing a charge

If you see a generation you don't recognize or a charge that looks wrong:

1. Note the generation ID from the dashboard row.
2. Open a [bug report](/admin-cross-cutting/support/in-app-bug-button) or email HoLaCe support with the ID and a brief description.
3. SUPER\_ADMIN can void the line item and adjust your statement before month-close.

## What about the subscription base fee?

The base subscription is invoiced separately through Stripe. See [Settings → Integrations](/admin-cross-cutting/settings/integrations) for how Stripe is wired up. The Billing page focuses on usage; subscription history lives in your Stripe customer portal.

<Note>
  Demand-letter generation: full workflow detail in [Legal Workflow → Demand Letters](/legal-workflow/demand-letters).
</Note>
