Technical guide to implementing Stripe Billing: products, prices, subscriptions, webhooks, and the customer portal.
Stripe Billing handles recurring payments with automatic invoicing, proration, trials, and dunning. Implementation involves creating Products and Prices, managing Customer objects, handling subscription lifecycle webhooks, and building self-service portals for plan changes.
Understanding Stripe's object model is essential for proper implementation.
Products: What you sell
Prices: How you charge
Customers: Who pays
Subscriptions: The relationship
Invoices: The record
Subscriptions progress through various states. Your system must handle each transition.
Subscription statuses:
Key lifecycle events:
Webhook events to handle:
Build your system to be event-driven. Don't poll for subscription status—react to webhook events.
When customers change plans mid-cycle, proration calculates fair charges.
Proration scenarios:
Upgrade (immediate):
Downgrade:
Proration behaviors:
Implementation example: For a user upgrading from $10/mo to $50/mo halfway through the cycle:
Choose proration behavior based on your pricing model and customer expectations.
Payment failures are normal. Proper dunning recovers most failed payments.
Stripe's automatic retry schedule:
Smart Retries: Stripe's ML predicts optimal retry times based on:
Enable Smart Retries for better recovery rates.
Customer communication:
Your implementation should:
Revenue recovery best practices:
Stripe's Customer Portal provides self-service subscription management.
Portal capabilities:
Portal configuration:
Implementation:
Custom portal alternative: Build your own UI using Stripe API for:
Hybrid approach: Use Stripe Portal for payment method updates and invoice history. Build custom flows for plan changes where you want to add retention logic.
Operating in Europe adds requirements beyond basic Stripe Billing.
VAT handling with Stripe Tax:
Invoice requirements:
SCA for subscriptions:
SEPA as payment method:
Multi-currency:
Complete guide to PSD2 compliance: SCA requirements, exemptions, 3D Secure 2 implementation, and liability shifts.
Read articleBuilding reliable webhook handlers and reconciliation systems for payment data integrity.
Read articleDeep-dive into our complete library of implementation guides for payment solutions for europe - psd2, sca, stripe, mangopay.
View all Payment Solutions for Europe - PSD2, SCA, Stripe, MangoPay articlesShare your project details and we'll get back to you within 24 hours with a free consultation—no commitment required.
Boolean and Beyond
825/90, 13th Cross, 3rd Main
Mahalaxmi Layout, Bengaluru - 560086
590, Diwan Bahadur Rd
Near Savitha Hall, R.S. Puram
Coimbatore, Tamil Nadu 641002