> This page is for version Preview (default).
> For other versions, use one of these documentation indexes:
> - Preview (default): https://docs.preview.paid.ai/preview/llms.txt
> - Current: https://docs.preview.paid.ai/current/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.preview.paid.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.preview.paid.ai/_mcp/server.

# Customer units

> Split a customer's usage by team, workspace, environment or person, and keep test environments off the invoice.

A **customer unit** is a part of a customer: a team, department, workspace, environment or person. Each customer can have a tree of units, and every event can name the unit it was for. Units change how usage is attributed and reported, never how it's priced: a unit shares its customer's orders, prices and invoices, so the customer gets one bill however you split it.

Use a customer unit to:

* **Report usage per team** by naming the unit on each [event](/usage/sending-events) and filtering or grouping [usage summaries](/usage/usage-summaries) by it.
* **Keep test environments off the invoice** by marking a unit, and everything under it, [non-billable](#exclude-a-unit-from-billing).
* **Report usage per person**, because a person can be a unit too, under their team.
* **Accept usage from systems that only know a team**, by giving the unit a [customer alias](/customers/customer-aliases).

Customer units are in the `customer_units=v1` private beta: send `Paid-Beta: customer_units=v1` with each request.

## How units work

1. **Each customer has one root unit.** It stands for the whole customer and is always billable. A customer created with an `externalId` gets its root automatically, with the same `externalId`.
2. **Every other unit has a `parent`** in the same customer, up to 16 levels deep including the root. You label each level in your own words with `kind`, such as `practiceGroup`, `environment` or `user`. Paid has no fixed layers.
3. **Events name the customer, and optionally the unit.** Usage on a unit counts towards its customer, and towards every unit above it in reports.
4. **Billing happens at the customer.** Prices, pricing tiers and commits apply to the customer's total, not to each unit.

A unit is the right model for part of one company that shares its contract. If part of a company signs its own contract, pays its own invoices or needs its own prices, make it a separate [customer](/customers/customers). If it still belongs to a group that pays for it, such as a subsidiary, give it the group as its [parent](/customers/customers).

## Build a customer's tree

Clausebase sells contract review, priced per page. Its customer Halberd LLP wants usage split by practice group, and runs a sandbox it shouldn't be billed for. Clausebase builds Halberd's tree: the firm at the root, a unit for each practice group, and a non-billable sandbox.

#### API

Halberd was created with the `externalId` `halberd`, so its root unit already exists, with the ID `cu_2Rr8Wd` and the same `externalId`. [List Halberd's units](../api-reference/customers/customer-units/list) to find it: it is the one with `isRoot: true`. Create each unit under it, naming the parent by its `cu_` ID or your `externalId`:

**`POST /v1/customers/cus_4Lp9Hd/units`**

```json title="POST /v1/customers/cus_4Lp9Hd/units"
{
  "externalId": "litigation",
  "parent": "cu_2Rr8Wd",
  "name": "Litigation",
  "kind": "practiceGroup"
}
```

**`Response`**

```json title="Response"
{
  "id": "cu_7Pq2Rn",
  "object": "customerUnit",
  "livemode": false,
  "customer": "cus_4Lp9Hd",
  "externalId": "litigation",
  "parent": "cu_2Rr8Wd",
  "name": "Litigation",
  "kind": "practiceGroup",
  "isRoot": false,
  "billable": true,
  "effectiveBillable": true,
  "metadata": {},
  "createdAt": "2026-11-01T09:00:00Z",
  "updatedAt": "2026-11-01T09:00:00Z",
  "archivedAt": null
}
```

The sandbox is created the same way, with `billable: false`:

**`POST /v1/customers/cus_4Lp9Hd/units`**

```json title="POST /v1/customers/cus_4Lp9Hd/units"
{
  "externalId": "halberd-sandbox",
  "parent": "cu_2Rr8Wd",
  "name": "Sandbox",
  "kind": "environment",
  "billable": false
}
```

#### Dashboard

> **Draft**
>
> These steps describe the planned v1 dashboard and will change before release.

1. Go to **Operate > Customers** and open **Halberd LLP**.
2. On the **Units** tab, click **Add unit** on the root. Enter the **External ID** (`litigation`), **Name** and **Kind** (`practiceGroup`), and save.
3. Add the sandbox the same way, and turn off **Billable**.

| Field        | What it's for                                                                                                                                                                                              |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `externalId` | Your ID for the unit, unique across your account ignoring letter case, among unit IDs, customer external IDs and aliases. Only the root may share its customer's `externalId`. Required, and can't change. |
| `parent`     | The unit it sits under: an active unit of the same customer. The customer's root already exists, so name it to place a unit at the top of the tree.                                                        |
| `name`       | Shown in the dashboard and reports. Never used to look the unit up.                                                                                                                                        |
| `kind`       | Your label for the level, up to 64 characters. Filter lists and reports by it.                                                                                                                             |
| `billable`   | `false` records the unit's usage without billing it. Defaults to `true`.                                                                                                                                   |

Anywhere the API asks for a unit, pass its `cu_` ID or your `externalId`. Your ID is resolved within the customer, ignoring letter case, so a unit path always includes the customer. A value that starts `cu_` is looked up as a Paid ID first, then as your ID.

## Attribute usage to a unit

Name the unit in `customerUnit` when you [send an event](/usage/sending-events). The event still names its customer:

**`POST /v1/events`**

```json title="POST /v1/events"
{
  "eventName": "document.reviewed",
  "customer": "cus_4Lp9Hd",
  "customerUnit": "litigation",
  "product": "contract_review",
  "dedupeKey": "doc_8f2k1q",
  "payload": { "pages": 42 }
}
```

A unit is only ever looked up within the event's customer, so usage can't land on another customer's unit. A `cu_` ID that belongs to a different customer fails for that event.

If the event names a unit that doesn't exist yet, the event is accepted but no unit is created: its usage is held until you [create the unit](../api-reference/customers/customer-units/create) with the same `externalId`, and then lands on that unit.

## Report usage by unit

[Usage summaries](/usage/usage-summaries) take a `customerUnit` filter. By default it includes everything under the unit (`includeDescendants`), so filtering on Litigation includes any teams you later add under it. Send `includeDescendants=false` for the unit's own usage only, or `groupBy=customerUnit` to see every unit side by side.

## Exclude a unit from billing

Set `billable: false` on a unit to record its usage without billing it, such as a customer's development or QA environment. It applies to everything under the unit too: `effectiveBillable` is `false` when the unit or any unit above it has `billable: false`, and a unit can't make itself billable under a non-billable one.

Usage on a unit with `effectiveBillable: false`:

* adds nothing to invoices,
* spends no credits,
* counts towards no commit,
* still appears in usage summaries, with zero `spend`.

`billable: false` needs non-billable units enabled on your account; ask Paid to turn them on. A change to `billable` applies to usage received afterwards. Usage already received keeps the billability it had. The root is always billable: a customer you never want to bill simply has no order.

## How it bills

Clausebase prices contract review with graduated pricing: the first 2,000 pages in a month at 50¢ each, and every page after that at 30¢. Price amounts are in cents. In November, Halberd's units send:

| Unit       | Pages | `effectiveBillable` |
| ---------- | ----- | ------------------- |
| Litigation | 3,000 | `true`              |
| M\&A       | 1,500 | `true`              |
| Sandbox    | 400   | `false`             |

| Step                                   | Value                                         |
| -------------------------------------- | --------------------------------------------- |
| Billable pages (Litigation and M\&A)   | 3,000 + 1,500 = 4,500                         |
| Sandbox pages, recorded but not billed | 400                                           |
| First pricing tier                     | 2,000 × 50¢ = 100,000¢                        |
| Second pricing tier                    | (4,500 − 2,000) × 30¢ = 2,500 × 30¢ = 75,000¢ |
| Charge                                 | 100,000¢ + 75,000¢ = 175,000¢                 |
| Invoice line                           | Contract review: **\$1,750.00**               |

The pricing tiers apply to Halberd's total. Rating each practice group on its own would have charged Litigation 2,000 × 50¢ + 1,000 × 30¢ = 130,000¢ and M\&A 1,500 × 50¢ = 75,000¢, a total of \$2,050.00. Units never change the price: they only change how the \$1,750.00 is reported.

## People and seats

A person is a unit too, usually with `kind: "user"` under their team. Give them their email as a [customer alias](/customers/customer-aliases), so systems that only know the email can still attribute their usage. Seats have no link to units yet; a later release may let a person's unit hold a [seat](/orders-and-billing/seats).

## Change or archive a unit

[Update a unit](../api-reference/customers/customer-units/update) with only the fields to change: `name`, `kind`, `parent`, `billable` or `metadata`. `externalId` can't change. `metadata` replaces the whole map, so send every key you want to keep. A unit whose metadata was saved with values other than strings, through the legacy API, refuses a `metadata` update rather than lose them.

Changing `parent` moves the unit with everything under it. The root can't move, a unit can't move under itself or anything below it, and the move can't take any unit past 16 levels. A move changes the billability of usage received afterwards, by the same rule as changing `billable`.

[Archive a unit](../api-reference/customers/customer-units/archive) when it's gone. It stays readable and in reports, usage sent to it still lands on it, and its `externalId` stays reserved. `archivedAt` says when it was archived. Archiving fails while the unit has active units under it or an active spend cap, and the root can't be archived. [List units](../api-reference/customers/customer-units/list) with `includeArchived=true` to see archived ones.

## Related

* [Customers](/customers/customers)
* [Customer aliases](/customers/customer-aliases)
* [Seats](/orders-and-billing/seats)
* [Usage summaries](/usage/usage-summaries)
* [Customer units API reference](../api-reference/customers/customer-units/create)