Formulaic pricing
A pricing formula is any charge your pricing page writes as arithmetic: tokens × a rate per model × 0.5 for batch, or pages × a rate per document type, plus 10% for support. In Paid you don’t write the formula as code. You split it into parts, and each part is set on the Paid object built for it: a meter measures the quantity, a rate card chooses the rate, modifiers multiply it, and prices add fees on top. Your events carry facts, never amounts, so changing the formula is configuration, not a deploy.
Use this page to:
- Map a formula onto Paid, part by part, with the five parts of a formula.
- Find the pattern for a formula you already charge, in common formulas.
- See a formula billed from events to the invoice line, in the worked example.
- Know what to do when a formula doesn’t fit.
The objects on this page are in private beta: send Paid-Beta with meters=v1, prices=v1 and rate_cards=v1, as each object’s page describes.
The five parts of a formula
Every formula Paid bills splits into the same five parts, applied in this order:
Read a formula left to right and give each term to its part. Trey Research’ token pricing is:
Paid keeps every step exact and rounds once, half-up, to the currency’s minor unit on each invoice line. A formula’s result never drifts from its arithmetic because of rounding along the way.
Common formulas
Build a formula
Clausebase reviews contracts for law firms. Instead of one tiered rate per page, it charges by document type, with a premium for rush jobs and a priority support fee on top:
Each review sends one review.completed event with pages, documentType and turnaround in its payload. Amounts on rates are decimal strings in cents. The percent-of minimum is Money: an integer in cents with its currency.
API
Dashboard
Create a meter that sums the pages and splits them by the two dimensions the formula reads:
Set up a rate card, review_rates, with a rate per document type, a fallback for every other type, and the rush premium. The rate card API is in preview; Rate cards explains how a rate card’s versions, rates and modifiers price a meter.
A rush modifier multiplies the rate by 1.5 when payload.turnaround is rush.
Create a price for priority support at 10% of the order’s usage charges, with a $500.00 monthly minimum:
Put the rate card and the price on Halberd LLP’s order. The formula now runs on every review.completed event Clausebase sends.
How it bills
In November, Clausebase reviews 41,000 pages for Halberd LLP:
The invoice shows a sub-line for each document type and turnaround, with the rush modifier itemised under the MSA rush line, so Halberd can check every term of the formula. In a quiet month with $3,000.00 of reviews, 10% is $300.00 and the support line is the $500.00 minimum.
To change a rate in the formula for every customer, publish a new rate card version and migrate the orders that should use it. To change it for Halberd alone, add negotiated pricing to its order.
Put the formula in the quantity
When a formula combines several fields before applying a rate, compute that combination in the meter, not the price. The price then charges one rate for one quantity, and the invoice still reads as quantity × rate.
A workflow meter combines values with composite (add, min or max), and scales each with divideBy and round. Litware bills support effort as one unit, where 1,000 output tokens or 10 minutes of human review each count as one:
A ticket with 4,200 output tokens and 25 review minutes counts as 4.2 + 2.5 = 6.7, rounded to 7 effort units. A usage price on the meter then charges a single rate per effort unit.
A minimum per request
volume tiers charge the whole quantity at the rate of the tier it ends in, and a tier’s flatAmount is charged when the quantity ends in that tier. With tierScope: "event", both apply to each event on its own. Together they charge the larger of a minimum and the metered amount, per request.
Trey Research charges $5.00 per million tokens on its embeddings API, and at least 1¢ a request. At 500¢ per million, 2,000 tokens cost exactly 1¢, so that’s where the first tier ends:
tierScope is set on a usage price or on each rate of a rate card, so the same tiers work for one rate per meter or for a rate per dimension.
Formulas that don’t fit directly
Usage that a formula can’t rate is never billed at a guessed amount. A meter counts invalid values in health.invalidValues24h, so a gap in a formula shows up before an invoice is issued.