BASE

Lago

Lago

Commerce and billing component · Free + paid

Usage metering and billing: product events, pricing plans, credits, and invoices through an API for SaaS, with an open core and a managed offering.

Resource illustration: Lago

Open resource ↗

What you can use for free

The open source component used locally or self-hosted for the stated workflow, within its license terms.

Paid features and costs

Your own server, external APIs, and compute; managed cloud hosting, support, and additional commercial features if selected.

Access and limitations

Code licensing and hosting costs are separate matters. Check the conditions for the specific version and edition.

Use cases

  • Bill for API usage
  • Send events, generate a test invoice, and compare the calculation with a reference total

Example workflow

A possible workflow; this is not a report of hands-on testing.

Bill for API usage

Before you start

  • A test customer, plan, and idempotent usage events.
  • A test project and completion criteria for the task: Bill for API usage.

Steps

  1. Set up Lago to test: A test customer, plan, and idempotent usage events.
  2. Send events, generate a test invoice, and compare the calculation with a reference total.
  3. Integrate the checked version into your project; document its configuration, limitations, and recovery method.

Check your result

  • Duplicate events do not double the bill; check taxes and connected payments separately.
  • Check the result against a reference example; separately confirm the terms of any assets and external services used.

Choosing Lago

Bill for API usage

Choose this when

  • Bill for API usage
  • Send events, generate a test invoice, and compare the calculation with a reference total

Requirements

  • Link usage events to a metric, plan, and subscription; the AI example sends input/output tokens separately.

Things to consider

  • Costs and limits of free use: Your own server, external APIs, and computing resources; managed cloud hosting, support, and additional commercial features if selected.
  • Terms of use: AGPL-3.0
  • The README’s demonstration token prices illustrate metering rather than confirming model provider pricing.

Frequently asked questions

What can you use for free in Lago?

The openly available portion, used locally or self-hosted for the stated use case within its license terms.

What additional costs might arise with Lago?

Your own server, external APIs, and computing resources; managed cloud hosting, support, and additional commercial features if selected.

What terms of use matter for Lago?

AGPL-3.0

How do you get started with Lago?

Set up Lago to test: A test customer, plan, and idempotent usage events. Send events, generate a test invoice, and compare the calculation with a reference total. Integrate the checked version into your project; document its configuration, limitations, and recovery method.

Do I need an AI agent to send events to Lago?

No: the README shows an API alongside the CLI and MCP. Usage events are linked to a customer and configured metric; the AI example separates input/output tokens. Choose the application integration independently from agent use.

License

AGPL-3.0

AGPL 3.0 — copyleft with a network-service condition

Use, modification, and commercial use cases are permitted. GPL obligations apply to distribution. If you modify an AGPL-covered program and let users interact with it over a network, you must offer them the corresponding source code for that version. This applies to the covered program, not automatically to all your data or independent applications.

License terms

Technologies and topics

  • Lago
  • Commerce and billing component

Sources

Other resources