Add multi-plan subscriptions, quotas, and token usage APIs
CI / test (pull_request) Successful in 10s
Unit Tests / test (pull_request) Successful in 10s

Implements #16/#17/#36: Founders/Standard/Pro/Business/Backer catalog,
Backer email whitelist, prompt-window + token-period gates, and
tokens_in/out on conversation/prompt + subscription usage APIs.
This commit is contained in:
2026-07-31 06:21:54 -05:00
parent 67f16565e9
commit a6c45b0882
23 changed files with 1580 additions and 36 deletions
+5 -3
View File
@@ -44,13 +44,15 @@ OAUTH_CALLBACK_BASE_URL=http://127.0.0.1:8001
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
STRIPE_WEBHOOK_SECRET=
# Optional: pre-created Stripe Price ID. When empty, Checkout uses
# SUBSCRIPTION_PRICE_* from settings.py ($10 USD / month by default).
# Optional: pre-created Stripe Price ID for Founders. When empty, Checkout uses
# SubscriptionPlan.price_cents / SUBSCRIPTION_PRICE_* ($10 USD / month Founders).
STRIPE_PRICE_ID=
# SUBSCRIPTION_PRICE_AMOUNT_CENTS=1000
# SUBSCRIPTION_PRICE_CURRENCY=usd
# SUBSCRIPTION_PRICE_INTERVAL=month
# SUBSCRIPTION_PRODUCT_NAME=Chat Subscription
# SUBSCRIPTION_PRODUCT_NAME=Founders
# Enforce plan feature + prompt/token quotas on chat turns (default true).
# ENFORCE_SUBSCRIPTION_GATES=true
FRONTEND_BASE_URL=http://localhost:3000
# STRIPE_CHECKOUT_SUCCESS_URL=http://localhost:3000/billing/success?session_id={CHECKOUT_SESSION_ID}
# STRIPE_CHECKOUT_CANCEL_URL=http://localhost:3000/billing/cancel