Lago is an open-source metering and billing engine replacing Stripe Billing with self-hosted usage tracking and decoupled payment gateway orchestration.
Stripe Billing bundles recurring subscriptions directly into its proprietary processing ecosystem, locking usage calculations to its hosted ledger and fee schedules. Lago decouples event metering and rating logic from payment rails, giving developers a self-hosted engine to manage consumption models on their own servers. This architecture lets teams route transactions through any payment gateway while keeping customer usage data internal.
Stripe Billing handles standard recurring tiers cleanly, but engineering workflows strain once pricing depends on high-volume consumption. Ingesting millions of telemetry events or compute minutes into Stripe creates tight coupling with proprietary rate limits and rigid charge intervals. Lago shifts that metering workflow into your own stack. Services push raw consumption events into Lago through an API or client SDKs, where an internal aggregation engine computes billable units across dimensions like sum, maximum, or unique counts. Once invoices finalize, Lago orchestrates payment collection through Stripe, Adyen, or GoCardless, treating the processor as a settlement endpoint rather than the owner of your pricing logic.
The trade-off centers on operational responsibility versus architectural autonomy. Stripe operates as a closed cloud that absorbs gateway failures and collects processing cuts on every invoice. Lago requires running a Go backend with PostgreSQL and Redis, meaning ops leads must maintain infrastructure reliability, backups, and queue capacity during usage spikes. Decoupling billing logic from payment processing avoids vendor lock-in and eliminates revenue-share fees as transaction volume expands. For teams also evaluating Merchant of Record providers like Paddle or 2Checkout, Lago offers a different model: it provides no sales tax remittance or legal merchant entity, leaving tax automation and merchant accounts in your hands.
Can Lago replace Stripe completely? Lago replaces Stripe Billing and subscription logic, but you still need Stripe, Adyen, or another gateway to process credit card transactions.
Is Lago free for commercial use? The core self-hosted platform is free without per-seat or transaction fees, though features like white-label customer portals require enterprise licensing.
How does Lago handle usage-based billing events? Applications send events to Lago via REST API or SDKs, where they match defined billable metrics and aggregate before invoice generation.
Lago is an excellent fit for engineering teams that need programmable, high-volume metering without tying pricing models to a single processor; it is less suited for companies wanting an all-in-one Merchant of Record to handle global tax liabilities. Its Go codebase remains actively maintained, and its AGPL-3.0 license ensures your billing engine and metering logic remain under your operational control.
Go, gRPC and Protobuf done right, LLM agents in production, and the hard parts of shipping a first product.
Show that Lago is listed as an open-source alternative. Paste into your README: