Add Stripe subscription billing integration

- Add stripe_customer_id and stripe_subscription_id fields to User model
- Add Stripe config settings (secret key, publishable key, price ID, webhook secret)
- Create billing API endpoints: checkout session, webhook handler, portal, status
- Add frontend Billing page with upgrade/manage subscription UI
- Add billing route and Pro nav link
- Add stripe dependency to requirements
This commit is contained in:
root
2026-03-30 21:38:40 -05:00
parent 58c17498be
commit b97955d004
7 changed files with 360 additions and 1 deletions

View File

@@ -22,6 +22,12 @@ class Settings(BaseSettings):
# Claude API
ANTHROPIC_API_KEY: str = ""
# Stripe
STRIPE_SECRET_KEY: str = ""
STRIPE_PUBLISHABLE_KEY: str = ""
STRIPE_PRICE_ID: str = ""
STRIPE_WEBHOOK_SECRET: str = ""
# Frontend
FRONTEND_URL: str = "http://localhost:5173"