Skip to main content

Billing

The Billing admin view is an at-a-glance dashboard of plan distribution and active subscriptions. It does not manage individual Stripe subscriptions, refunds, or manual overrides — those actions are still performed inside the Stripe Dashboard. This page is a monitoring surface only, with deeper subscription and coupon tooling living on dedicated admin pages.

Where to find it

Admin sidebar → Billing (/billing).

Quick start

  1. Open Admin → Billing.
  2. Scan the four KPI cards at the top for total / free / pro / enterprise account counts.
  3. Read the Subscriptions card for a count of active Stripe subscriptions and a link reminder that Stripe Dashboard is the source of truth for details.
  4. For coupon work, jump to Coupons.
  5. For plan-level configuration, jump to Plans.

Detailed walkthrough

KPI grid

Four Card components show plan counts pulled from the admin accounts endpoint:

  • Total Accounts — every account in the system.
  • Free Accounts — accounts on the free plan slug.
  • Pro Accounts — accounts on the pro plan slug.
  • Enterprise Accounts — accounts on the enterprise plan slug.

The current page is a server component (page.tsx is async) and renders counts via a getPlanStats() helper. In the committed source, this helper returns placeholder zeros pending wire-up to the admin API — so the dashboard will show 0 everywhere until that work lands. The translations and layout are already final.

Subscriptions card

A single card titled Subscriptions shows:

  • "{count} active subscriptions" — a read-only count.
  • A static footnote: "Detailed subscription management is available in the Stripe Dashboard."

There are no buttons, no refund flow, and no manual subscription editing here.

Coming-soon banner

The translations include a comingSoon banner copy indicating a richer billing view is planned. In the shipped UI the banner is not currently rendered, but the copy lives in apps/admin/messages/\{en,de\}.json under billing.comingSoon.

Common scenarios

  • "How many paying customers do we have right now?" — read the Pro + Enterprise KPIs.
  • Refund / cancel a subscription — not possible here. Go to Stripe Dashboard.
  • Apply a manual coupon to an account — use Coupons to create the coupon, then apply it from the Stripe customer record.
  • Override a plan without Stripe — use Accounts → Plan Management and Limits. That change is independent of Stripe.

Permissions

ActionPermission
Open the billing pagebilling:read
(Future) edit billing recordsbilling:edit

Entry also requires admin:access. System admins have all of the above implicitly.

API

Billing analytics pull from the admin accounts listing rather than a dedicated endpoint. The page is a thin aggregation over GET /v1/admin/accounts.

UI actionGraphQLREST
Count accounts by planadminAccountsGET /v1/admin/accounts

For end-user billing actions (checkout, portal, cancel, invoices), see the non-admin billing REST endpoints in apps/api/src/routes/billing.rs:

  • POST /v1/billing/checkout
  • POST /v1/billing/portal
  • GET /v1/billing/status
  • POST /v1/billing/cancel
  • GET /v1/billing/invoices
  • GET /v1/billing/validate-coupon
  • POST /v1/webhooks/stripe

These are not admin-scoped — they act on the authenticated user's own subscription.

Tips & gotchas

  • KPIs read zero until the admin API client is wired in getPlanStats(). Don't treat the current numbers as accurate in the shipped build.
  • Stripe is the source of truth. Manual DB edits here will drift out of sync with Stripe webhooks.
  • There is no manual-override or refund UI today. If you need one, file an issue — there are currently no hidden admin flows for it.
  • Coupons — discount codes issued to Stripe
  • Subscriptions — per-account subscription overview
  • Plans — plan definition and feature grid
  • Accounts — per-account plan override (independent of Stripe)