SaaS Payment Integration: Stripe, Subscriptions & Billing Guide
Why Stripe
Stripe handles:
- Payment processing — Cards, Apple Pay, Google Pay
- Subscription management
- Security & compliance — PCI, fraud detection, 3D Secure
2.9% + 30 cents per transaction.
Pricing Models
- Flat Rate — One price, all features (like Basecamp $99/mo)
- Tiered — Starter/Pro/Enterprise (like Slack)
- Usage-Based — Pay per use (like Twilio)
- Freemium — Free tier + paid (like Notion)
Start flat for your MVP.
Implementing the Checkout Flow
Stripe Checkout (hosted, recommended) — 10-20 lines of code.
Stripe Elements (custom UI) — More code, more control.
The flow:
- User clicks Subscribe
- Create Checkout Session (server-side)
- Redirect to Stripe
- Payment processed
- Redirect back to your app
- Webhook confirms the payment
The Subscription Lifecycle
Trial → Active → Past Due → Canceled
Each state requires different handling in your application.
Webhooks Explained
Key events to handle:
checkout.session.completedinvoice.paidinvoice.payment_failedcustomer.subscription.deleted
ALWAYS verify webhook signatures.
Handling Failed Payments
Dunning process:
- Day 0: Send email notification
- Day 3: Retry payment
- Day 7: Show in-app banner
- Day 14: Final notice / downgrade
Good dunning recovers 30-50% of failed payments.
Designing Your Pricing Page
- 2-3 plans max
- Highlight the recommended plan
- Show annual pricing with monthly option
- Scannable feature comparison
- Social proof
- FAQ section