Lago is an open-source metering and usage-based billing API designed for product-led companies that need to track consumption and generate invoices based on real-time usage data. Written primarily in Go, the platform provides a complete billing infrastructure that handles consumption tracking, subscription management, pricing iterations, payment orchestration, and revenue analytics. The repository is classified across multiple domains including scalable systems, real-time analytics, business intelligence, data processing, and API management, reflecting its role as a comprehensive billing platform.
The core functionality centers on real-time event ingestion and aggregation for any pricing dimension, allowing companies to bill for virtually any measurable metric. Lago supports multiple pricing models including usage-based, subscription-based, and hybrid approaches. The platform is payment-agnostic, integrating with major payment gateways like Stripe, Adyen, and GoCardless. Every feature is accessible through a REST API, making it suitable for programmatic integration into existing systems. The platform includes automated invoice generation, entitlements management for feature access control tied to billing plans, cash collection with dunning and retry logic, and revenue analytics providing visibility into MRR and usage trends.
Deployment flexibility is a key design principle. Users can self-host Lago using Docker and Docker Compose for complete data control, or use Lago Cloud for faster setup without infrastructure management. The self-hosted option supports advanced configurations including S3 and GCS storage, SMTP setup, SSL, and dedicated workers for high-volume scenarios. The platform is SOC 2 Type II certified and uses ClickHouse for data processing, as indicated by the repository topics.
The project maintains active development with a median issue and pull request response latency of 11.9 hours across 73 tracked items. The most prolific contributor tracked by GitGenius is jdenquin with 147 events, followed by vincent-pochet with 38 events and mathieu-lago with 16 events. The repository shows 16 stale issues and 10 GitHub-related issues as the most active labels, with 3 enhancement issues tracked. The codebase overlaps with contributors from other significant projects including Vitess, LiteLLM, and ComfyUI, suggesting cross-pollination with other infrastructure and data processing communities.
Lago provides SDKs for multiple languages including Node.js, Python, Ruby, and Go, along with a complete OpenAPI specification. The platform includes white-label capabilities through Lago Embedded for platforms and marketplaces, AI-powered billing intelligence, and integrations with enterprise systems like NetSuite, Xero, Salesforce, HubSpot, and Avalara. The repository is distributed under the AGPLv3 license and is backed by Y Combinator. The project maintains comprehensive documentation covering getting started, API reference, billing templates reproducing pricing models from companies like Algolia and OpenAI, development environment setup, architecture details, and monitoring with Prometheus metrics.