Skip to content

Billing & Plans

Levelcast offers four plans. Limits are enforced both in the API (402 LIMIT_REACHED) and in the UI (cards, alerts and the PremiumUpsellModal).

Plans at a glance

FeatureFreeProClinicFounder
Price0€1,99€/mo or 19,90€/yr29€ + 2€/patient—
Patients420∞ (pay per use)∞
Rules5505050
Actions per rule3333
Screens (Frames)2∞∞∞
Shared Links2∞∞∞
API Keys1∞∞∞
Organizations – create0 (join ∞)∞∞∞
Retention∞∞∞∞
SupportCommunityPrioritySLA + DPA—

Free can join unlimited organizations but cannot create them. Clinic includes 20 seats, then +2€ per extra patient per month.

How enforcement works

Every POST /api/v1/* checks canCreate* from billingService.ts:

const check = await canCreatePatient(userId)
if (!check.allowed) return 402 { code: 'LIMIT_REACHED', limit, used, plan }

Frontend mirrors with billingStore.limits (normalized from null → Infinity) and shows ApiStatCard + Alert + PremiumUpsellModal instead of toasts.

Rule execution logs

GET /api/v1/rules/:id/logs shows executions from the last 30 days, or the latest 2000 records when there is nothing recent. Old rows are kept; only reads are scoped. Each rule supports up to 3 actions (MAX_ACTIONS_PER_RULE), executed in executionOrder.

Stripe

  • Checkout via POST /api/v1/billing/checkout (plan: pro|clinic, interval: month|year, seats for clinic).
  • Mock checkout when STRIPE_SECRET_KEY=dummy → instant trialing upgrade (used in CI and local dev).
  • Customer portal: POST /api/v1/billing/portal → stripe.billingPortal.sessions.create.
  • Webhooks: invoice.payment_failed → past_due, customer.subscription.deleted → downgrade to free (founder stays founder). customer.subscription.updated/created syncs status and currentPeriodEnd.
  • Cancel: POST /api/v1/billing/cancel → cancel_at_period_end if Stripe, otherwise immediate downgrade.

Invoices

GET /api/v1/billing/invoices proxies stripe.invoices.list({ customer, limit: 10 }) and maps {id, number, status, amount_due, hosted_invoice_url, invoice_pdf, created}. Shown in Billing → Historial de facturas.

Referrals

  • Code via GET /api/v1/billing/referral (referralCode).
  • Claim via POST /api/v1/billing/referral/claim { code }.
  • Reward: 2 months Pro for both sides on first paid conversion, max 10/year, anti-abuse on email/IP.

Grandfather (Founder)

Users with user.createdAt < 2026-08-21 are founder (PLAN_LIMITS.founder = 50 rules, rest ∞ + isGrandfathered). Shown as FOUNDER in the sidebar (AppSidebar.vue:40).