Pro: 1,000 messages and 50 exports a month. Business: unlimited messages, 500 exports.Metered allowances give every action its own limit on every plan: 50 exports on Pro, 500 on Business, unlimited messages at the top. Ledger enforces each allowance on every request and resets it every period. A
metered feature has its own balance per customer: the plan’s item grants included units at the start of each period, each use spends from it, and what’s left ends with the period. Use it when your pricing page counts each action separately. When one balance should cover several actions at different prices, use credits instead.
The catalog
included units per period (0 or more), or makes the feature unlimited: true.
What check and track return
Check before the action, then track it once it succeeds. Sendquantity when one use is several units, such as an export of 3 files; it defaults to 1.
Response
balance.includedis what this period granted,usedwhat it has spent,remainingwhat’s left after any reservations, andresetsAtwhen the allowance ends.chargedQuantityis the units this track applied. Credit fields stay at 0: a metered use spends no credits (why).- When
quantityis more thanremaining,checkanswersallowed: falsewithreason: "limit_reached", andtrackis refused with409 limit_reachedand thebalance. Nothing is charged: a use is applied whole or not at all. - A feature the customer’s plan has no item for answers
feature_not_in_plan, and a customer with no planno_plan. Check and track has the order of refusals.
Durations and sizes
quantity is a whole number. To bill time or data, track it in a small whole unit and set the price per a larger one with overageBillingUnits.
Compute: 10 hours a month, then $0.40 an hour. **Storage transfer:** 50 GB a month, then $0.09 a GB.Track compute in seconds and transfer in megabytes.
overageBillingUnits: 3600 prices compute per hour, and overageBillingUnits: 1024 prices transfer per GB:
ceil(40,000 ÷ 3,600) = 12 hours, $4.80. Prices below a cent has the rule. For a job that runs for hours, reserve its expected seconds with the check and settle the real duration with the track.
Unlimited
An item withunlimited: true always allows the use and never debits anything. check answers unlimited: true, and the balance counts uses without a limit:
Response
Rules
- Each item takes
includedorunlimited: true. Metered features take nocreditCost, and unlimited items take no overage price. quantityis a whole number from 1 to 2,147,483,647 on a metered feature.- The allowance lasts one period. Unused units end when the period ends, and the next period grants
includedagain. On an annual plan the period is a month unlessresetIntervalisyear. - A feature keeps its type. To change type, create a new feature; changing
typeon an existing one returns409 feature_type_locked. - Items are part of the plan version. Changing
includedpublishes a new plan version; current subscribers keep their allowance. - One item per feature per plan. List each feature once in a plan.
- Grants and expiry. Balances explains when an allowance arrives and ends.
Related
- Overage: bill the units past
includedinstead of refusing them. - Pay as you go:
included: 0, every unit billed. - Credits: one shared balance across actions.
- Reservations: hold units before long-running work.