Subaccount billing

View as Markdown

Subaccounts give each of your customers an isolated, separately-tracked environment under one organization. The organization holds the plan and pays the bill; subaccounts add per-customer budgets and usage attribution on top.

The model

  • The organization pays. One plan, one credit balance, and one Stripe relationship, all at the org level.
  • Subaccounts budget and attribute. Each subaccount carries its own limits, and metered usage is recorded against the subaccount that produced it.

Per-subaccount limits

Set limits when you create or update a subaccount:

LimitEffect
monthlyCreditLimitCaps the credits a subaccount may spend per cycle.
maxActiveRunsCaps how many runs can be active at once.
maxSpacesCaps how many spaces the subaccount can hold.
1await bctrl.subaccounts.update(subaccountId, {
2 limits: { monthlyCreditLimit: 50000, maxActiveRuns: 5 },
3});

Limits are an admission cap, not a hard kill. Once a subaccount reaches its limit, new billable work is denied, but work already in flight finishes. The cycle follows the organization’s billing cycle.

Attribution

Metered usage is tagged with the subaccount that generated it, so you can see and bill each customer’s consumption:

$bctrl subaccount usage --json
$bctrl subaccount usage <subaccountId> --json
1const perSubaccount = await bctrl.subaccounts.usage.list();

Browser, proxy, CAPTCHA, AI, and file usage all attribute to the subaccount whose run produced them. Work that runs directly at the org root - dashboard sessions, internal jobs - settles against the organization.

Next