cd /Users/davison/streamproject
npm run devServer will start at: http://localhost:3000
stripe listen --forward-to localhost:3000/api/webhooks/stripeImportant: Copy the webhook signing secret from the output and update .env.local:
STRIPE_WEBHOOK_SECRET=whsec_your_secret_here- Open the app: http://localhost:3000
- Sign in or create account (magic link)
- Go to Pricing: Click "View Pricing" in navigation
- Subscribe to Pro: Click "Subscribe to Pro" button
- Complete checkout:
- Card:
4242 4242 4242 4242 - Expiry:
12/34 - CVC:
123 - ZIP:
12345
- Card:
- Verify dashboard: Check your tier updated to "Pro Plan"
- Check billing details: Next billing date should be shown
- Click "Manage Subscription" in dashboard
- You'll see Stripe billing portal with:
- Payment method
- Billing history
- Cancel subscription option
- Update payment method
// Pro Tier
Product: prod_TInpYdKeQhvTPV
Monthly: price_1SMCEeQ1lUJh1eUJAUJZrAen ($14.99)
Yearly: price_1SMCEoQ1lUJh1eUJSiHkukna ($143.90, save $35.98)
// Enterprise Tier
Product: prod_TInpfSvMzJ8zv6
Monthly: price_1SMCEyQ1lUJh1eUJnEln6Hh8 ($99.99)
Yearly: price_1SMCF1Q1lUJh1eUJJfUWrm8U ($959.90, save $239.98)All stored in: /lib/stripe/config.ts
- Homepage: http://localhost:3000
- Pricing: http://localhost:3000/pricing
- Dashboard: http://localhost:3000/dashboard (requires login)
- Stripe Dashboard: https://dashboard.stripe.com/test/dashboard
- Stripe Events: https://dashboard.stripe.com/test/events
| Card Number | Result |
|---|---|
| 4242 4242 4242 4242 | Success |
| 4000 0000 0000 9995 | Declined |
| 4000 0000 0000 0341 | Attachment fails |
Always use:
- Expiry: Any future date (e.g., 12/34)
- CVC: Any 3 digits (e.g., 123)
- ZIP: Any 5 digits (e.g., 12345)
When you subscribe, you'll see these events in the Stripe CLI:
--> customer.created
--> customer.subscription.created ✅ (Database updated)
--> invoice.created
--> payment_intent.created
--> payment_intent.succeeded
--> invoice.payment_succeeded ✅ (Payment confirmed)
--> charge.succeeded
Look for [200] responses = Success!
ps aux | grep -E "next dev|stripe listen" | grep -v greptail -f /tmp/stripe-webhook.logpkill -f "next dev"
pkill -f "stripe listen"# Kill existing
pkill -f "next dev"
pkill -f "stripe listen"
# Start fresh
npm run dev &
sleep 3
stripe listen --forward-to localhost:3000/api/webhooks/stripeKey Files:
/lib/stripe/config.ts - Stripe configuration & price IDs
/app/api/stripe/checkout/route.ts - Checkout session creation
/app/api/webhooks/stripe/route.ts - Webhook handler
/app/pricing/page.tsx - Pricing page
/app/dashboard/page.tsx - Dashboard with subscription info
Documentation:
/PAYMENTS.md - Full payment system docs
/IMPLEMENTATION_SUMMARY.md - Complete implementation guide
/QUICK_START.md - This file
- Update
STRIPE_WEBHOOK_SECRETin.env.local - Restart Next.js dev server:
npm run dev
- Kill existing:
pkill -f "next dev" - Or use different port: Server will suggest one
- Check Stripe CLI shows
[200]responses - Verify
SUPABASE_SERVICE_ROLE_KEYis set - Check user is logged in before subscribing
- Full Documentation: See
/PAYMENTS.md - Implementation Details: See
/IMPLEMENTATION_SUMMARY.md - Stripe Docs: https://stripe.com/docs/billing/subscriptions
- Supabase Docs: https://supabase.com/docs
Last Updated: October 25, 2025