Skip to navigation

Credit Billing

Customers on a credit model buy a balance up front, and every feature they use draws it down at its own rate. You price many features against one metric, customers prepay instead of waiting for an invoice, and they buy more when they run low.

Credit billing has two halves. The billing half decides how credits are granted, sold, and invoiced. The control half decides how a balance is spent, so a fleet of agents running in parallel cannot burn through it faster than anyone intended. Both halves read and write the same real-time credit ledger, so the balance a check enforces is the balance the customer sees.

Grant and sell credits

Control how credits are spent

  • Prevent Overspend is where to start when agents or parallel workers share a balance. It sizes each check before the work runs, reserves the credits, and caps the size and rate of spending.
  • Usage Controls caps how many credits a company or one user can spend per request, per hour, or per day.
  • Credit Leases and Reservations is the reference for holding credits while work is in flight, with every endpoint and SDK setting.

Account for credits

How a credit is spent

  1. A plan grant, bundle, top-up, or promotional grant adds credits to the company’s balance.
  2. Before an action runs, your server checks the feature with the action’s size. Schematic refuses the check when the balance or a usage control cannot cover it, and reserves the credits when it can.
  3. The action runs, and your server tracks what it actually used. The reservation settles at that amount, and anything unused returns to the balance.
  4. When the balance runs low, a top-up or a bundle refills it. At zero, the credit grant’s policy blocks usage or bills it in arrears.

Steps 2 and 3 are what keep the balance accurate when many actions run at once. A plain check followed by a track also works, one action at a time. See Prevent Overspend for why parallel work needs the reservation.