Files
Kordant/web/.env.example
Michael Freno 40a9ef146c feat(billing): add subscription and Stripe billing router
- Add stripeCustomerId column to users table
- Create Stripe client initialization (web/src/server/stripe.ts)
- Add billing service with getOrCreateCustomer, checkout/portal sessions,
  subscription management, invoice listing, and webhook event handling
- Create billing tRPC router with getSubscription, createCheckoutSession,
  createPortalSession, cancelSubscription, reactivateSubscription, listInvoices
- Add raw webhook endpoint at /api/stripe/webhook with signature verification
- Define Valibot schemas for all billing procedure inputs
- Wire billing router into root tRPC router
- Update schema tests for new column/index counts
- Write unit tests for billing service and router
2026-05-25 16:07:00 -04:00

9 lines
310 B
Plaintext

DATABASE_URL="postgresql://postgres:postgres@localhost:5432/shieldai"
# Stripe (get test keys from https://dashboard.stripe.com/test/apikeys)
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
STRIPE_PRICE_BASIC="price_basic"
STRIPE_PRICE_PLUS="price_plus"
STRIPE_PRICE_PREMIUM="price_premium"