Skip to navigation

Prices

A price sets what a product charges and how a quantity becomes money. A product can have several prices, such as a monthly platform fee and a per-token usage rate, and orders and plans put them on your customers. A price never changes once it’s created, so every invoice line can be traced to the exact rate that produced it.

Use a price to:

  • Charge for usage by pricing what a meter measures, per unit, per block such as a million tokens, or on tiers.
  • Charge a fixed fee every month, quarter or year, or per seat, with a recurring price.
  • Charge once for setup, onboarding or a credit top-up, with a one-time price.
  • Pass costs through at a markup, such as inference at cost plus 20%, with cost-plus pricing.

Prices are in the prices=v1 private beta: send Paid-Beta: prices=v1 with each request.

How a price works

  1. It belongs to a product. The product is what your customer buys. The price is one way it charges.
  2. Its type says when it charges. Usage in arrears, a fixed amount every interval, once, or a percentage of other charges.
  3. Its pricing says how a quantity becomes an amount. A flat rate per unit or block, graduated or volume tiers, or a markup on cost.
  4. An order puts it on a customer. The order decides the customer, the dates and the billing cycle, and keeps the price it was given until you amend it.
typeChargesInvoiced
usageWhat a meter measures, such as $3.75 per million tokens or 12¢ a pageIn arrears, every billing cycle
recurringA fixed amount every interval, such as a platform fee or a per-seat licenceIn advance by default
oneTimeA single charge, such as a setup fee or a credit top-upWhen it’s applied, by default on its own invoice
percentOfA percentage of other charges on the same order, such as premium support at 15% of spendOn each scheduled invoice

Each type has a matching object with its settings: a usage price has usage, a recurring price has recurring, and so on.

Create a price

Clausebase reviews contracts for law firms and charges per page, cheaper in bulk: 12¢ a page for the first 50,000 pages each month, 8¢ up to 200,000, and 5¢ above that. Its pages_reviewed meter sums the pages in each review.

Create a price on the product, with the meter it reads and its tiers. Amounts are in cents.

{
"product": "doc_review",
"name": "Pages reviewed",
"displayName": "Contract review",
"currency": "usd",
"type": "usage",
"usage": {
"meter": "pages_reviewed",
"pricing": {
"type": "graduated",
"graduated": {
"tiers": [
{ "upTo": "50000", "unitAmount": "12" },
{ "upTo": "200000", "unitAmount": "8" },
{ "upTo": null, "unitAmount": "5" }
]
}
}
}
}

The response shows the meter’s unit in usage.unit, so the price reads on its own: tier bounds are in pages. Orders refer to the price by its prc_ ID.

Amounts and currencies

Every price is in exactly one currency, such as usd, or one credit currency, such as support_credits. Only usage prices can be in a credit currency; see How credits work.

In aAmounts arePrecisionExample
currencydecimal strings in the currency’s minor unitsup to 15 decimal places for usage rates; whole minor units for recurring, one-time and seat prices"50" in usd is 50¢; "0.375" is 0.375¢
creditCurrencydecimal strings in that unitup to 15 decimal places"2" is 2 credits

flatAmount on a tier is the exception: a whole number of minor units. Don’t confuse any of these with a meter’s unit, which is what’s counted. A usage price’s per, tier bounds, includedQuantity and minimumQuantity are all in the meter’s unit.

To sell the same price in other currencies, add currencyOptions with the amounts in each. Tier bounds stay the same in every currency; only the amounts differ. An order uses the option in its own currency, and Paid never converts a price with an exchange rate. You can add currency options later, but not change or remove them. Prices in a credit currency and cost-plus prices take no currency options.

Pricing

Sub-cent precision is only for usage-based rates, including usage tier rates and flat amounts, and overage prices per credit. Recurring, one-time and seat prices require whole minor units, even when multiplied by a purchased quantity. For example, a USD fee can be "25" cents ($0.25), but cannot be "0.025" cents. Credit units per unit retain their existing precision.

Usage, recurring and one-time prices, and the rates on a rate card, say how a quantity becomes an amount in pricing:

typeHow it worksUsed by
perUnitA flat unitAmount for every per units. per defaults to "1"; set "1000000" to quote a rate per million tokens.Every price and rate
graduatedEach tier’s units are charged at that tier’s rate.Every price and rate
volumeThe whole quantity is charged at the rate of the tier it ends in.Every price and rate
costPlusWhat the metered events cost you, times a multiplier.Usage prices only

per is "1" on recurring, one-time and seat prices. For usage pricing, per only changes how a rate is written. { "unitAmount": "375", "per": "1000000" } and { "unitAmount": "0.000375" } are exactly the same rate, $3.75 per million.

Tiered pricing

Tiers have increasing upTo bounds, in the meter’s unit, and the last tier’s upTo is null. Each tier has a unitAmount and an optional flatAmount, charged once when the quantity reaches the tier. per applies to every tier.

On a usage price, tiers apply to the billing period’s total and reset each period. Set tierScope: "event" to apply them to each event’s quantity on its own instead, such as the first 30 minutes of every video at one rate and the rest at another:

"graduated": {
"tierScope": "event",
"tiers": [
{ "upTo": "30", "unitAmount": "15" },
{ "upTo": null, "unitAmount": "20" }
]
}

A 45-minute video is then 30 × 15¢ + 15 × 20¢ = 750¢. On recurring and one-time prices, tiers apply to the order line’s quantity, and tierScope doesn’t apply.

Cost-plus pricing

costPlus bills the cost lines on the events a meter reads, marked up. Litware passes the inference behind its support agent through at cost plus 20%:

POST /v1/prices
{
"product": "support_agent",
"name": "Model usage",
"currency": "usd",
"type": "usage",
"usage": {
"meter": "agent_turns",
"pricing": {
"type": "costPlus",
"costPlus": {
"multiply": "1.2",
"costTypes": ["inference"]
}
}
}
}
FieldWhat it does
multiplyWhat each unit of cost is billed at: "1.2" is cost plus 20%. Must be positive; below "1" passes cost through at a loss.
costTypesWhich cost types are billed: inference, compute, storage, thirdParty, human or other. All of them by default.
byCostTypeA different multiplier for some types, such as { "thirdParty": "1.05" }.

If Litware’s agent turns in November carry $412.50 of inference cost, the line is 41,250¢ × 1.2 = 49,500¢, or $495.00. Each cost type gets its own invoice line, so your customer sees the cost basis and the markup.

Cost-plus has a few rules of its own:

  • The meter must be an events meter without groupBy. Its quantity is shown on the invoice line for context and doesn’t change the amount.
  • It takes no per, tiers, includedQuantity or minimumQuantity, because the amount doesn’t come from a quantity.
  • A cost line in another currency is converted at the daily rate for the event’s timestamp.
  • It needs the event_costs=v1 beta as well as prices=v1, and can’t be used on a rate card.

Usage prices

A usage price names its meter, and for a workflow meter with several outcomes, the outcome it charges for. Two settings apply per billing period, in the meter’s unit:

FieldWhat it doesDefault
includedQuantityA quantity that isn’t charged, such as the first 1,000 replies."0"
minimumQuantityA floor that’s always billed, even if less is used.null

Usage is invoiced in arrears every billing cycle. A usage price has no interval of its own.

A meter with groupBy can’t be priced by a single price. Price each group with a rate card.

Recurring prices

A recurring price charges its pricing every interval (month or year) times intervalCount, independent of usage. "month" with intervalCount: 3 is quarterly; the longest interval is 3 years. timing is advance (the default), invoiced at the start of each interval, or arrears, at the end.

Without a unit, it’s a flat fee. Litware charges $500 a month for its platform:

POST /v1/prices
{
"product": "support_agent",
"name": "Platform fee",
"currency": "usd",
"type": "recurring",
"recurring": {
"interval": "month",
"pricing": { "type": "perUnit", "perUnit": { "unitAmount": "50000" } }
}
}

With a unit, such as "seat", the order line sets the quantity and the charge is per unit. quantityLimits sets the range that quantity must fall in, such as 5 to 200 seats; an order outside it is rejected, never adjusted.

How the interval fits the order’s billing cycle:

The interval isIt’s chargedExample
The same as the cycleOnce per invoiceA monthly fee on a monthly order
Shorter, and divides the cycleOnce per interval on every invoiceA monthly $500 fee on a yearly order shows as 12 × $500.00
Longer, and a multiple of the cycleOn its own schedule, on the invoice where each interval starts (advance) or ends (arrears)An annual fee on a monthly order appears once a year
NeitherThe order can’t use itEvery 2 months on a quarterly order

An order that starts or ends mid-interval is prorated by day.

A recurring price can also:

  • grant credits each interval with grants. See Credit grants.
  • be assigned to people with seats. See Seats.

One-time prices

A one-time price is charged once, when its order line is applied: at activation, or when an amendment adds it. It’s never prorated. By default it’s invoiced straight away on its own invoice; set the order line’s invoice to nextInvoice to add it to the next scheduled one instead.

feeType (setup, onboarding, implementation, migration or custom) labels it for invoices and reporting, and grants makes it a credit top-up.

With tierBasis: { "type": "term" }, tiers continue from the quantity of this price already bought on the order this term, plus any prices you list in term.alsoCount. Buying credits in pieces then costs the same as buying them at once.

Percent-of prices

A percent-of price charges percent of other charges on the same order, such as premium support at 15% of spend. percent can be above 100.

of sets the base:

of.typeThe base is
chargeTypesEvery line on the order of the listed types: recurring, usage, oneTime. The default is recurring only.
linesOnly the order lines for the prices you name. The order must have them.

The base is calculated after negotiated pricing, and before tax and invoice-level credits. It never includes other percent-of charges. The price adds one line to each of the order’s scheduled invoices.

minimum and maximum set a floor and a cap per billing period, in the price’s currency, prorated by day for a partial period. With 15% of recurring and usage charges, a $1,000 minimum and a $10,000 maximum:

MonthBase15%Charged
Quiet$500.00 fee + $4,200.00 usage = $4,700.00$705.00$1,000.00 (the minimum)
Busy$500.00 fee + $9,500.00 usage = $10,000.00$1,500.00$1,500.00

How it bills

In November, Halberd LLP sends Clausebase 64,000 pages to review. With the graduated price above:

StepValue
Meter quantity64,000 page
First tier, pages 1 to 50,00050,000 × 12¢ = 600,000¢
Second tier, pages 50,001 to 64,00014,000 × 8¢ = 112,000¢
Third tier0 pages
Charge600,000¢ + 112,000¢ = 712,000¢
Invoice lineContract review: $7,120.00

With volume pricing and the same tiers, 64,000 pages end in the second tier, so every page is charged at 8¢: 64,000 × 8¢ = 512,000¢, or $5,120.00.

Fractional rates are kept exact until the invoice line. At Trey Research’ $3.75 per million tokens (unitAmount: "375", per: "1000000"), 1,234,567 tokens cost 1,234,567 × 375 ÷ 1,000,000 = 462.962625¢, rounded half-up once to $4.63.

Change or retire a price

Update a price to change name, displayName, taxCode or metadata, or to add currencies to currencyOptions. name is the internal label for your team; displayName is what customers see, and invoices show name without it. A new label or taxCode applies to invoices issued afterwards.

To change a rate, create a new price and amend the orders that should use it. To give one customer a different rate without a new price, add negotiated pricing to their order. For many usage rates by dimension, such as one per model, use a rate card.

Archive a price to stop it being put on new orders. It stays readable and on its invoices, and running orders keep billing it. Archiving fails while an active plan lists the price.