Guide
Stripe SaaS Setup Guide
Configure Stripe for subscription billing in your SaaS. From account setup to production webhooks.
1
Create Stripe Account
Sign up for Stripe and complete verification.
- ✓Create account at stripe.com
- ✓Complete business verification
- ✓Enable test mode for development
- ✓Note your API keys (publishable and secret)
2
Configure Products and Prices
Set up your subscription plans in Stripe Dashboard.
- ✓Create a Product for your SaaS
- ✓Add Price objects for each tier
- ✓Configure billing intervals (monthly/annual)
- ✓Copy Price IDs for your config
3
Set Environment Variables
Add Stripe keys to your LaunchKit environment.
- ✓STRIPE_SECRET_KEY - Your secret API key
- ✓NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY - Public key
- ✓STRIPE_WEBHOOK_SECRET - Webhook signing secret
- ✓Add Price IDs to config.ts
4
Configure Webhooks
Set up webhook endpoints in Stripe Dashboard.
- ✓Add endpoint URL: yourdomain.com/api/webhook/stripe
- ✓Select events: checkout, subscription, invoice
- ✓Copy webhook signing secret
- ✓Test with Stripe CLI locally
5
Enable Customer Portal
Let customers manage their own subscriptions.
- ✓Enable Customer Portal in Stripe settings
- ✓Configure allowed actions
- ✓Set cancellation options
- ✓Add portal link to your dashboard
6
Test the Flow
Verify everything works in test mode.
- ✓Complete a test checkout
- ✓Verify webhook events are received
- ✓Test subscription updates
- ✓Test cancellation flow
Webhook Events to Handle
These events are already handled in LaunchKit.
checkout.session.completedCustomer completed checkoutcustomer.subscription.createdNew subscription startedcustomer.subscription.updatedSubscription changed (upgrade/downgrade)customer.subscription.deletedSubscription cancelledinvoice.payment_succeededPayment successfulinvoice.payment_failedPayment failed (trigger retry logic)With LaunchKit, This Is Already Done
All Stripe integration code is included. Just add your API keys and you're ready to accept payments.
✓Checkout session creation
✓Webhook handlers for all events
✓Customer portal integration
✓Subscription status sync
✓Payment failure handling
✓Pricing page component
Skip the Stripe Setup Work
LaunchKit includes complete Stripe integration. Just add your keys.
Get LaunchKit