Files
api/services/billing
Roberto Musso 57b5648915 feat(billing): extract Billing Service (Step 4)
- stripe_service: checkout sessions, webhook handling, subscription CRUD
- tier_manager: feature matrix (4 tiers), quota enforcement, rate limits
- routes: checkout, webhook (no auth), subscription, tier query, features
- Traefik header auth (X-User-Id) replaces get_current_user dependency
- /tier/{user_id} endpoint for internal service-to-service lookups
- /features and /features/{tier} for feature matrix queries
- Dockerfile: single worker, 30s timeout (lightweight service)
2026-04-06 23:07:46 +02:00
..

Billing Service

Owns: Stripe integration, tier management, subscription CRUD.

Tables owned (write)

  • subscriptions

Endpoints

  • POST /billing/checkout
  • POST /billing/webhook (Stripe, no JWT auth)
  • GET /billing/subscription
  • DELETE /billing/subscription

Redis channels

  • Publish: tier:changed:{user_id} on tier change