Stripe Integration Overview
Complete guide to integrating Stripe for payments, subscriptions, and billing
Stripe Integration
BetterCone includes deep Stripe integration through the Better Auth Stripe plugin, providing complete payment processing, subscription management, and billing automation.
Stripe is already integrated via Better Auth. This guide shows you how to configure products, webhooks, and advanced features.
What You'll Learn
This guide covers everything you need to integrate Stripe into your SaaS application:
Initial Setup
Get your Stripe keys and configure the integration
Products & Pricing
Create subscription plans and one-time products
Checkout Flow
Implement payment and subscription checkout
Webhooks
Handle Stripe events and keep data in sync
Billing & Invoices
Manage subscriptions, invoices, and customer portal
Features
- Payment Processing: Accept credit cards, digital wallets, and local payment methods
- Subscription Management: Recurring billing with plans, trials, and usage-based pricing
- Customer Portal: Self-service subscription and billing management
- Webhooks: Real-time event notifications
- Invoicing: Automatic invoice generation and delivery
- Tax Collection: Stripe Tax for automatic tax calculation
- Failed Payment Recovery: Smart retry logic and dunning management
Architecture
┌─────────────────────────────────────┐
│ Client (Next.js) │
├─────────────────────────────────────┤
│ authClient.stripe.createCheckout() │
│ authClient.stripe.createPortal() │
└──────────────┬──────────────────────┘
│
│ HTTPS
│
┌──────────────▼──────────────────────┐
│ Stripe API │
├─────────────────────────────────────┤
│ • Checkout Sessions │
│ • Subscriptions │
│ • Invoices │
│ • Customer Portal │
└──────────────┬──────────────────────┘
│
│ Webhooks
│
┌──────────────▼──────────────────────┐
│ Your Application │
├─────────────────────────────────────┤
│ /api/webhooks/stripe │
│ Convex Database │
└─────────────────────────────────────┘Quick Links
Next Steps
Start with Initial Setup to configure your Stripe integration.