SaaS Integration Fresh
A complete guide to building a SaaS business on Stripe Billing.
Integration components
| Component | Description | Code required? |
|---|---|---|
| Product modeling | Create products and configure pricing models | No (Dashboard) |
| Entitlements | Control feature access based on subscription | Yes |
| Pricing table | Embeddable UI for plan selection | No |
| Free trials | Trial periods before first charge | No |
| Discounts | Coupons and promotion codes | No |
| Customer portal | Self-serve subscription management | No |
| Invoices | Subscription and one-off invoices | No |
| Tax | Automatic sales tax / VAT / GST | No |
| Webhooks | React to subscription events | Yes |
| Revenue recovery | Smart Retries + dunning emails | No |
| Revenue recognition | Automated accrual accounting | No |
| Testing | Test clocks and simulation | No |
Product modeling
Stripe supports these SaaS pricing structures:
- Flat rate (good-better-best tiers)
- Per-seat
- Usage-based
- Tiered (volume or graduated)
- Multiple products in one subscription
- Multiple prices per product
Create products in Dashboard → Product catalog. Add prices with the desired billing interval and model.
Entitlements
Use entitlements to provision feature access without querying the full subscription chain.
- Create features that represent functionality you offer
- Associate features with products via ProductFeatures
- Subscribe customers — Stripe automatically creates active entitlements
- Check
active_entitlementsat access time to decide what to enable
Listen for entitlements.active_entitlement_summary.updated to react to subscription changes in real time.
Pricing table
Embed a pricing table to show your plans and convert visitors to subscribers. Customers choose a plan and go directly to Stripe Checkout. Manage everything from the Dashboard.
Free trials
Offer trials via Checkout with subscription_data.trial_period_days. Optionally require no payment method during trial and collect it before trial ends.
Set email reminders (Dashboard → Settings → Billing → Emails) so customers provide payment info before the trial ends.
Customer portal
Enable the customer portal so customers can self-serve:
- Update subscription (upgrade, downgrade)
- Cancel subscription
- Add or update payment method
- Update billing and shipping info
- Review invoice history
Configure in Dashboard → Settings → Billing → Customer portal.
Monitor subscription activity
Set up webhook endpoints to listen for events:
| Event | Action |
|---|---|
customer.subscription.created | Provision access |
customer.subscription.updated | Update feature access |
customer.subscription.deleted | Revoke access |
customer.subscription.trial_will_end | Send trial-ending reminder |
invoice.payment_succeeded | Confirm renewal, send receipt |
invoice.payment_failed | Alert customer, trigger recovery |
entitlements.active_entitlement_summary.updated | Sync feature access |
Revenue recovery
Enable Smart Retries and dunning emails in Dashboard → Settings → Billing. No code required. Stripe automatically retries failed payments at optimal times and notifies customers of issues.
Tax
Enable Stripe Tax in Dashboard. After you register to collect taxes in a jurisdiction, Stripe automatically calculates and collects the correct tax amount at checkout.
Stripe Tax supports: US sales tax, EU VAT, UK VAT, AU GST, and more.
Testing
Use test clocks to simulate subscription lifecycle events without waiting for real time:
- Advance time to trigger renewals, trials ending, dunning
- Test upgrade/downgrade flows
- Verify webhook handling
Create test clocks in Dashboard → Testing → Test clocks.
Revenue recognition
Use Stripe Revenue Recognition to automate accrual accounting. Revenue is recognized when earned, not when collected — important for annual subscriptions, prepaid plans, and refunds.
Enable and configure in Dashboard → Revenue recognition.