Skip to main content
Resource-specific credit pools let you isolate credit balances, ledgers, and auto-recharge configurations for individual customer resources — such as workspaces, projects, or individual team members — within a single billing account. Without resource isolation, all credits for a customer are drawn from one shared pool. With resource-specific pools, each resource gets its own wallet that can only be funded and consumed independently.

How it works

When you provision a subscription and assign it to a specific resource by passing a resourceId, Stigg automatically creates an isolated credit pool for that resource. The resource pool operates as a fully independent wallet:
  • Dedicated credit grants — credits awarded or sold are locked to that resource and cannot be shared with other resources or the global pool.
  • Isolated credit ledger — every grant, consumption, and expiry is tracked separately, giving a precise audit trail per resource.
  • Independent credit pools — a low balance or depletion on one resource does not draw from or affect another resource’s pool.

Use cases

  • Per-workspace pools — in a B2B product where each customer has multiple workspaces, prevent one active workspace from draining the balance of all others.
  • Per-user pools — give each team member a dedicated credit quota (e.g., 1,000 credits/month each) that cannot be consumed by colleagues.
  • Per-API-key pools — enforce spending boundaries at the API key or integration level, not just at the account level.

Get started

Resource-level credit pools require no manual initialization. They are created automatically when you provision a subscription with a resourceId.

Provision a subscription with a resource

Pass the resourceId when provisioning a subscription:
const subscription = await stiggClient.provisionSubscription({
  customerId: 'customer-demo-01',
  planId: 'plan-basic',
  resourceId: 'workspace-example-com',
});
Once provisioned, Stigg automatically creates a resource-scoped credit pool for workspace-example-com.

Grant credits to a resource pool

Pass the resourceId when creating a credit grant:
await stiggClient.grantCredits({
  customerId: 'customer-demo-01',
  resourceId: 'workspace-example-com',
  creditTypeId: 'ai-tokens',
  amount: 5000,
});

Report usage against a resource pool

Pass the resourceId when reporting usage events so that deductions are made from the correct resource pool:
await stiggClient.reportUsage({
  customerId: 'customer-demo-01',
  resourceId: 'workspace-example-com',
  featureId: 'feature-ai-tokens',
  value: 150,
});

Viewing resource pools in the Stigg app

In the Customers page, open a customer and go to the Credits tab. The Resource ID dropdown at the top lets you switch between the global pool and each resource-specific pool. Selecting a resource scopes all views — usage overview, usage chart, and ledger — to that resource’s isolated wallet. The Subscription view for a resource-specific subscription also displays the dedicated credit pool history and auto-recharge status inline.

Auto-recharge

Auto-recharge is configured at the customer and credit currency level. A single auto-recharge policy covers all credit pools for that customer and currency, including resource-scoped pools. See Configuring auto-recharge for setup steps.
Resource-specific credit pools do not share credits with the global pool or with other resource pools under the same customer. A low balance on one resource will not draw from another resource’s pool.