Appearance
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.phpunderplans. - Checkoutable plan keys are
hobbyandpro.
Subscribing
- Sign in to the dashboard at
/app. - Open Billing for your organization.
- 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. - 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 endpointssearch_count— search endpoint
Set limits with:
env
OPENBRAIN_USAGE_LIMIT_INGEST=10000
OPENBRAIN_USAGE_LIMIT_SEARCH=50000A 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
| Variable | Purpose |
|---|---|
STRIPE_KEY | Publishable key |
STRIPE_SECRET | Secret API key |
STRIPE_WEBHOOK_SECRET | Webhook signing secret |
STRIPE_PRICE_HOBBY | Hobby plan price ID |
STRIPE_PRICE_PRO | Pro plan price ID |
OPENBRAIN_BILLING_ENFORCED | Require active subscription for API |
OPENBRAIN_USAGE_LIMIT_INGEST | Monthly ingest cap (0 = off) |
OPENBRAIN_USAGE_LIMIT_SEARCH | Monthly search cap (0 = off) |