The four billing modes
Plans carry an
interval (none, month, or year) that sets the access period a purchase grants, and three money fields:
basePriceUsd: what a subscription purchase charges; a whole-cent amount.includedCreditUsd: the usage credit asubscription_usagepurchase grants; up to 6 decimals.minimumPurchaseUsd: the smallest credit purchase a buyer may make; whole cents, default $0.01.
Plan meter prices
A plan meter price attaches a price to one meter on one plan, with one price per meter per plan:priceUsd: the price, up to 6 decimal places.unitSize: how many unitspriceUsdbuys (default 1).priceUsd: "0.002"withunitSize: 1000reads “$0.002 per 1,000 units”.includedUnits: free units per billing period beforepriceUsdapplies (default 0).defaultMaxQuantity: an optional per-request ceiling, applied when a request declares neither aquantitynor amaxQuantityfor the meter. Without a default, such an item is deniedmeter_not_priced.
priceUsd ÷ unitSize, rounded to six decimal places.
A worked example
Acme prices theoutput_tokens meter of its product-watch service on a credit plan at $0.002 per 1,000 tokens:
remainingCreditUsd. A request that declares no token count up front is gated and authorized at the 8,192-token default ceiling (at most $0.016384). It settles at the actual count, and the remainder returns to the buyer. Charge up to a maximum covers ceiling billing from the seller’s side.
If the price also carried includedUnits: 100000, the buyer’s first 100,000 tokens each period would be free, and priceUsd would apply only beyond them.
Two precision rules
- Money that settles on-chain is whole cents. Buyer-chosen amounts (credit purchases and top-ups) must be whole-cent values of at least
minimumPurchaseUsd, andbasePriceUsdis whole cents. Because ZeroClick charges a pay-as-you-go rate call by call, a payg plan’spriceUsdmust itself be a whole-cent amount. The API rejects anything else with422 payg_price_not_whole_cents(see errors). - Catalog prices carry 6 decimals. Prices on credit and subscription plans only burn prepaid allowance, so they keep full 6-decimal precision: sub-cent rates like
0.000250are normal there.
unitSize is how pay-as-you-go expresses sub-cent rates within the whole-cent rule: the credit-plan rate above becomes priceUsd: "2.00" with unitSize: 1000000 on payg. That is the same $0.002 per 1,000 tokens, stated as a whole-cent price per million.
Managing plans
ZeroClick sets up plans and prices with you during onboarding; you manage them afterward in the dashboard or with the REST API. Agents always read live prices from the storefront’smanifest.json, so a price change takes effect on their next call.