What is Lago and what does its open-source billing infrastructure do?

Updated

Lago is an open-source billing platform for usage-based, subscription, and hybrid pricing. It meters consumption (including AI tokens), turns that usage into invoices, and manages subscriptions, credits, and revenue reporting. It fits teams that need transparent, controllable billing they can inspect and extend rather than a closed black box — from fast-growing AI scaleups to global enterprises.

What Lago actually does

Lago sits between your product's usage data and your finance workflow. The core loop is: meter usage → price it → invoice it → report on it.

The platform covers several connected jobs:

  • Usage metering — tracks consumption events and aggregates them into billable quantities.
  • Billing & invoicing — converts metered usage and subscriptions into invoices.
  • Subscription management — handles recurring and hybrid (subscription + usage) plans.
  • Credits and prepaid balances — applies customer credit against amounts due.
  • Revenue reporting — builds reports such as MRR breakdowns on top of billing data.

How AI token metering works

The clearest example on the site is AI token billing. Lago meters input, output, and cached tokens separately, because each is priced differently.

In the illustrated example, 1.19M tokens are metered and broken down by token type and by model:

Token type Units Amount Model split
Input tokens 654.00K $654.00 GPT-4.1 50%, Sonnet 4 30%, Gemini Flash 20%
Output tokens 236.00K $708.00 GPT-4.1 40%, Sonnet 4 35%, Gemini Flash 25%
Cached tokens 295.00K $73.75 GPT-4.1 60%, Sonnet 4 25%, Gemini Flash 15%

A second example shows the full path from usage to money: 1.2M tokens metered, a spend alert triggered at $1,500, and $500 in prepaid credits applied to a $1,560 invoice — leaving $1,060 due. That sequence (meter → alert → apply credits → invoice) is the practical value: engineering gets granular usage data, and finance gets a clear line from consumption to revenue.

From usage to revenue reporting

Billing data is only useful if it feeds decisions. Lago's reporting layer builds on the same metered data. A shown example turns a request for "the MRR for the past quarter, segmented per customer" into a revenue chart and report, with a quarterly MRR figure of $500,100.00 and a breakout of New, Expansion, and Lost MRR across months.

This matters for teams that want one system to answer both "how much did this customer consume?" and "how is our recurring revenue trending?" without stitching together separate tools.

Who it's for

Lago states it is trusted by companies including CoreWeave, Mistral AI, and PayPal, and positions itself for both fast-growing AI scaleups and global enterprises. It also emphasizes enterprise-grade security and privacy.

You're likely a good fit if:

  • Your pricing is usage-based, subscription-based, or a mix of both.
  • You bill for AI tokens or similar metered consumption where different units have different prices.
  • You want open-source transparency and control over your billing logic.
  • You need credits, spend alerts, and revenue reporting alongside invoicing.

You may not need it if your billing is a single flat recurring charge with no metering and no reporting requirements.

The open-source angle

The key distinction is that Lago is open-source billing infrastructure, not just a hosted billing service. That means the billing logic is inspectable and controllable — relevant when pricing models change often or when finance and engineering need to agree on exactly how a number was produced. The site frames this as "full transparency, control and flexibility," and offers both a hosted path (book a demo) and an open-source path (explore open source).

If you want to see how the metering and invoicing pieces fit together before committing, the billing & invoicing and pricing pages are the natural next stops.