Skip to content

Billing and usage

OpenBrain bills organizations (not individual users) via Laravel Cashier and Stripe.

Plans

  • Configure Stripe Price IDs in .env (STRIPE_PRICE_HOBBY, STRIPE_PRICE_PRO).
  • Plan copy and marketing labels live in config/openbrain.php under plans.
  • Checkoutable plan keys are hobby and pro.

Subscribing

  1. Sign in to the dashboard at /app.
  2. Open Billing for your organization.
  3. Owners can start Subscribe to Hobby or Subscribe to Pro (Stripe Checkout with ?plan=hobby|pro), or Manage subscription (Stripe Customer Portal) after they have a Stripe customer.
  4. In the Customer Portal, enable both Hobby and Pro products so customers can switch plans.

API access

When OPENBRAIN_BILLING_ENFORCED=true and Stripe is configured, the memory API returns 402 Payment Required for organizations without an active subscription or trial.

Local development typically leaves enforcement off and omits STRIPE_SECRET.

Usage metering

Per-organization counters are stored monthly (organization_usage):

  • ingest_count — ingest, upsert, and batch endpoints
  • search_count — search endpoint

Set limits with:

env
OPENBRAIN_USAGE_LIMIT_INGEST=10000
OPENBRAIN_USAGE_LIMIT_SEARCH=50000

A limit of 0 disables quota enforcement for that metric.

Webhooks

Cashier registers POST /stripe/webhook. Set STRIPE_WEBHOOK_SECRET and forward events from Stripe (or stripe listen locally).

Environment

VariablePurpose
STRIPE_KEYPublishable key
STRIPE_SECRETSecret API key
STRIPE_WEBHOOK_SECRETWebhook signing secret
STRIPE_PRICE_HOBBYHobby plan price ID
STRIPE_PRICE_PROPro plan price ID
OPENBRAIN_BILLING_ENFORCEDRequire active subscription for API
OPENBRAIN_USAGE_LIMIT_INGESTMonthly ingest cap (0 = off)
OPENBRAIN_USAGE_LIMIT_SEARCHMonthly search cap (0 = off)