{/* Plans aren't live until enforcement is on — hide this guide (404), matching
    the gated pricing page and the dashboard's billing UI. See `plansEnforced`. */}
{!plansEnforced && notFound()}

# Plans & billing

Every organization is on a plan. The **Plan & billing** page in the dashboard shows the plan you're
on, what it includes, how much of each metered dimension you've used, and — for admins — a one-click
way to upgrade or manage payment. Find it in the org sidebar under **plan & billing**.

## Your current plan

The top card shows your plan's name and status, and when it renews (or, if you've cancelled, when
access ends). Below it, **what's included** breaks down your plan into:

- **Features** — capabilities that are on or off (managed keys, temporary access, audit export, and
  so on).
- **Limits** — hard caps like applications, environments per app, or service tokens. `unlimited`
  means there's no cap.

> **Note:** Plans aren't enforced yet — every organization currently has full access regardless of its plan. The page shows what your plan **will** include once enforcement is turned on, so you can see where you stand ahead of time. Nothing you do today is blocked by a limit.

## Usage — the metered numbers

The **Usage** section shows each *metered* dimension as **used / included**, with a bar that turns
amber as you approach the included amount and red if you go over. Metered dimensions bill any usage
**beyond** what your plan includes as overage.

| Dimension | What the number counts |
| --- | --- |
| **Members** | Everyone in the organization right now. |
| **Monthly resolves** | Successful secret resolutions (`GET /v1/resolve`) so far this **calendar month**. This is the request every `seekrit run`, service token, proxy, and CI job makes to fetch its secrets — so it grows with how often your workloads start up, not how many secrets you store. |

`included` shows as **unlimited** when your plan sets no included cap on that dimension (you're
never billed overage for it). If a number reads **not available here**, that deployment doesn't have
usage metering wired up — treat it as unknown, not zero.

> **Note:** Monthly resolves are metered from sampled analytics, so the count is a close estimate under heavy traffic rather than an exact ledger — it's meant for understanding usage and billing, not reconciliation. Denied resolves and every *mutating* action are recorded exactly in the [audit log](/docs/guides/audit-export).

## Limits & usage on each page

You don't have to open this page to see where you stand. Each resource page shows its own
usage against your plan's cap, right next to the title — the **Applications** page shows
**3 / 3** when your plan includes three, **Members** shows seats used against what's
included, and the same goes for groups, service tokens, KMS keys, and lease targets. The
count turns amber as you approach the cap and red if you go over.

Once enforcement is on, plans also gate the dashboard directly:

- **Features your plan doesn't include** — managed keys, temporary access, or audit log
  page.
- **Create actions disable at a cap** — e.g. the **new application** button greys out once
  you've reached your plan's application limit, with a tooltip explaining why. Metered
  dimensions like members aren't blocked; usage beyond what's included simply bills as
  overage.

## Changing plans

Admins and owners see the **Change plan** section with a card per plan. Your current plan is marked
**current** and its button is disabled; every other plan shows **Choose plan**.

**Upgrading to a paid plan:**

1. Click **Choose plan** on the plan you want. You're taken to a secure Stripe checkout page.
2. Enter payment details and confirm. Payment is handled entirely by Stripe — seekrit never sees
   your card.
3. You're returned to the dashboard; your plan updates within a few moments.

**Switching to the Free plan (downgrading):**

Click **Choose plan** on **Free**. Because a downgrade can leave you over the new plan's limits, we
confirm first:

- If your current usage fits the plan, confirm and you're moved to Free right away — any paid
  subscription is cancelled.
- If you're **over the Free plan's limits** on something (for example, more members than Free
  includes), the dialog lists what's over and by how much before you confirm. Once plan limits are
  enforced, usage above the new plan's limits has to be brought back within them to fit.

Once you have a paid subscription, **Manage billing** (top-right of the current-plan card) opens the
Stripe billing portal, where you can update your card or download invoices.

> **Note:** Only organization **admins** and **owners** can change the plan or manage billing. Members see the plan and usage but not the controls. If a paid plan's **Choose plan** button is disabled, that plan isn't wired up for self-serve checkout on this deployment — reach out and we'll set it up.

## Promo codes

If you've been given a promo code, redeem it in the **Promo code** section at the bottom of the
billing page. A code moves your organization onto the plan it grants — Team or Enterprise — with no
card and no checkout.

1. Type the code and click **Redeem**. Casing, spaces, and dashes don't matter: `launch-2026` and
   `LAUNCH2026` are the same code.
2. Your plan updates immediately. The current-plan card then shows which code granted it, and the
   date it runs until.

Most codes run for a set period. When that period ends your organization returns to the **Free**
plan automatically — nothing is charged, and you're not moved onto a paid plan without asking. Any
secrets, apps, or members over the Free plan's limits stay exactly where they are; once plan limits
are enforced you'd need to bring usage back within Free's limits or pick a paid plan.

> **Note:** Only **admins** and **owners** can redeem a code. A code can be used once per organization, and can't be redeemed while you have an active paid subscription — cancel or manage that in the billing portal first. Every code that can't be redeemed reports the same message, so if you're sure the code is right, check with whoever gave it to you that it's still running.

Applying a *discount* to a paid plan works differently: enter that code in the **promotion code**
box on the Stripe checkout page itself, not here.

## From the CLI

The same view and the same actions, without opening the dashboard. Checkout and the
billing portal are browser flows, so those commands print a URL to open rather than
completing a payment in your terminal.

```bash
seekrit billing                # plan, status, usage, and what this deployment supports
seekrit billing entitlements   # every entitlement and where its value came from
seekrit billing checkout team  # prints a Stripe checkout URL
seekrit billing portal         # prints a billing-portal URL
seekrit billing cancel         # back to Free; asks first
```

Redeeming a promo code is dashboard-only — there's no CLI command for it.

## Grandfathering

When you subscribe, your plan is pinned to the exact version it was on. If seekrit later changes what
a plan includes, existing subscriptions keep the terms they signed up with until you choose to move
— so an upgrade never quietly changes the deal underneath you.
