link,[object Object]
Skip to content

Stripe Setup ​

Purpose: Configure Stripe for subscriptions, payments, and Connect. Audience: Developer, Owner Prerequisites: Stripe account and keys (redacted).

Keys

  • Publishable (client): VITE_STRIPE_PUBLISHABLE_KEY
  • Secret (server): STRIPE_SECRET_KEY (Edge Functions env only)
  • Webhook secret: STRIPE_WEBHOOK_SECRET (Edge Functions env only)

Webhooks

  • Handler: supabase/functions/stripe-webhook/index.ts
  • Events to enable (typical):
    • checkout.session.completed
    • customer.subscription.*
    • account.updated
    • payment_intent.succeeded/failed

Test cards

  • 4242 4242 4242 4242 — generic success
  • 4000 0000 0000 9995 — requires authentication
  • 4000 0000 0000 0341 — insufficient funds

Subscription pricing

  • Plans: Starter $19/month, Pro $49/month.
  • Price IDs are managed in Stripe and referenced by Edge Functions (see supabase/functions/get-price-id/index.ts).

Client usage

  • Load Stripe: see src/pages/Deal.tsx:35 and src/pages/DealNew.tsx:19 (VITE_STRIPE_PUBLISHABLE_KEY).

Redaction

  • Never commit secret keys; use placeholders in docs.

Notification System

  • Authentication notifications: Immediate on login only if subscription is truly expired and there is subscription_end in the past (new users don't receive toast)
  • Periodic notifications: Every 60 minutes with 55-minute deduplication, only when there is a previous expired period
  • Manual sync: No notifications, only sync confirmation
  • See docs/features/stripe-integration.md for detailed notification logic

Next steps

  • See docs/features/subscriptions.md for plan features and billing.
  • See docs/features/transactions.md for deal payments and payouts.
  • See docs/features/stripe-integration.md for complete integration details.