Logo
Deploy Now

Stars

10,372

Forks

722

Watchers

52

Developer links

Lago

Trusted by Mistral AI, PayPal, Groq, and Synthesia with over 10,300 GitHub stars and Y Combinator backing, Lago is the open-source billing engine that handles usage-based, subscription-based, and hybrid pricing models through a single API-first platform — replacing the need to build custom billing logic or depend on opaque SaaS pricing infrastructure. Real-time event ingestion via ClickHouse processes billable events with deduplication and multiple aggregation methods including count, sum, unique count, max, and weighted sum, while graduated pricing tiers, package-based billing, and percentage-based fees model any pricing strategy from simple subscriptions to complex marketplace commission structures. Automated invoice generation calculates charges according to configurable billing cycles with grace periods, proration for mid-cycle changes, and credit note issuance for refunds and adjustments. Prepaid credits enable pay-in-advance models where customers purchase credit blocks and draw down as usage accumulates, while entitlements tie feature access directly to billing plans for automated provisioning and de-provisioning. Payment orchestration integrates natively with Stripe, Adyen, and GoCardless with automatic retry logic, dunning workflows for failed payments, and multi-gateway routing. Revenue analytics provide cross-stream visibility into MRR, usage trends, churn, and revenue drivers through dedicated API endpoints. The customer portal embeds into your application for self-service invoice access and usage monitoring. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. AGPL-3.0 licensed.

Lago
Lago
Lago
Lago
Lago

Benefits

  • Real-Time Usage Event Ingestion
  • ClickHouse-backed event processing ingests millions of billable events with automatic deduplication and flexible aggregation methods — count, sum, unique count, max, and weighted sum for any pricing dimension.
  • Payment-Agnostic Gateway Orchestration
  • Native integration with Stripe, Adyen, and GoCardless with automatic retry logic, dunning workflows, and multi-gateway routing eliminates payment processor lock-in across all billing models.
  • Flexible Hybrid Pricing Models
  • Combine subscriptions, usage-based charges, graduated tiers, package pricing, percentage fees, prepaid credits, and one-time add-ons within a single customer plan without custom development.
  • API-First Complete Billing Stack
  • Every feature accessible via REST API enables programmatic plan creation, subscription management, event ingestion, invoice retrieval, and revenue analytics integration with any application stack.

Features

  • Automated Invoice Generation
  • Configurable billing cycles with proration, grace periods, credit notes, customizable templates, and email delivery generate compliant invoices without manual intervention.
  • Prepaid Credits System
  • Customers purchase credit blocks upfront and draw down as usage accumulates, with configurable expiration, top-up thresholds, and real-time balance visibility through the API.
  • Entitlements Management
  • Tie feature access directly to billing plans for automated provisioning and de-provisioning when subscriptions change, upgrade, downgrade, or expire.
  • Revenue Analytics Dashboard
  • Cross-stream visibility into MRR, ARR, usage trends, churn metrics, and revenue drivers through the web interface and dedicated API endpoints for custom reporting.
  • Embeddable Customer Portal
  • White-label portal integrates into your application providing customers self-service access to invoices, usage data, payment methods, and subscription management.