# Billing & plans

> Plans, what counts as an active developer, what happens at a limit, and paying through Stripe.

## Plans

| Plan | Price | Active developers | Repositories |
|---|---|---|---|
| Free | $0 | 5 per month | 3 |
| Team | $12 per active developer / month | unlimited | unlimited |
| Business | $24 per active developer / month | unlimited | unlimited |
| Enterprise | from $40 per active developer / month | unlimited, or custom limits by agreement | unlimited, or custom |

Plans differ in their limits and price; agent support is the same on every plan. Enterprise is arranged with sales (**Contact sales** in the dashboard).

## Active developers

An **active developer** is a member whose agents used Comity in the current calendar month (UTC). A member counts once their personal token is used for any of:

- a hook evaluation (any agent event in a repo with Comity hooks),
- an MCP tool call,
- a coordination write through the API (creating or changing intents, conflicts, messages, conversations, questions, team context or scope checks).

Only members with the role **owner**, **admin** or **member** count. **Viewers**, **billing contacts** and **service tokens** (CI, bots) are never counted. The count resets on the 1st of each month at 00:00 UTC.

See the count in the dashboard under **Settings → Plan & usage** (with a per-developer table: first seen, last seen, agent calls), on the **Team** tab, or with `comity status`:

```text
  Plan:    free · 4/5 active developer(s) in 2026-10 · 2/3 repo(s)
```

`GET /v1/usage` returns the same data (scope `members:read`; the per-developer list is included for owners and admins).

## What happens at a limit

Comity never stops an agent because of a plan limit; coordination is switched off for whoever is over it.

**Developer limit.** Developers are admitted in the order they first appear in the month. On Free, the first 5 are coordinated. The 6th and later developers that month:

- get hooks that always allow, with a one-time notice per agent session explaining the limit,
- get a `plan_limit` error (HTTP 402) from MCP tools.

Owners and admins see a `Comity plan limit:` line in their agents' briefings, and `comity status` lists who is not coordinated. Upgrading lifts the cap immediately.

**Repository limit.** Free covers 3 non-archived repos. A repo beyond the limit is not registered: hooks in it allow with a one-time notice, `POST /v1/repos` returns `402 plan_limit`, and the GitHub App skips it. Archive a repo or upgrade to add more.

```json
{
  "type": "urn:comity:problem:plan_limit",
  "title": "Plan limit reached",
  "status": 402,
  "detail": "…"
}
```

## Upgrade, change or cancel

Owners and billing contacts manage billing in **Settings → Plan & usage**:

- **Upgrade to Team / Business** opens Stripe Checkout. After paying you return to the dashboard and the plan applies at once.
- **Manage billing** opens the Stripe Customer Portal: payment method, invoices, cancellation (at period end).

Billing is metered: each month's invoice charges the number of active developers that month, in arrears. Subscriptions are anchored to the 1st of the month (UTC), so a billing period equals a usage month. Promotion codes can be entered at checkout. There is no free trial; the Free plan is free indefinitely within its limits.

If a payment fails, owners and billing contacts get an email and the subscription status shows **Payment past due**; the paid plan stays in effect while Stripe retries. When a subscription ends (canceled, unpaid, expired or paused), the org returns to Free.

API (owner or billing role):

| Request | Result |
|---|---|
| `GET /v1/billing` | `{enabled, plan, can_manage, has_customer, subscription: {plan, status, current_period_end, cancel_at_period_end}}` (owner, admin, billing) |
| `POST /v1/billing/checkout` `{"plan": "team"}` | `{url}` of a Stripe Checkout session |
| `POST /v1/billing/portal` | `{url}` of a Stripe Customer Portal session |

Errors: `409 already_subscribed`, `409 no_customer` (portal before any subscription), `409 enterprise_plan`, `502 billing_provider_error`, `503 billing_unavailable`.

## Roles

| Role | Counts as a developer | Billing |
|---|---|---|
| owner | yes | manage |
| admin | yes | view |
| member | yes | – |
| viewer | no | – |
| billing | no | manage |
