Skip to content

Billing Plans

Derma Consent uses Stripe Connect for billing. Practices are Stripe connected accounts.

Subscription Plans

PlanDescription
FREE_TRIAL14-day full-feature trial for new practices
STARTERBasic plan for small practices
PROFESSIONALAdvanced features for growing practices
ENTERPRISEFull feature set for multi-location practices

Subscription Statuses

StatusDescription
TRIALINGWithin the free trial period
ACTIVESubscription is active and payments are current
PAST_DUEPayment failed — grace period before cancellation
CANCELLEDSubscription has been cancelled
EXPIREDTrial or subscription has expired

Subscription Lifecycle

Stripe Integration

Checkout Flow

  1. Admin clicks "Subscribe" in the billing page
  2. Frontend calls POST /api/billing/checkout with the selected plan
  3. Backend creates a Stripe Checkout session
  4. User completes payment on Stripe's hosted page
  5. Stripe webhook notifies the backend
  6. Subscription is activated

Customer Portal

Admins can manage their subscription (change plan, update payment method, cancel) via the Stripe Customer Portal:

  1. Frontend calls POST /api/billing/portal
  2. Backend returns a Stripe portal URL
  3. User is redirected to manage their subscription

Webhooks

The webhook handler at POST /api/billing/webhook processes:

  • checkout.session.completed — new subscription
  • invoice.paid — successful payment
  • invoice.payment_failed — failed payment
  • customer.subscription.updated — plan change
  • customer.subscription.deleted — cancellation

Configuration

Billing requires these environment variables:

VariableDescription
STRIPE_SECRET_KEYStripe secret API key
STRIPE_WEBHOOK_SECRETWebhook signing secret
STRIPE_PLATFORM_FEE_PERCENTPlatform fee (default: 5%)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYFrontend publishable key

Leave all Stripe variables empty to run without billing features.

DSGVO-konforme digitale Einwilligungen