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

# Invoicing

> How billing works in bLIS — eligibility, who is billed, pricing, and how invoices are generated.

## Overview

bLIS generates B2B invoices for completed laboratory work. Billing is based on ordered tests, panels, and fees on an accession — not on payment collection inside the product.

Each billing cycle produces:

* One **invoice** per billed client organization that has pending charges
* Optionally, a **master invoice** (Excel) that aggregates every line item across those clients

Invoices can be exported as PDF or Excel, depending on your lab's invoice format setting.

## How billing works

```mermaid theme={null}
flowchart LR
  A[Order tests and panels] --> B[Accession reaches final]
  B --> C[Pending line items priced]
  C --> D[Scheduled billing run]
  D --> E[One invoice per billed client]
  D --> F[Optional master invoice]
```

1. When you order tests or panels on an accession, bLIS creates billable **instructions** for those items (and fees such as STAT when applicable).
2. After the accession reaches **final** status and has no open holds, those instructions become **pending line items**.
3. On a schedule configured for your deployment, a **billing run** invoices every pending line item.
4. Prices are looked up at invoice time and snapshotted onto each line item. Later catalog price changes do not alter invoices that have already been issued.

## When work becomes billable

An instruction appears as a pending charge only when all of the following are true:

| Requirement             | Detail                                                                               |
| ----------------------- | ------------------------------------------------------------------------------------ |
| Accession is **final**  | Earlier statuses (including completed) are not billed                                |
| No open holds           | An unresolved, non-canceled hold blocks invoicing for that accession                 |
| Instruction is billable | It is not marked to ignore invoicing                                                 |
| Not already invoiced    | Each instruction is invoiced at most once                                            |
| Client allows invoicing | The primary client (and bill-to client, if set) is not configured to ignore invoices |

Cancelled accessions do not become final, so their instructions are not billed.

<Note>
  Pending charges accumulate until the next billing run. Finalizing an accession does not create an invoice by itself.
</Note>

## Who is billed

For each line item, bLIS chooses a single **billing client**:

1. **Invoice override client** on the test specification, if configured — that client is always billed for that test
2. Else the accession **Bill to** organization, if set
3. Else the accession **primary client**

An accession can therefore contribute line items to more than one invoice when some tests use an invoice override and others do not.

Client-specific prices use the bill-to client when one is set (otherwise the primary client). See [How pricing is determined](#how-pricing-is-determined).

## How invoices are separated

Within a billing run, invoices are separated **by billed client only**.

* The billable unit is an **instruction** (an ordered test, panel, or fee) — not the accession as a whole
* All pending line items for the same billed client go on **one invoice**, including charges from many accessions
* Each instruction is its own line item (with the accession ID shown for reference)
* There is no automatic split by accession, date range, receiving lab, or panel within a run

| Situation                                                     | Result                                    |
| ------------------------------------------------------------- | ----------------------------------------- |
| Different billed clients (after override / bill-to / primary) | Separate invoices                         |
| Same billed client across many accessions                     | One shared invoice                        |
| Test invoice override points to another client                | Those lines move to that client's invoice |

## How pricing is determined

bLIS resolves the price for each pending line item when the billing run (or invoice preview) runs:

| Charge type   | Price source                                                                                                                                                   |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Test or panel | Client-specific price for the bill-to client (or primary client if bill-to is unset), if set; otherwise the catalog price on the test or panel; otherwise `$0` |
| STAT fee      | Client **STAT fee** override if set (including `0` to waive); otherwise the global **STAT fee** setting                                                        |

An **Invoice override client** changes who receives the invoice line, not which client's price list is used.

For panel orders billed per accession, you typically get **one line item for the panel** at the panel price — not a separate charge for every constituent test.

Once an invoice is generated, line item prices are fixed on that invoice.

### Billing mode

Tests and panels have a **billing mode** that controls how many charges are created when the work is ordered:

| Mode                             | Effect                                                    |
| -------------------------------- | --------------------------------------------------------- |
| **Bill per accession** (default) | One charge for the ordered test or panel on the accession |
| **Bill per sample**              | One charge per sample for that ordered test or panel      |

Reflex and other result-triggered orders are not fanned out per sample, even if the target test is configured to bill per sample.

### STAT fee

When an accession priority is set to **STAT**, bLIS adds a STAT processing fee instruction. Clearing STAT removes that fee (if it has not already been invoiced).

The amount uses the billed client's **STAT fee** override when one is set (the Bill to client, if present). Leave the override blank to use the lab-wide **STAT fee**. Set the override to `0` to waive the fee — no STAT line appears on the invoice.

## Split billing

Split billing does **not** divide the dollar amount across clients, and it does **not** create additional invoices.

It flags responsibility on the invoice:

* On an accession, you can name organizations in split billing. Those appear in the invoice **Split with** column.
* On a client, you can configure a default split-billing organization. When that client is the primary client, pending line items can be flagged accordingly.

The full line item amount still bills the single billing client chosen by the [who is billed](#who-is-billed) rules.

<Info>
  If a different organization should pay, use **Bill to** (or a test **Invoice override client**). Use split billing only when you need the invoice to show a shared-responsibility flag.
</Info>

## Excluding charges

You can keep work out of invoicing in several ways:

| Control                                       | Where                                     | Effect                                                                                                             |
| --------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Ignore invoices**                           | Client settings                           | Do not invoice when this client is primary (also applies when they are bill-to)                                    |
| **Invoice this accession** / per-item toggles | Accession **Edit billing** (lab managers) | Marks instructions to ignore invoicing                                                                             |
| Cancelled test orders on an instruction       | Accession workflow                        | Marked to ignore invoicing only if none of those orders was assigned to a test run; otherwise use **Edit billing** |
| Non-billable workflow orders                  | Automation / workflow configuration       | Created with invoicing ignored                                                                                     |

After an instruction has been invoiced, you cannot change its billed amount in bLIS. Adjust eligibility before the billing run.

## What appears on an invoice

Client invoices typically include:

* Invoice number and date
* Billed client (invoice to)
* Line items with accession, subject identifiers (shown as Donor ID, UNOS ID, and Alternate ID), description, optional sample custom fields configured for invoices, **Split with**, date, and price
* Invoice total (sum of line item prices)

The invoice number is a sequential integer assigned when the invoice is created. It is unique within your bLIS environment and is not formatted with a prefix or reset per client.

There is no tax, discount, credit, void, or proration calculation in bLIS. Totals are the sum of snapshotted line prices.

### Formats

| Format    | Typical use                                                     |
| --------- | --------------------------------------------------------------- |
| **PDF**   | Printable client-facing document                                |
| **Excel** | Spreadsheet for review or import into external accounting tools |

Your lab sets the default org invoice format in admin billing settings. Master invoices are always Excel.

## Master invoices and notifications

When master invoicing is enabled, each billing run also produces a **master invoice**: one Excel file with every line item from the run, including which client was billed. This is meant for internal finance review alongside the per-client invoices.

Notification behavior depends on your lab settings:

| Mode         | Behavior                                                                                                                                                                                                                                            |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Per document | Email each client invoice to that client's **Invoice email**. If master invoicing is enabled, also email the master invoice to the lab's **master invoice email**. Clients with no invoice email skip notification; the invoice is still generated. |
| Master only  | Send one summary email to the lab's **master invoice email**, with the master invoice and a table of per-client totals. Per-client **Invoice email** addresses are not used in this mode.                                                           |

## Key fields

| Field                       | Meaning                                                                |
| --------------------------- | ---------------------------------------------------------------------- |
| **Primary client**          | Ordering client on the accession                                       |
| **Bill to**                 | Optional alternate client who receives the charges                     |
| **Invoice override client** | Test-level redirect of billing to a specific client                    |
| **Split with**              | Informational shared-billing flag on the invoice                       |
| **Billing mode**            | Bill once per accession, or once per sample                            |
| **Ignore invoices**         | Client-level opt-out from invoicing                                    |
| **Invoice email**           | Recipient for that client's invoice notifications in per-document mode |
| **Invoice number**          | Sequential integer assigned when the invoice is created                |
| **Line item**               | One billed instruction (test, panel, or fee) with a snapshotted price  |
| **Master invoice**          | Aggregate Excel of all line items in a billing run                     |

## Related

<CardGroup cols={2}>
  <Card title="Accessions" icon="flask" href="/concepts/accessions">
    Accessions must reach final status before their charges can be invoiced.
  </Card>

  <Card title="Holds" icon="hand" href="/concepts/holds">
    Open holds keep an accession's charges out of invoicing.
  </Card>

  <Card title="Test specifications" icon="vial" href="/admin/test-specifications">
    Configure prices, billing mode, and invoice override clients.
  </Card>

  <Card title="Reports" icon="file-lines" href="/concepts/reports">
    Reporting finalization relates to when an accession can become final.
  </Card>
</CardGroup>
