Skip to content
Browse documentation

Reference

Pricing & billing

Billing is live. Free is self-serve and needs no card; Pro and Enterprise are purchasable monthly, yearly, or as a one-time lifetime license, all through secure Stripe checkout. A tier is an additive layer over RBAC/ABAC that clamps what a principal can do.

Tiers at a glance#

Every principal may carry a tier. When it does, the enforcement core clamps the principal to that tier’s retrieval planes, feature gates, document ceiling, and namespace quota. A principal with no tier (the seeded demo admins) is unlimited.

CapabilityFreeProEnterprise
Retrieval planestext, doc_visualall fourall four
Multimodal ingest (visual/audio)
Cross-encoder rerankgraceful clamp
Grounded cited answers
WORM audit read + verify
Control-plane admin
Document ceiling / namespace25,000unlimitedunlimited
Namespaces (companies)1unlimitedunlimited

Graceful degradation vs. hard gate

Search never hard-fails on tier: rerank and out-of-tier planes are silently clamped to what the tier allows, so a Free search still returns results. The hard 402 upgrade_required gates apply to /v1/answer, multimodal /v1/ingest, and the audit routes; 402 quota_exceeded guards the document ceiling and namespace count.

Plans & prices#

Yearly is priced at ~10 months (≈17% off) and the one-time “lifetime” license at ~30 months. Prices are in USD and are the single source of truth shared by the pricing page, the console upgrade page, and the API.

TierMonthlyYearlyLifetime (one-time)
Pro$80 / mo$800 / yr$2,400 once
Enterprise$500 / mo$5,000 / yr$15,000 once

The live catalog — including the Stripe publishable key and hosted payment-link URLs — is served publicly so every surface renders the same source of truth:

GET/v1/billing/plans
curl
curl -s "https://superchargedb.krisch1218.workers.dev/v1/billing/plans"
200 OK (abridged)
{
  "mode": "live",
  "configured": true,
  "publishable_key": "pk_live_...",
  "currency": "usd",
  "plans": [
    { "tier": "pro", "name": "Pro", "prices": [
      { "cadence": "monthly", "amount": 8000,   "interval": "month", "label": "$80 / mo",  "payment_link": "https://buy.stripe.com/..." },
      { "cadence": "yearly",  "amount": 80000,  "interval": "year",  "label": "$800 / yr", "payment_link": "https://buy.stripe.com/..." },
      { "cadence": "one_time","amount": 240000, "interval": null,    "label": "$2,400 once","payment_link": "https://buy.stripe.com/..." }
    ] },
    { "tier": "enterprise", "name": "Enterprise", "prices": [ /* $500 / $5,000 / $15,000 */ ] }
  ]
}

The upgrade flow#

From the console, the upgrade dialog and the /<namespace>/billing page read GET /v1/billing/plans and start a checkout. A signed-in principal creates a Stripe Checkout Session bound to their identity:

POST/v1/billing/checkout
curl
curl -s -X POST "https://superchargedb.krisch1218.workers.dev/v1/billing/checkout" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"tier":"pro","cadence":"monthly"}'
# -> { "url": "https://checkout.stripe.com/c/pay/...", "id": "cs_live_..." }

The returned url is the hosted Stripe Checkout page. On success Stripe redirects back to /<namespace>/billing?status=success; the session carries a client_reference_id so fulfillment can tie the payment back to the exact principal. The public payment links from GET /v1/billing/plans are an alternative that pre-fills attribution the same way.

Webhook fulfillment

Stripe calls the webhook sink after a successful payment. It is public and unauthenticated — security is the HMAC signature, which is verified first, before any body parsing:

POST/v1/billing/webhook
  • A missing / invalid Stripe-Signature is a clean 400 invalid_signature.
  • A missing endpoint secret is reported as 503 webhook_not_configured — a server misconfig, never a misleading signature error.
  • A verified event upgrades the principal’s tier and records the subscription; a transient fulfillment failure returns 500 so Stripe retries.

Operator configuration

Live fulfillment requires STRIPE_WEBHOOK_SECRET (and STRIPE_SECRET_KEY) set on the API Worker. To force the OpenAI answer fallback path, set OPENAI_API_KEY. These are account-owner secrets, not part of the repo.

Manage a subscription#

The current tier and subscription rows, plus a link into the Stripe billing portal:

RouteMethodPurpose
/v1/billing/subscriptionGETCurrent tier + subscription rows for the caller.
/v1/billing/portalPOSTOpen the Stripe customer portal (returns a URL); 404 if no customer.
/v1/billing/reconcilePOSTCron/ops re-sync of tiers from Stripe (guarded by a shared secret).
curl
curl -s "https://superchargedb.krisch1218.workers.dev/v1/billing/subscription" -H "Authorization: Bearer <token>"

Upgrade in the console

The console surfaces the same plans and drives checkout from the upgrade dialog.

Open the console