Introduction to pricing
Paid turns usage into money, starting from input events and ending with financial documents. On the way, it answers a series of separate questions: what happened, how much of it counts, what that costs at list price, and what one customer agreed to pay instead, their negotiated pricing. Different people own each answer, and each changes for different reasons. Your engineers decide which events to send and how to measure them, your pricing team sets list prices, and sales and finance negotiate order terms. Paid keeps each answer in its own layer, so you can change one without rewriting the others.
Configuration is organised in layers where each layer reads only the layer below. For example, rate cards read only meters, never the events behind them. A layer can’t see what is built on top of it, so a meter never knows a price and a list price never knows an order’s terms.
Your customer’s order sits at the top layer, pinning the complete commercial terms they agreed to. Orders both snapshot the configuration from the layers below and refer by version to them.
Because an order pins what it bills, changing a layer below leaves running orders as they are. To move an order onto new terms, you change the order itself with an amendment. A migration makes an amendment for each of many orders at once and provides a convenient way to roll a new list price out to existing customers, while you decide for each order how its negotiated pricing carries over.
Understand pricing to:
- Explain any invoice line, from the events behind it to the net amount, step by step.
- Stack an order’s negotiated pricing on your list prices and know exactly how it combines.
- Plan a change knowing who must decide what before it reaches your customers.
This page describes the API in preview. Rate cards (rate_cards=v1), migrations (migrations=v1) and orders (orders=v1) are internal betas, and their shapes can still change.
Six layers, one question each
Rate cards price usage slice by slice, and prices charge a single rate or a fee, such as a monthly platform fee. A rate card changes through numbered versions. A price never changes: to change one, you create a new price and amend the orders that should use it.
A rate card holds rates. Each rate names what it prices explicitly, narrowing step by step: the meter, then one of its measures, then the slice of its dimensions.
When several rates match the same usage, the most specific one wins, and a rate with no match catches everything the others leave. A rate card version names the exact version of each meter it prices, one version per meter.
What an order holds
- Lines, each pinning a price or one version of a rate card.
- Negotiated pricing: a list of entries, each with its own
startsAtandendsAt, that change how the order’s lines are priced.
Every amendment is kept in the order’s history, which is never rewritten, so every past invoice can be explained.
How one line is priced
Paid prices a line in two steps. First, the list amount: the quantity priced by the winning rate, with your rate card’s modifiers applied. Modifiers apply to every customer, such as half price for batch requests. Then the order’s negotiated pricing, in a fixed order:
A relative entry scales with whatever it applies to. An absolute entry states an amount. The difference matters when list prices change, as Migrations shows.
Two rules keep this predictable:
- At most one entry of each kind applies to a line. When two entries of the same kind both match, the one with the more specific target wins: a rate or a price before a whole rate card, and a rate card before a product. Paid rejects two entries that are equally specific, so the order in which you list entries never matters.
- Every step is its own line on the invoice, against the list amount, unless the entry sets
reportAs: "price". Then its result simply becomes the line’s price. Paid keeps the running amount exact and rounds once per line, so the steps always add up to the net.
Commits and percent-of fees read the net amount, after negotiated pricing and before tax.
Example
In January, Northwind Traders sends 2,000,000,000 large-model input tokens. Its order has three negotiated pricing entries: a contracted price of $2.50 per million on large_input, 10% off the whole rate card, and $100.00 off each month.
The invoice shows the $6,000.00 list amount and each of the three steps, so Northwind can see what its negotiated pricing is worth.
How a change travels
Orders pin what they bill, so a change at any layer reaches running orders only through an amendment. What you decide before it does depends on which layer you change.
Each path starts where you make the change and ends at the order. The diagram leaves out blocked orders and invoice timing, which Migrations covers.
Migrations
A migration moves existing orders from earlier versions to a later one. You choose its orders (a list of orders, every order of some customers, or every order on a version, minus exclusions) and its timing, and Paid shows the plan for each order before you commit.
The plan asks you to decide every negotiated pricing entry, keep or drop. You can set one choice for an entry key across all orders, and override it for single orders. Whether keep is possible follows from the entry’s kind:
- A relative entry (a percentage discount or a surcharge) can be kept on every rate that replaces its rate, because it follows whatever the list price becomes.
- An absolute entry (a contracted price or an amount discount) can be kept only when exactly one rate replaces its rate. Across a split, it can only be dropped, because copying one amount onto several rates would change what was agreed.
An entry that targets a whole rate card or product follows the card, rates added by the new version included. The plan lists the rates it would newly cover, and what keeping it is worth, so you choose knowing the effect.
For example, Trey Research publishes version 2, in which large_standard_input and large_reasoning_input both replace large_input. For Northwind, the plan offers only drop for the contracted price, because its rate split in two. It offers keep for the 10% discount, which then covers both new rates.
A move can also be blocked when the order can’t change at the requested time, for example partway through a billing period whose tiers span the whole period. The plan says why and which timings would work. You choose one of those timings or exclude the order. A mid-period move is billed on the next scheduled invoice by default, so your customer gets no extra invoice.
Every change has the same lifecycle
Rate card versions, migrations and amendments are all changes, and every change follows the same steps:
After commit, a change’s status follows from its dates: scheduled, then in effect. Nothing that has taken effect is ever undone. To go back, you make a later change, such as a new version with the earlier prices.
Some questions about a draft are worth asking but take real work, such as a backtest: what the draft would have charged in past billing periods, next to what was billed. You create one on purpose, and its results are stored, so reading them never computes again. A backtest is marked stale once the draft changes.