Skip to main content
Team: $20 a seat a month. Each member gets 500 AI credits a month, and the team shares 2,000 more.
Ledger bills each seat and gives every member their own monthly credits, with a shared team pool behind them. A plan’s monthlyCredits is the team’s pool; to give each member their own credits, combine a seat price with an entity per member that has an allowanceCredits. Ledger bills the seats; your app adds and removes the entities as members come and go.

The catalog

The per-member 500 lives on each entity, as its allowanceCredits.

The calls

A member joins: add a seat, then give them an entity. A track with no quantity adds one. Changing entities needs a key with billing:write.
A member uses AI: pass their entityId to check and track. Their 500 go first, then the team’s shared 2,000.
A member leaves: remove the seat with quantity: -1, and delete the entity.
Reconcile on a schedule: track the seats with count set to your member count, and compare listEntities with your members.

Rules

  • Your app keeps seats and entities in step. Ledger bills the seat count and grants each entity’s allowance; it creates, deletes and counts entities when you call it. If your app adds a seat and fails before upsertEntity, retry upsertEntity to grant the member’s allowance.
  • Every member gets the full allowance. A member added on day 28 gets all 500 credits for that period, while their seat is prorated by Stripe. Deleting an entity ends its unspent allowance at once.
  • Allowances follow the plan. Entity allowances are granted for the customer’s plan period, while the customer has a plan, and reset with it.
  • Allowances and caps apply to credits features. On metered, held and boolean features, entityId labels the use, and an entity plan adds its own items.
  • Spending without entityId draws on the shared pool and leaves members’ allowances untouched.
  • The seat price pays for the allowance. Allowances are credits on top of the plan, with no invoice line of their own.
  • Per-seat pricing: seat prices, proration and invoices.
  • Entities: allowances, caps and how entities spend.
  • Limits: count and reconciling a held count.