Billing

Billing runs on Stripe (server/api/stripe/*), and supports two independent subscription scopes:

  • Personal — a single user subscribes for themselves.
  • Team — an organization subscribes once, shared by every member (see the "Team billing" section on the Team page).

Required environment variables

STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRICE_ID_PRO_MONTHLY=
STRIPE_PRICE_ID_PRO_ANNUAL=   # optional — enables the annual toggle on /pricing

Register your webhook endpoint for: checkout.session.completed, customer.subscription.updated, customer.subscription.deleted, and invoice.payment_failed.

Usage-based limits

Each plan (server/utils/plans.ts) has a monthly API-call limit. Requests authenticated with an API key are metered and rejected with 429 once a plan's limit is hit — see Public API.

Referrals

Every user gets a shareable referral link. When someone they refer subscribes, the referee gets 20% off their first payment and the referrer gets a $10 account credit (server/utils/referrals.ts).