Skip to main content

Understand agency and subaccount billing

Agency billing adds a reseller layer above normal workspace billing. An agency can define client-facing packages and attribute subaccount usage, but those package records are not the same as Wirevox's own Stripe subscription tiers.

Agency packages​

Users with agency:plans can create Packages with:

  • a name;
  • draft or active status;
  • monthly or yearly interval;
  • USD price;
  • included credits; and
  • selected client-facing feature flags.

A package assigned to one or more subaccounts cannot be deleted. Package creation alone does not create a Stripe product unless the agency billing workflow provisions one.

Allocate credits​

Users with agency:billing can allocate a positive amount from the agency master workspace to a child subaccount. The operation:

  1. locks the agency balance;
  2. verifies included plus purchased credits cover the allocation;
  3. drains agency included credits first, then purchased credits;
  4. adds the amount to the subaccount's purchased-credit field; and
  5. writes paired allocation ledger entries.

Allocation is a transfer, not a refund. The interface does not currently provide a reverse-allocation control.

Current subaccount boundary​

The generic credit API currently presents subaccounts as Unlimited and bypasses the standard balance deduction path, while separate ledger attribution records subaccount call usage for agency reporting. Allocated purchased credits therefore do not operate as a hard runtime cap in the same way they do for a standard workspace.

Treat agency package allowances and subaccount allocations as reporting and commercial controls unless your deployment has an additional enforcement layer. Validate the intended reseller behavior before promising automatic cutoff at the package allowance.

Permissions​

PermissionScope
agency:billingAgency billing operations and credit allocation.
agency:plansCreate, update, and archive client packages.
subaccount:billingManage billing actions for an authorized subaccount.
subaccount:usageView authorized subaccount usage.

Workspace members without one of the accepted billing or usage permissions cannot read balances or usage through these routes.