SkillAgentSearch skills...

Lago

Open Source Metering and Usage Based Billing API ⭐️ Consumption tracking, Subscription management, Pricing iterations, Payment orchestration & Revenue analytics

Install / Use

/learn @getlago/Lago

README

<!-- PROJECT LOGO --> <p align="center"> <a href="https://github.com/getlago/lago"> <img src="https://uploads-ssl.webflow.com/635119506e36baf5c267fecd/635b6df0ee8effaa54c1fa42_banner-open-graph.jpg" alt="Lago"> </a> <h1 align="center">Lago</h2> <p align="center"> Open Source Metering & Usage-Based Billing <br /> <br /> The best alternative to Chargebee, Recurly or Stripe Billing. <br /> For usage-based, subscription-based, and all the nuances of pricing in between. <br /> <br /> <a href="https://www.getlago.com/slack">Slack</a> · <a href="https://getlago.com">Website</a> · <a href="https://github.com/getlago/lago/issues">Issues</a> · <a href="https://getlago.canny.io/">Roadmap</a> </p> </p> <p align="center"> <a href="https://www.producthunt.com/posts/lago?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-lago" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=386328&theme=light&period=monthly" alt="Lago - Open&#0045;source&#0032;alternative&#0032;to&#0032;Stripe&#0032;Billing&#0032;and&#0032;Chargebee | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /> </a> </p> <p align="center"> <a href="https://www.producthunt.com/posts/lago?utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-lago" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=386328&theme=light&period=monthly&topic_id=267" alt="Lago - Open&#0045;source&#0032;alternative&#0032;to&#0032;Stripe&#0032;Billing&#0032;and&#0032;Chargebee | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> </p> <p align="center"> <a href="https://www.getlago.com/slack"><img src="https://img.shields.io/badge/Lago%20Slack%20Community-lago.slack.com-%234A154B" alt="Join Lago on Slack"></a> <a href="https://github.com/getlago/lago/stargazers"><img src="https://img.shields.io/github/stars/getlago/lago" alt="Github Stars"></a> <a href="https://news.ycombinator.com/item?id=31424450"><img src="https://img.shields.io/badge/Hacker%20News-777-%23FF6600" alt="Hacker News"></a> <a href="https://github.com/getlago/lago/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-purple" alt="License"></a> <a href="https://twitter.com/getlago"><img src="https://img.shields.io/twitter/follow/getlago?style=flat"></a> <a href="https://www.ycombinator.com"><img src="https://img.shields.io/badge/Backed%20by-Y%20Combinator-%23f26625"></a> </p> <!-- ABOUT THE PROJECT -->

The programmable API for usage-based billing

Lago Billing System Presentation

The problem: Billing systems are still a nightmare for engineers

Billing nightmare Engineers be like…

Read more first-hand experiences from Qonto, Algolia, Pleo, Segment, or the 350+. Hackernews comments here.

The Solution: Lago, the open-source billing API for product-led SaaS

  • Event-based: if you can track it, you can charge for it;
  • Built for product-led growth companies;
  • Hybrid pricing: subscription and usage;
  • Hybrid go-to-market motion: self-serve and sales-led.

Open-source, open architecture:

  • Composable: connect Lago to any of your internal systems or tools (i.e. any payment gateway, CRM, CPQ, accounting software);
  • Pricing: we’re not rent seekers, we’re not asking for a % of your revenue. Our self-hosted version is free. Our cloud version is priced like a SaaS;
  • Privacy: your data never has to leave your infrastructure.

✨ Features

  • Usage metering: Lago's event-based architecture provides a solid foundation for building a fair pricing model that scales with your business.
  • Price plans: Lago supports all pricing models. Create pay-as-you-go and hybrid plans in no time with our intuitive user interface or API.
  • Coupons: Create engaging marketing campaigns and increase conversion with coupons that customers can redeem to get a discount.
  • Add-ons: Why wait until the end of the billing cycle to get paid? Lago allows you to create one-time charges that are invoiced on the fly.
  • Invoicing: Depending on the configuration of your plans, Lago automatically calculates what each customer owes you and generates invoices.
  • Prepaid credits: Unlock recurring revenue opportunities for pay-as-you-go pricing models with Lago's prepaid credit features.

📚 Documentation

  • Development Environment: Learn how to set up and run Lago locally for development
  • Architecture: Understand Lago's technical architecture and flows
  • Monitoring: Prometheus metrics and alerting for Sidekiq and other components

🔔 Stay up to date

Lago launched its v0.1 on June 2nd, 2022. Lots of new features are coming, and are generally released on a bi-weekly basis. Watch updates of this repository to be notified of future updates.

Check out our public roadmap

🔖 License

Distributed under the AGPLv3 License. Read more here.

Current Releases

| Project | Release Badge | |--------------------|-----------------------------------------------------------------------------------------------------| | Lago | Lago Release | | Lago API | Lago API Release | | Lago front | Lago front Testing Release | | Lago Go Client | Lago Go Client Testing Release | | lago-gotenberg | lago-gotenberg Release | | Lago JavaScript Client | Lago JavaScript Client Release | | Lago OpenAPI | Lago OpenAPI Release | | Lago Python Client | Lago Python Client Release | | Lago Ruby Client | Lago Ruby Client Release |

💻 Deploy locally

Requirements

  1. Install Docker on your machine;
  2. Make sure Docker Compose is installed and available (it should be the case if you have chosen to install Docker via Docker Desktop); and
  3. Make sure Git is installed on your machine.

Run the app

To start using Lago, run the following commands in a shell:

On a fresh install

# Get the code
git clone --depth 1 https://github.com/getlago/lago.git

# Go to Lago folder
cd lago

# Set up environment configuration
echo "LAGO_RSA_PRIVATE_KEY=\"`openssl genrsa 2048 | openssl base64 -A`\"" >> .env
source .env

# Start all the components
docker compose up

After an update

docker compose up

You can now open your browser and go to http://localhost to connect to the application. Lago's API is exposed at http://localhost:3000.

Note that if our docker server is not at http://localhost, the following env variables must be set: LAGO_API_URL. This may be on the command line or in your .env file. For example:

LAGO_API_URL="http://192.168.122.71:3000"
LAGO_FRONT_URL="http://192.168.122.71"

Find your API key

Your API Key can be found directly in the UI:

  1. Access the Developer section from the sidebar;
  2. The first tab of this section is related to your API keys; and
  3. Click the Copy button to copy it to clipboard.

Analytics and tracking

Please note that Lago, by default, tracks basic actions performed on your self-hosted instance. If you do not disable tracking, you may receive specific communications or product updates. However, rest assured that Lago will not collect any personal information about your customers or financial information about your invoices.

If you would like to know more about Lago's analytics or remove the entire tracking, please refer to this page for comprehensive information.

Version, environment variables and components

Docker images are always updated to the last stable version in the docker-compose.yml file. You can use a different tag if needed by checking the releases list.

Lago uses the following environment variables to configure the components of the application. You can override them to customise your setup. Take a closer look are our documentation.

☁️ Use our c

View on GitHub
GitHub Stars9.5k
CategoryData
Updated1h ago
Forks562

Languages

Go

Security Score

100/100

Audited on Mar 29, 2026

No findings