Skip to main content
Workspace Pro at $20 a month for each workspace, on the account’s invoice.
Sell plans to the workspaces, projects or users inside a customer: one workspace on Workspace Pro, another on the free tier, each with its own credits and allowances. Every entity plan is billed on the customer’s one Stripe invoice, so the account pays once while each workspace gets what its plan includes. An entity plan is an ordinary plan attached with an entityId. Create the entity first, then attach.

The catalog

Attach a plan to an entity

The customer holds Team; attach Workspace Pro to workspace ws-1 with entityId and an Idempotency-Key:
Response
status reads as for an add-on: applied once the prorated invoice is paid, pending_payment with a paymentUrl when the card needs the customer, processing while Stripe settles, and closed when it was never paid. A free entity plan answers applied at once, with itemChangeId: null. Get an entity lists its plans, each with planId, group, status (pending, active or canceling), startsAt and endsAt.

How it bills on the customer’s bill

  • One invoice. A paid entity plan is a prorated change on the customer’s Stripe bill of the plan’s interval. Entities on the same plan share one Stripe item, its quantity counting them: three workspaces on Workspace Pro are one line at quantity 3.
  • Prorated now, full at renewal. Attaching charges for the unused share of the period. The plan’s credits and allowances are prorated the same way, rounded down, then granted in full at each renewal of the customer’s bill.
  • Free entity plans change nothing in Stripe. They ride on the customer’s bill and are granted with each of its periods.
  • Upgrades. Upgrade with entityId to move one entity to a pricier plan in the same group: one prorated Stripe change, with the period kept. Other entities on the old plan stay on it.
  • The bill ends, the plans end. When the customer’s bill ends, every entity plan on it ends with it.

Own or pooled grants

Use own when each workspace buys its own capacity, and pooled when each workspace plan should raise what the whole account can use.

Spend order

With entityId, check, track and reservations spend:
  1. The entity’s own credits: its allowance and its plans’ own grants.
  2. The customer’s shared pool, in spend order, within the entity’s cap if it has one.
  3. Overage, at the customer’s plan’s rates.
For metered features, the entity’s own grants are spent first, then the customer’s. Booleans combine the customer’s plans with the entity’s: a boolean feature on an own Workspace Pro is on for requests with that entityId, and on a pooled one for every request.

Held limits by scope

A held limit follows the same split. An entity’s own plans and add-ons give a limit only that entity uses, and past it the entity draws on the shared limit, which the customer’s own plans and pooled entity plans give. With 10 projects on Team and 5 on an own Workspace Pro for ws-1, ws-1 can hold 5 projects of its own, then share the 10 with everyone else. The count Ledger keeps stays the customer’s total.

Rules

  • The customer’s bill comes first. A paid entity plan joins a paid bill of its interval (409 entity_plan_needs_paid_bill); a free one needs the customer to hold a plan (409 entity_plan_needs_bill).
  • One plan per group, per entity (409 subscription_exists). Change it with upgrade, passing entityId.
  • Entity plans recur. Attach a monthly or yearly plan (400 entity_plan_must_recur).
  • A Price of its own. An entity plan bills on a different Stripe Price from the customer’s own plan (409 entity_plan_shares_base_price).
  • Moves are upgrades. An entity’s plan moves by upgrade (409 downgrade_unavailable_for_item).
  • Overage stays the customer’s. Usage past what the entity holds bills at the customer’s plan’s overage terms.
  • The entity stays while its plan runs. Deleting an entity that holds a plan returns 409 entity_has_plan, so a delete never changes what the customer pays.
  • The entity exists first (404 entity_not_found).