Open Saas Directory
Lago

Lago

★ 10,524744 forks744 contributorsUpdated 9/10/2026

Lago is an open-source metering and billing platform, and a self-hosted alternative to Stripe Billing and Chargebee. It ingests usage events, aggregates them into billable metrics, applies subscription and usage-based plans, and produces invoices — while payment execution stays with a processor like Stripe or GoCardless. Prepaid wallets, credits, coupons, add-ons, and taxes are built in, along with an API, SDKs, and webhooks.


Overview

Description

Lago is an open-source billing and metering platform, and a self-hosted alternative to Stripe Billing, Chargebee, and Recurly. It is the layer between product usage and the invoice: events are sent to Lago, aggregated into billable metrics (count, sum, max, unique, weighted sum), and priced through plans that can mix a subscription fee with usage charges, tiers, and packages. Lago handles proration, coupons, add-ons, prepaid wallets and credits, and tax, then issues invoices and fires webhooks; moving the money is delegated to a connected payment provider.

Features

  • Event metering: Ingest usage via API, and aggregate with count, sum, max, unique, and weighted-sum metrics.
  • Flexible pricing: Subscriptions, pay-as-you-go, tiered/volume/package pricing, and hybrid plans.
  • Wallets & credits: Prepaid balances, granted credits, coupons, and one-off add-ons.
  • Invoicing: Automatic invoice generation, proration, taxes, and dunning.
  • Payments: Connectors for Stripe, GoCardless, and Adyen for collection and reconciliation.
  • Developer surface: REST API, backend and frontend SDKs, and webhooks for every billing event.

Technology Stack

  • Ruby on Rails API
  • React / TypeScript frontend
  • PostgreSQL and Redis; optional ClickHouse for high-volume event storage
  • Docker Compose and a Helm chart for deployment

Requirements

  • Docker and Docker Compose (or Kubernetes)
  • PostgreSQL and Redis
  • ~2 GB RAM; an RSA key pair and app secret generated at setup

Learning resources

MohsenI built this — follow on X