> 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.

# Orders

> Put your prices on a customer for a term, decide when they're invoiced, and start billing when the deal is signed.

An **order** is the deal you've agreed with a customer: which prices and rate cards they pay, from when to when, and how they're invoiced. Each price or rate card on it is an **order line**. Nothing in your catalog bills anyone until an order puts it on a customer, and a new order bills nothing until you activate it, so you can build and check a deal before it goes live.

Use an order to:

* **Start billing a customer** by putting [prices](/catalog/prices), [rate cards](/catalog/rate-cards) or a [plan](/catalog/plans) on them and activating the order.
* **Record a negotiated deal** with its discounts and spend commitments, using [negotiated pricing](/core-concepts/introduction-to-pricing#how-one-line-is-priced) and [commits](/orders-and-billing/commits) created with the order.
* **Change what a customer pays mid-term** with an [amendment](/orders-and-billing/amending-orders) that previews the exact proration before it's applied.
* **Sell seats** by putting a seat price on the order and [assigning seats](/orders-and-billing/seats) to people.

Orders are in the `orders=v1` private beta: send `Paid-Beta: orders=v1` with each request.

> **Note**
>
> Creating an order on rate cards is in the internal `rate_cards=v1` preview: send `Paid-Beta: rate_cards=v1` and an `Idempotency-Key`. In the preview, [create](../api-reference/billing/orders/create) saves the order and activates it in one call, on a monthly billing cycle. It needs at least one `rateCard` line, and a `price` line can only add a recurring price that grants credits. If billing can't confirm the activation, it returns a retryable `503`: send the same request with the same key.

## How an order works

1. **You create a draft.** It names the customer, the term (`startsAt` to the exclusive `endsAt`), the billing cycle and the lines. A draft is inert: it bills nothing and you can change anything on it.
2. **You activate it.** Paid checks the customer and every line, then starts billing. From then on, what's billed changes only through amendments.
3. **It invoices on its billing cycle.** Recurring fees are invoiced in advance by default, usage in arrears, and one-time charges straight away.
4. **It ends on its own** at `endsAt`, with a final invoice for the usage in its last cycle. An order without an `endsAt` runs until you amend it.

## Create an order

Clausebase signs Halberd LLP for 2027: contract review priced per page on tiers, a monthly platform fee and 25 reviewer seats, invoiced monthly on Net 45 terms against Halberd's purchase order.

#### API

[Create an order](../api-reference/billing/orders/create) with the customer, the term, the billing cycle and the lines. It's created as a draft.

**`POST /v1/orders`**

```json title="POST /v1/orders"
{
  "customer": "cus_2Jm7Hd",
  "externalId": "halberd-2027",
  "name": "Halberd 2027",
  "startsAt": "2027-01-01T00:00:00Z",
  "endsAt": "2028-01-01T00:00:00Z",
  "billingCycle": { "interval": "month", "intervalCount": 1, "anchorDay": 1 },
  "paymentTerms": "net45",
  "purchaseOrderNumber": "PO-88213",
  "lines": [
    {
      "type": "price",
      "price": { "price": "prc_7Kd2Pw" },
      "displayName": "Contract review pages (2027 MSA)"
    },
    { "type": "price", "price": { "price": "prc_3Wq9Lb" } },
    { "type": "price", "price": { "price": "prc_5Tn8Rv", "quantity": 25 } }
  ]
}
```

**`Response`**

```json title="Response"
{
  "id": "ord_5Kp2Wz",
  "object": "order",
  "livemode": false,
  "customer": "cus_2Jm7Hd",
  "billTo": "cus_2Jm7Hd",
  "externalId": "halberd-2027",
  "name": "Halberd 2027",
  "currency": "usd",
  "startsAt": "2027-01-01T00:00:00Z",
  "endsAt": "2028-01-01T00:00:00Z",
  "billingCycle": { "interval": "month", "intervalCount": 1, "anchorDay": 1 },
  "paymentTerms": "net45",
  "invoiceSettings": {
    "autoFinalize": true,
    "autoSend": true,
    "sendPaymentReminders": true
  },
  "purchaseOrderNumber": "PO-88213",
  "billingContacts": [],
  "metadata": {},
  "status": "draft",
  "activatedAt": null,
  "version": 1,
  "lines": [
    {
      "id": "ordl_5Sd1Kq",
      "object": "orderLine",
      "type": "price",
      "price": { "price": "prc_7Kd2Pw", "quantity": null },
      "name": "Pages reviewed",
      "displayName": "Contract review pages (2027 MSA)",
      "startsAt": "2027-01-01T00:00:00Z",
      "endsAt": "2028-01-01T00:00:00Z",
      "endedByAmendment": null,
      "plan": null,
      "charged": null,
      "invoice": null
    },
    {
      "id": "ordl_8Hc2Nw",
      "object": "orderLine",
      "type": "price",
      "price": { "price": "prc_3Wq9Lb", "quantity": null },
      "name": "Platform fee",
      "displayName": null,
      "startsAt": "2027-01-01T00:00:00Z",
      "endsAt": "2028-01-01T00:00:00Z",
      "endedByAmendment": null,
      "plan": null,
      "charged": null,
      "invoice": null
    },
    {
      "id": "ordl_3Tb6Yp",
      "object": "orderLine",
      "type": "price",
      "price": { "price": "prc_5Tn8Rv", "quantity": 25 },
      "name": "Reviewer seat",
      "displayName": null,
      "startsAt": "2027-01-01T00:00:00Z",
      "endsAt": "2028-01-01T00:00:00Z",
      "endedByAmendment": null,
      "plan": null,
      "charged": null,
      "invoice": null
    }
  ],
  "plan": null,
  "negotiatedPricing": [],
  "commits": [],
  "createdAt": "2026-12-14T10:00:00Z",
  "updatedAt": "2026-12-14T10:00:00Z"
}
```

Store the `ord_` ID. Anywhere the API takes an order in its path, it also accepts your `externalId`.

When the deal is signed, [activate the order](../api-reference/billing/orders/activate):

**`POST /v1/orders/ord_5Kp2Wz/activate`**

```text title="POST /v1/orders/ord_5Kp2Wz/activate"
```

It returns the order with `status: "active"`, or `202` with `status: "activating"` if billing takes longer to confirm.

#### Dashboard

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

1. Go to **Operate > Orders** and click **Create order**.
2. Choose the customer (Halberd LLP), and enter a **Name** and, optionally, your own **External ID**.
3. Set the **Start** and **End** dates, the billing cycle, the payment terms and the PO number.
4. Under **Lines**, add the pages price, the platform fee and the reviewer seat price, and set the seat quantity to 25.
5. Click **Save as draft**, review the order, then click **Activate**.

Send `lines`, a `plan`, or both. At least one is required.

## Order lines

Each line is a `price` or a `rateCard`. A line bills from the order's start to its end unless you give it its own `startsAt` or `endsAt`, which must fall inside the order.

| Field                  | What it's for                                                                                                                                                                                       |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `price.price`          | The price to bill, by `prc_` ID. It must be active and offered in the order's currency.                                                                                                             |
| `price.quantity`       | How many units, for a recurring or one-time price with a `unit`, such as 25 seats. Leave it out for usage prices and flat fees. On a seat price that bills assigned seats, it's the minimum billed. |
| `price.quantityLimits` | `minimum` and `maximum` for this line's quantity, within the price's own limits, such as a deal capped at 50 seats.                                                                                 |
| `rateCard.rateCard`    | The rate card to bill, by its key. The line pins the version in effect at its start, and keeps it until a [migration](/catalog/rate-cards#versions) moves it to a later one.                        |
| `invoice`              | For a one-time price: `now` (the default) puts the charge on its own invoice straight away, and `nextInvoice` adds it to the next scheduled invoice.                                                |
| `name`                 | Your label for the line. Defaults to the price's or rate card's name. Your customer never sees it.                                                                                                  |
| `displayName`          | What your customer sees for this line on invoices and credit notes, up to 250 characters. When it's `null`, they use the price's or rate card's own label, then its name.                           |

Responses add each line's `id`, the `plan` it came from, `endedByAmendment` once an amendment ends it, and, for a one-time line, `charged` with the invoice it was charged on. Ended lines stay on the order, so it always shows the full history of what was billed. Orders created with the legacy API return their lines as `type: "legacy"`, with the pricing they were created with.

## Term and billing cycle

`startsAt` is when billing starts. It can be in the past: when you activate the order, usage from events already received since `startsAt` is billed, and the first invoice covers the periods that have passed. `endsAt` is exclusive, so an order for 2027 ends at `2028-01-01T00:00:00Z`. Leave it out for an order with no end.

`billingCycle` sets how often the order invoices:

| Field           | Values                                                                              |
| --------------- | ----------------------------------------------------------------------------------- |
| `interval`      | `month`.                                                                            |
| `intervalCount` | Months per invoice, 1 to 36. Defaults to 1; 3 is quarterly and 12 annual.           |
| `anchorDay`     | The day of the month each cycle starts, 1 to 31. Defaults to the day of `startsAt`. |

Usage prices and rate cards have no interval of their own, so they're invoiced once per cycle. A recurring price's interval must divide the cycle evenly or be a whole multiple of it: a monthly fee on an annual cycle is charged 12 times on each invoice, and an annual fee on a monthly cycle is charged on the invoice where each year starts. An interval that's neither, such as every 2 months on a quarterly cycle, can't go on the order.

`currency` defaults to the customer's currency, and every line's price or rate card must be offered in it.

## Invoice settings

| Field                 | What it's for                                                                                                                                                                                   |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `paymentTerms`        | When invoices are due: `dueOnReceipt`, `net15`, `net30` (the default), `net45`, `net60` or `net90`.                                                                                             |
| `invoiceSettings`     | `autoFinalize` to finalize invoices without review, `autoSend` to email them, and `sendPaymentReminders`. Each defaults to your account's setting.                                              |
| `purchaseOrderNumber` | Printed on every invoice.                                                                                                                                                                       |
| `billingContacts`     | The contacts who receive the invoices.                                                                                                                                                          |
| `billTo`              | The customer that receives and pays this order's invoices. Defaults, when the order is created, to the customer's [parent](/customers/customers#parent-customers), then to the customer itself. |

## Start from a plan

Send a `plan` instead of, or as well as, `lines` to copy a [plan's](/catalog/plans) lines onto the order. `quantities`, keyed by price, replaces the plan's default quantities:

```json
"plan": { "plan": "team_annual", "quantities": { "prc_5Tn8Rv": 25 } }
```

The response returns `plan` as the plan and the version the order was built from. To move a running order to another plan, use a `changePlan` [amendment](/orders-and-billing/amending-orders).

## Negotiated terms

Terms you negotiate are sent with the order, so they exist before the first invoice. They're created with the draft and take effect when it's activated:

* `negotiatedPricing`: up to 50 contracted prices, discounts and surcharges that apply to this order only. Each targets something the order bills. See [Introduction to pricing](/core-concepts/introduction-to-pricing#how-one-line-is-priced).
* `commits`: up to 10 spend commitments, either an invoiced minimum or a prepaid amount. See [Commits](/orders-and-billing/commits).

Halberd's 15% discount on the platform fee for the whole term:

```json
"negotiatedPricing": [
  {
    "key": "platform_discount",
    "type": "discount",
    "discount": { "type": "percentage", "percentage": { "percentOff": "15" } },
    "target": { "type": "price", "price": { "price": "prc_3Wq9Lb" } },
    "displayName": "Negotiated discount"
  }
]
```

An entry with no dates starts with the order and ends with it. Sending `commits` needs the `commits=v1` beta. To add terms to an order that's already active, send them with an [amendment](/orders-and-billing/amending-orders).

## The order lifecycle

| `status`     | Means                                          |
| ------------ | ---------------------------------------------- |
| `draft`      | Created and editable. Bills nothing.           |
| `activating` | Activation is waiting for billing to confirm.  |
| `active`     | Billing. It changes only through amendments.   |
| `paused`     | Invoicing is stopped. Usage is still recorded. |
| `ended`      | Past its `endsAt`.                             |

* **Activate.** [Activation](../api-reference/billing/orders/activate) fails unless the customer is active and every line's price or rate card is active and offered in the order's currency. An order that returns `activating` moves to `active` when billing confirms, or back to `draft` if activation fails.
* **Deactivate.** [Deactivate](../api-reference/billing/orders/deactivate) returns an active order to draft, to undo a mistaken activation. It's allowed only while `startsAt` is still in the future and no invoice has been issued.
* **Pause and resume.** [Pause](../api-reference/billing/orders/pause) stops invoicing without ending the order. Usage is still recorded, and is invoiced when you [resume](../api-reference/billing/orders/resume).
* **End.** An order ends at `endsAt` with no action from you. To end it early or extend it, [amend](/orders-and-billing/amending-orders) its term.

A customer can have several active orders, as long as they don't price the same usage over the same dates. Activating or amending an order whose lines would bill the same product, meter and workflow outcome as another of the customer's orders, over overlapping dates, fails with `meter_already_priced_for_customer`, so no usage is billed twice.

## How it bills

Halberd's order is on a monthly cycle from 1 January. Pages are priced on graduated tiers: \$0.40 a page for the first 10,000 pages a month, and \$0.25 a page after that. The platform fee is \$2,000.00 a month and each reviewer seat \$40.00 a month, both in advance. Halberd's lawyers review 14,200 pages in January. The invoice issued on 1 February carries January's pages in arrears and February's fees in advance:

| Step                                      | Value                                                             |
| ----------------------------------------- | ----------------------------------------------------------------- |
| Pages, first tier                         | 10,000 × \$0.40 = \$4,000.00                                      |
| Pages, second tier                        | (14,200 − 10,000) × \$0.25 = 4,200 × \$0.25 = \$1,050.00          |
| Contract review pages (2027 MSA), January | \$4,000.00 + \$1,050.00 = **\$5,050.00**                          |
| Platform fee, February                    | **\$2,000.00**                                                    |
| Reviewer seat, February                   | 25 × \$40.00 = **\$1,000.00**                                     |
| Invoice total                             | \$5,050.00 + \$2,000.00 + \$1,000.00 = **\$8,050.00**, before tax |
| Due                                       | Net 45: 45 days after 1 February, on 18 March 2027                |

The first line shows the order line's `displayName`. The other two have none, so they show their prices' labels. The PO number `PO-88213` is printed on the invoice. See [Invoices](/orders-and-billing/invoices) for everything else that can appear on one.

## Change or delete an order

On a draft, [update](../api-reference/billing/orders/update) any field. `lines` replaces the whole list.

Once the order is active, you can update its `name`, `externalId`, `billTo`, `paymentTerms`, `invoiceSettings`, `purchaseOrderNumber`, `billingContacts`, `metadata` and each line's `displayName`. A new label applies to invoices issued afterwards. Everything that changes what's billed, such as lines, quantities, prices, dates, the billing cycle or the currency, changes through an [amendment](/orders-and-billing/amending-orders).

[Delete](../api-reference/billing/orders/delete) a draft you no longer need. It's removed for good, and the commits created with it are archived. Only drafts can be deleted: an order that has billed stays on record.

## Related

* [Amend an order](/orders-and-billing/amending-orders)
* [Commits](/orders-and-billing/commits)
* [Seats](/orders-and-billing/seats)
* [Invoices](/orders-and-billing/invoices)
* [Orders API reference](../api-reference/billing/orders/create)