Why Open-Source Billing Is Having a Moment
Stripe Billing works for 80% of SaaS companies. The other 20% hit its limits: usage-based pricing with custom metering, complex proration rules, multi-currency tax compliance, or simply the desire to avoid paying 0.5 to 0.8% of revenue to Stripe on top of payment processing fees.
Lago (10K+ GitHub stars) and Polar emerged as the leading open-source alternatives. They take different approaches: Lago is a full-featured billing engine for any SaaS company. Polar is purpose-built for developer tool companies. Both let you self-host, giving you full control over your billing data and logic.
This comparison helps you decide whether to stick with Stripe Billing, migrate to an open-source alternative, or use a combination. If you have already read our guide on implementing subscription billing, this adds the specific platform comparison layer.
Lago: The Open-Source Billing Engine
Overview
Lago is a self-hosted or cloud-hosted billing engine that handles subscription management, usage-based metering, invoicing, tax calculation, and payment collection. It sits between your application and payment processors (Stripe, Adyen, GoCardless), handling the billing logic while delegating payment collection.
Strengths
- Usage-based metering: Lago's event-based metering is its biggest differentiator. Send usage events via API, define aggregation rules (count, sum, max, unique count), and Lago calculates charges per billing period. Metering accuracy at scale is where most billing tools struggle, and Lago handles it well.
- Pricing flexibility: Supports flat-rate, per-unit, tiered, volume, graduated, and package pricing. Combine multiple pricing components on a single plan (base fee + per-seat + usage). This covers every SaaS pricing model we have encountered.
- Self-hosted option: Run Lago on your own infrastructure (Docker Compose or Kubernetes). Your billing data stays in your database. No vendor lock-in on your most sensitive financial data.
- Multi-currency and tax: Built-in multi-currency support with per-customer currency settings. Tax integration through native tax rules or external providers.
- Coupons and credits: Flexible coupon system with percentage and fixed-amount discounts, expiration dates, and redemption limits. Credit wallets for prepaid usage.
Weaknesses
- Self-hosting complexity: Running Lago yourself means maintaining PostgreSQL, Redis, and the Lago application. Database backups, upgrades, and monitoring are your responsibility. For billing infrastructure, the operational burden is significant.
- Payment collection: Lago generates invoices but relies on payment processors for collection. You still need Stripe (or an alternative) for actual payment processing. Lago does not replace Stripe; it replaces Stripe Billing.
- Smaller ecosystem: Fewer integrations and community resources than Stripe. Custom integration work may be needed for your specific stack.
Polar: Billing for Developer Tools
Overview
Polar started as an open-source funding platform and evolved into a billing platform specifically for developer tool companies. It handles subscriptions, one-time purchases, license key management, and usage-based billing with a focus on the developer tool sales workflow.
Strengths
- Developer tool focus: Built-in license key management, GitHub integration, and developer-centric checkout flows. If you sell developer tools, SDKs, or APIs, Polar understands your business model natively.
- Merchant of Record: Polar acts as the merchant of record for international sales, handling VAT, sales tax, and compliance across jurisdictions. You do not need to register for VAT in the EU or handle sales tax nexus in the US.
- GitHub integration: Tie product access to GitHub repositories. Manage customer entitlements through GitHub organizations. This is uniquely valuable for open-source companies with paid features.
- Simple pricing: Flat percentage fee (currently 5% on transactions) with no monthly minimums. Predictable cost structure for early-stage companies.
Weaknesses
- Narrow focus: Polar is purpose-built for developer tools. If you sell to non-developer audiences or your product is not a developer tool, Polar's features are not relevant.
- Less flexible metering: Usage-based billing support is functional but less sophisticated than Lago's event-based metering engine.
- Younger platform: Fewer years in production than Stripe or Lago. The platform is evolving quickly, which means frequent changes.
- Transaction fee: The 5% fee is higher than Stripe Billing's 0.5% (on top of payment processing). At scale, this cost difference is significant.
Stripe Billing: The Incumbent Default
Overview
Stripe Billing is the default choice for most SaaS companies. It is tightly integrated with Stripe Payments, handles subscription lifecycle management, invoicing, and basic usage-based billing through Stripe Meters.
Strengths
- Integration depth: Native integration with Stripe Payments, Stripe Tax, Stripe Identity, Stripe Connect, and every other Stripe product. If you use Stripe for payments, adding Billing is a natural extension with minimal additional integration work.
- Reliability: Stripe processes hundreds of billions of dollars annually. Their infrastructure, uptime, and payment processing reliability are industry-leading.
- Developer experience: Best-in-class API documentation, SDKs for every language, and a comprehensive test mode for development. The developer experience is why Stripe became the default.
- Customer portal: Pre-built customer portal for subscription management, payment method updates, and invoice viewing. Saves significant frontend development time.
- Stripe Meters: Usage-based billing through the Meters API. Send usage events, define aggregation, and Stripe calculates charges. Works for straightforward usage-based pricing.
Weaknesses
- Pricing model complexity limits: Stripe Billing handles per-seat, flat-rate, tiered, and usage-based pricing. But complex hybrid models (base fee + per-seat + usage tiers + overage + commitment credits) require workarounds or custom code on top of Stripe.
- Revenue share: 0.5% of billing volume (on top of payment processing fees) adds up at scale. At $10M ARR, that is $50K/year for Billing alone.
- Metering limitations: Stripe Meters work for basic usage tracking but lack the sophisticated aggregation and real-time metering capabilities of Lago.
- Vendor lock-in: Migrating away from Stripe Billing is painful because subscription state, customer data, and payment methods are all in Stripe's system.
Head-to-Head Comparison
Usage-Based Billing
Lago wins. Its event-based metering engine handles complex aggregation rules (count, sum, max, unique count, weighted sum) with high accuracy and real-time processing. Stripe Meters handle basic usage but struggle with complex multi-dimensional metering. Polar's usage support is functional but less sophisticated. For usage-based pricing, Lago is the strongest choice.
Tax Compliance
Polar wins for simplicity (merchant of record handles everything). Stripe wins for flexibility (Stripe Tax integrates natively and covers 40+ countries). Lago requires external tax integration (Stripe Tax or Avalara) but gives you more control over tax rules.
Self-Hosting
Lago wins. Full self-hosting with Docker or Kubernetes. Polar and Stripe are cloud-only. If data sovereignty or regulatory requirements mandate keeping billing data on your infrastructure, Lago is the only option.
Pricing at Scale ($5M ARR)
Lago self-hosted: infrastructure costs only ($500 to $2,000/month). Lago cloud: custom pricing. Stripe Billing: $25,000/year (0.5%). Polar: $250,000/year (5%). At scale, self-hosted Lago is the cheapest, and Polar is the most expensive.
Time to Integration
Stripe: Days (if you already use Stripe Payments). Polar: Days (if you sell developer tools). Lago cloud: 1 to 2 weeks. Lago self-hosted: 2 to 4 weeks (including infrastructure setup).
Migration Path
Lago provides Stripe migration tools that import your existing subscriptions, customers, and plans. Polar does not target Stripe migration. Migrating from Stripe Billing to Lago is the most common path and is well-documented. Migrating the other direction (Lago to Stripe) is also possible since Lago uses Stripe for payment processing.
Decision Framework
Stay on Stripe Billing When:
- Your pricing is straightforward (per-seat, flat-rate, simple tiered)
- You are under $5M ARR (the 0.5% fee is not significant enough to justify migration)
- You value the integrated Stripe ecosystem (Tax, Connect, Identity)
- Your team does not want to manage billing infrastructure
Choose Lago When:
- Usage-based billing is core to your pricing model
- You need complex hybrid pricing (base + seat + usage + commitment)
- You want to self-host billing data for compliance or cost reasons
- You are at scale ($5M+ ARR) and the Stripe Billing fee exceeds self-hosting costs
- You need multi-payment-gateway support (Stripe + Adyen + GoCardless)
Choose Polar When:
- You sell developer tools, SDKs, or APIs
- You need license key management
- You want merchant-of-record tax handling without complexity
- You are early-stage and value simplicity over cost optimization
- GitHub integration is important for your distribution model
The most common pattern we see: start with Stripe Billing, migrate to Lago when your pricing model outgrows Stripe's capabilities or when the revenue share exceeds self-hosting costs. For developers of open-source tools, Polar from day one is the fastest path to revenue.
Migration Tips and Getting Started
If you are migrating from Stripe Billing to Lago, here is the approach that works:
- Phase 1: Set up Lago (cloud or self-hosted) and replicate your current plans and pricing models. Test with internal accounts.
- Phase 2: Migrate existing customers in batches. Use Lago's Stripe import to bring over customer data, subscriptions, and payment methods. Keep Stripe as the payment processor.
- Phase 3: Switch new subscriptions to Lago. Existing subscriptions remain on Stripe Billing until their next renewal, then transition.
- Phase 4: Once all subscriptions are on Lago, disable Stripe Billing. Continue using Stripe for payment processing.
Budget 2 to 4 weeks for the migration, plus 1 to 2 months of running both systems in parallel to catch any discrepancies. The biggest risk in billing migration is not the technical work but ensuring no customer experiences a billing error during the transition.
If your billing needs have outgrown standard payment platforms, we can help evaluate and implement the right billing infrastructure. Book a free strategy call to discuss your billing platform needs.
Need help building this?
Our team has launched 50+ products for startups and ambitious brands. Let's talk about your project.