# Lago

> Usage-based billing for SaaS, API and AI products.

- Page: https://cgt.octabyte.io/templates/lago/
- Category: Finance
- Replaces: Stripe Billing and Chargebee
- Ease of use: Some setup. Sign in with the admin email you chose and the password Cloudgate shows you, set up your plans, then have a developer send usage from your product through Lago's API.
- App price: Free. To run it you need Cloudgate (hosted, or free to install yourself) and a server, which hosted Cloudgate can provide.
- License: AGPL-3.0-only
- Good for: SaaS, API and AI companies with a developer on hand, billing customers by usage
- Official website: https://getlago.com
- Documentation: https://getlago.com/docs
- Source code: https://github.com/getlago/lago
- Last updated: 2026-11-20

## What is Lago?

Lago is self-hosted, open-source usage-based billing: meter what customers use, price it, and send invoices, with payments through Stripe.

Self-hosted Lago is open-source usage-based billing software, an alternative to Stripe Billing and Chargebee for companies that charge customers for what they use. Your product sends usage to Lago, such as API calls, AI tokens, storage or seats, and Lago turns it into prices, subscriptions and invoices, with no percentage of your revenue going to the billing tool.

A small API business, for example, could charge each customer a $49 monthly fee that includes 10,000 requests, plus a cent for every request after that. Lago counts the requests as they happen, adds the overage to the month's invoice with tax, and your Stripe account charges the card.

Lago is built to be connected, not used on its own: a developer links your product through its API or its SDKs for JavaScript, Python, Ruby, Go and other languages, and webhooks tell your product when an invoice is ready. Payments go through Stripe, Adyen or GoCardless. Emailing invoices, payment reminders and accounting sync are paid Premium features.

Cloudgate installs Lago on a server Cloudgate provides or one you connect, with a secure web address for the dashboard and one for the API. Sign in with your admin account, set up your plans, and hand the API key to your developer. Your billing data stays on your server.

## What you can do with Lago

- **Count what customers use**: Your product sends usage such as API calls, tokens, storage or seats, and Lago totals it per customer in real time without counting a repeated event twice.
- **Price it your way**: Charge per unit, in tiers, in packages, by volume or as a percentage, alone or on top of a fixed monthly or yearly fee.
- **Bill on schedule**: Subscriptions turn into invoices with taxes, coupons and PDF copies, in several currencies.
- **Sell prepaid credits**: Customers buy or receive credits up front, and Lago takes their usage out of that balance on each invoice.
- **Decide who gets which features**: Set the features and limits each plan includes, and let your product read them for every customer.
- **Get paid through your payment provider**: Connect Stripe, Adyen or GoCardless to charge customers automatically and keep each invoice's payment status up to date.
- **Give customers a billing page**: Share or embed a customer portal where each customer sees their own invoices.

## Replaces Stripe Billing and Chargebee

Lago does the same job as Stripe Billing and Chargebee. Here is what changes when you switch.

### What you gain

- No percentage of your billing goes to the billing tool
- Your pricing, customers and usage data stay on your server
- The code is public, so your developers can read exactly how a charge was worked out
- Your pricing does not depend on one payment provider's product catalogue

### What is different

- A developer has to connect your product to Lago before anything is billed
- Emailing invoices, payment reminders, usage alerts and accounting or CRM sync are paid Premium features
- You still need a payment provider such as Stripe to take card payments, with its own fees
- There is no import from Stripe Billing or Chargebee, so plans and subscriptions are set up again

## What happens when you click Deploy?

Deploy link: https://cloudgate.octabyte.app/get-started?template=lago

1. **Click Deploy and create your account.** Deploy takes you to Cloudgate. Create an account, or log in if you have one. Lago itself is free.
2. **Choose a server.** No server? Get one from Cloudgate: pick a size and a country, and Cloudgate gets it ready. Already have one? Connect it instead.
3. **Cloudgate sets up Lago.** It prepares the server, makes the passwords the app needs and starts it. There is nothing to install and nothing to write down.
4. **Open your app and sign in.** Your app gets a free web address to start, without https. Add your own domain, like app.yourshop.com, and Cloudgate secures it with https for you.

## Questions

### Is Lago free?

Yes, the self-hosted Lago is free and open source under the AGPL-3.0 licence, with no fee per invoice or per customer. Some features, such as emailing invoices, payment reminders, usage alerts and accounting integrations, are part of Lago's paid Premium edition.

### Is Lago a good alternative to Stripe Billing?

Yes, if you bill by usage and have a developer to connect your product. Lago takes no share of what you bill and can still collect card payments through your Stripe account, but it has fewer built-in finance extras than Stripe Billing in its free edition.

### Does Lago take payments itself?

No, Lago works out what each customer owes and creates the invoice, and a payment provider collects the money. It connects to Stripe, Adyen and GoCardless, and you pay their usual payment fees.

### Do I need a developer to use Lago?

Yes, for the first connection. Plans, prices and customers can be set up in Lago's dashboard without code, but your product has to send its usage to Lago through the API or one of Lago's SDKs before usage can be billed.

### Can I import my plans and customers from Stripe Billing or Chargebee?

No, Lago has no import tool for Stripe Billing or Chargebee. You recreate your plans in Lago and move customers and subscriptions across with its API.

### How do I sign in to Lago the first time?

Cloudgate creates your organization and its admin account when Lago first starts, using the admin email you choose and a password Cloudgate generates and shows you. Public sign-up is turned off, so you invite your team from the settings.

### Do I need my own server for Lago?

No. When you deploy Lago, hosted Cloudgate can provide a server. If you already rent one, you can connect it instead.
