{"id":13405885,"url":"https://github.com/getlago/lago","last_synced_at":"2025-05-10T04:37:57.038Z","repository":{"id":37399730,"uuid":"464415161","full_name":"getlago/lago","owner":"getlago","description":"Open Source Metering and Usage Based Billing API ⭐️ Consumption tracking, Subscription management, Pricing iterations, Payment orchestration \u0026 Revenue analytics","archived":false,"fork":false,"pushed_at":"2025-05-06T07:38:07.000Z","size":138100,"stargazers_count":7627,"open_issues_count":16,"forks_count":375,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-05-08T20:57:38.137Z","etag":null,"topics":["analytics","billing","clickhouse","events","fintech","go","ingestion","invoices","metering","open-source","payments","pricing","pricing-data-science","react","ruby","self-hosted","subscriptions","usage-based-billing"],"latest_commit_sha":null,"homepage":"https://www.getlago.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlago.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://buy.stripe.com/7sIg2X2PVaA96v65kl"]}},"created_at":"2022-02-28T09:22:45.000Z","updated_at":"2025-05-08T20:37:21.000Z","dependencies_parsed_at":"2022-07-08T16:47:27.479Z","dependency_job_id":"7a26e299-9e0b-4a3a-972f-66c08cc4b7e5","html_url":"https://github.com/getlago/lago","commit_stats":{"total_commits":350,"total_committers":31,"mean_commits":"11.290322580645162","dds":0.7485714285714286,"last_synced_commit":"708aca6413a23fba24edb940f7bd11c4f7246e3e"},"previous_names":[],"tags_count":149,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlago%2Flago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlago%2Flago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlago%2Flago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlago%2Flago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlago","download_url":"https://codeload.github.com/getlago/lago/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253157470,"owners_count":21863127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","billing","clickhouse","events","fintech","go","ingestion","invoices","metering","open-source","payments","pricing","pricing-data-science","react","ruby","self-hosted","subscriptions","usage-based-billing"],"created_at":"2024-07-30T19:02:14.896Z","updated_at":"2025-05-08T22:30:19.899Z","avatar_url":"https://github.com/getlago.png","language":"Go","readme":"\u003c!-- PROJECT LOGO --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/getlago/lago\"\u003e\n    \u003cimg src=\"https://uploads-ssl.webflow.com/635119506e36baf5c267fecd/635b6df0ee8effaa54c1fa42_banner-open-graph.jpg\" alt=\"Lago\"\u003e\n  \u003c/a\u003e\n\n  \u003ch1 align=\"center\"\u003eLago\u003c/h2\u003e\n\n  \u003cp align=\"center\"\u003e\n    Open Source Metering \u0026 Usage-Based Billing\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    The best alternative to Chargebee, Recurly or Stripe Billing.\n    \u003cbr /\u003e\n    For usage-based, subscription-based, and all the nuances of pricing in between.\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://www.getlago.com/slack\"\u003eSlack\u003c/a\u003e\n    ·\n    \u003ca href=\"https://getlago.com\"\u003eWebsite\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/getlago/lago/issues\"\u003eIssues\u003c/a\u003e\n    ·\n    \u003ca href=\"https://getlago.canny.io/\"\u003eRoadmap\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.producthunt.com/posts/lago?utm_source=badge-top-post-badge\u0026utm_medium=badge\u0026utm_souce=badge-lago\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=386328\u0026theme=light\u0026period=monthly\" alt=\"Lago - Open\u0026#0045;source\u0026#0032;alternative\u0026#0032;to\u0026#0032;Stripe\u0026#0032;Billing\u0026#0032;and\u0026#0032;Chargebee | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.producthunt.com/posts/lago?utm_source=badge-top-post-topic-badge\u0026utm_medium=badge\u0026utm_souce=badge-lago\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=386328\u0026theme=light\u0026period=monthly\u0026topic_id=267\" alt=\"Lago - Open\u0026#0045;source\u0026#0032;alternative\u0026#0032;to\u0026#0032;Stripe\u0026#0032;Billing\u0026#0032;and\u0026#0032;Chargebee | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://www.getlago.com/slack\"\u003e\u003cimg src=\"https://img.shields.io/badge/Lago%20Slack%20Community-lago.slack.com-%234A154B\" alt=\"Join Lago on Slack\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/getlago/lago/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/getlago/lago\" alt=\"Github Stars\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://news.ycombinator.com/item?id=31424450\"\u003e\u003cimg src=\"https://img.shields.io/badge/Hacker%20News-777-%23FF6600\" alt=\"Hacker News\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/getlago/lago/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-AGPLv3-purple\" alt=\"License\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://twitter.com/getlago\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/getlago?style=flat\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://www.ycombinator.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Backed%20by-Y%20Combinator-%23f26625\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## The programmable API for usage-based billing\n[![Lago Billing System Presentation](https://img.youtube.com/vi/dXnoMRetsr4/0.jpg)](https://www.youtube.com/watch?v=dXnoMRetsr4)\n\n### The problem: Billing systems are still a nightmare for engineers\n![Billing nightmare](https://uploads-ssl.webflow.com/6244531a40ad7ef5475ad9b3/62827b2f6fa52239b0db0fa4_Blog%20Post%20Image%20Standalone.png)\nEngineers be like…\n\nRead more first-hand experiences from Qonto, Algolia, Pleo, Segment, or the 350+. Hackernews comments [here](https://news.ycombinator.com/item?id=31424450).\n\n**The Solution:** Lago, the open-source billing API for product-led SaaS\n- Event-based: if you can track it, you can charge for it;\n- Built for product-led growth companies;\n- Hybrid pricing: subscription and usage;\n- Hybrid go-to-market motion: self-serve and sales-led.\n\n**Open-source, open architecture:**\n- Composable: connect Lago to any of your internal systems or tools (i.e. any payment gateway, CRM, CPQ, accounting software);\n- 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;\n- Privacy: your data never has to leave your infrastructure.\n\n## ✨ Features\n- **[Usage metering](https://www.getlago.com/products/metering)**: Lago's event-based architecture provides a solid foundation for building a fair pricing model that scales with your business.\n- **[Price plans](https://www.getlago.com/products/plans)**: Lago supports all pricing models. Create pay-as-you-go and hybrid plans in no time with our intuitive user interface or API.\n- **[Coupons](https://www.getlago.com/products/coupons)**: Create engaging marketing campaigns and increase conversion with coupons that customers can redeem to get a discount.\n- **[Add-ons](https://www.getlago.com/products/add-on)**: 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.\n- **[Invoicing](https://www.getlago.com/products/invoicing)**: Depending on the configuration of your plans, Lago automatically calculates what each customer owes you and generates invoices.\n- **[Prepaid credits](https://www.getlago.com/products/prepaid-credits)**: Unlock recurring revenue opportunities for pay-as-you-go pricing models with Lago’s prepaid credit features.\n\n## 🔔 Stay up to date\nLago 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.\n\n[Check out our public roadmap](https://getlago.canny.io/)\n\n## 🔖 License\nDistributed under the AGPLv3 License. Read more [here](https://www.getlago.com/blog/open-source-licensing-and-why-lago-chose-agplv3).\n\n## Current Releases\n\n| Project            | Release Badge                                                                                       |\n|--------------------|-----------------------------------------------------------------------------------------------------|\n| **Lago**           | [![Lago Release](https://img.shields.io/github/v/release/getlago/lago)](https://github.com/getlago/lago/releases) |\n| **Lago API**     | [![Lago API Release](https://img.shields.io/github/v/release/getlago/lago-api)](https://github.com/getlago/lago-api/releases) |\n| **Lago front**     | [![Lago front Testing Release](https://img.shields.io/github/v/release/getlago/lago-front)](https://github.com/getlago/lago-front/releases) |\n| **Lago Go Client**     | [![Lago Go Client Testing Release](https://img.shields.io/github/v/release/getlago/lago-go-client)](https://github.com/getlago/lago-go-client/releases) |\n| **lago-gotenberg**     | [![lago-gotenberg Release](https://img.shields.io/github/v/release/getlago/lago-gotenberg)](https://github.com/getlago/lago-gotenberg/releases) |\n| **Lago JavaScript Client**     | [![Lago JavaScript Client Release](https://img.shields.io/github/v/release/getlago/lago-javascript-client)](https://github.com/getlago/lago-javascript-client/releases) |\n| **Lago OpenAPI**     | [![Lago OpenAPI Release](https://img.shields.io/github/v/release/getlago/lago-openapi)](https://github.com/getlago/lago-openapi/releases) |\n| **Lago Python Client**     | [![Lago Python Client Release](https://img.shields.io/github/v/release/getlago/lago-python-client)](https://github.com/getlago/lago-python-client/releases) |\n| **Lago Ruby Client**     | [![Lago Ruby Client Release](https://img.shields.io/github/v/release/getlago/lago-ruby-client)](https://github.com/getlago/lago-ruby-client/releases) |\n\n\n## 💻 Deploy locally\n\n### Requirements\n1. Install Docker on your machine;\n2. Make sure Docker Compose is installed and available (it should be the case if you have chosen to install Docker via Docker Desktop); and\n3. Make sure Git is installed on your machine.\n\n### Run the app\nTo start using Lago, run the following commands in a shell:\n\n\n#### On a fresh install\n```bash\n# Get the code\ngit clone --depth 1 https://github.com/getlago/lago.git\n\n# Go to Lago folder\ncd lago\n\n# Set up environment configuration\necho \"LAGO_RSA_PRIVATE_KEY=\\\"`openssl genrsa 2048 | base64`\\\"\" \u003e\u003e .env\nsource .env\n\n# Start all the components\ndocker compose up\n```\n\n#### After an update\n\n```bash\ndocker compose up\n```\n\nYou can now open your browser and go to http://localhost to connect to the application. Lago's API is exposed at http://localhost:3000.\n\nNote 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:\n\n```\nLAGO_API_URL=\"http://192.168.122.71:3000\"\nLAGO_FRONT_URL=\"http://192.168.122.71\"\n```\n\n### Find your API key\nYour API Key can be found directly in the UI:\n\n1. Access the **Developer** section from the sidebar;\n2. The first tab of this section is related to your **API keys**; and\n3. Click the **Copy** button to copy it to clipboard.\n\n### Analytics and tracking\nPlease 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.\n\nIf you would like to know more about Lago's analytics or remove the entire tracking, please refer to [this page](https://doc.getlago.com/guide/self-hosted/tracking-analytics) for comprehensive information.\n\n### Version, environment variables and components\nDocker 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.\n\nLago 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](https://doc.getlago.com/docs/guide/self-hosting/docker#configuration).\n\n## ☁️ Use our cloud-based product\nContact our team at hello@getlago.com to get started with Lago Cloud. More information on [our website](https://www.getlago.com/pricing).\n\n## 🚀 Getting the most out of Lago\n- See the [documentation](https://doc.getlago.com) to learn more about all the features;\n- Use our [templates](https://www.getlago.com/resources/templates/all) to get inspiration and learn how to reproduce Algolia’s, Segment’s and Klaviyo’s pricing models;\n- Join our [Slack community](https://www.getlago.com/slack) if you need help, or want to chat, we’re here to help;\n- Contribute on GitHub: read our [guidelines](https://github.com/getlago/lago/blob/main/CONTRIBUTING.md);\n- Follow us on [Twitter](https://twitter.com/GetLago) for the latest news;\n- You can email us as well: hello@getlago.com.\n\n## 🧑‍💻 Contributions and development environment\n\nYou can follow this [guide](https://github.com/getlago/lago/wiki/Development-Environment) to set up a Lago development environment on your machine. This guide is intended for people willing to contribute to Lago. If you want to try Lago on your local system, we recommend that you take a look at Lago's public documentation.\n\nYou can contribute by following our [guidelines](https://github.com/getlago/lago/blob/main/CONTRIBUTING.md).\n\n## 💡 Philosophy\nB2B SaaS has evolved, but billing has not yet.\n\n### 1- We’re not in the “subscription economy” anymore. And we won’t go “full usage-based pricing” quite yet\nPricings are now mostly hybrid: they include a usage-based component (i.e. “if you use more you pay more”) and a subscription component (i.e. a recurring fee for basic usage).\n\nNot all software companies will go full “usage-based” like Snowflake for instance. This model is the new standard for cloud infrastructure products. However, in other areas of SaaS, users want to know beforehand how much they will pay to control their spending and software companies want to be able to predict recurring revenues.\n\n### 2- Go-to-market is not either bottom-up or top-down anymore\nSaaS used to be either self-service (SMBs) or sales-led (Enterprises).\nGo-to-market now mixes the self-service (all customers access the same price plans) and sales-led (customers get a custom quote from a sales representative) motions.\nA typical journey involves an individual contributor in a company who tests a new tool, puts their corporate credit card in, and starts spreading the use of the tool within the organization. At that point, the VP or head of department might want to upgrade to a custom plan tailored to the needs of the whole organization.\nAs a result, billing needs to be flexible, automated, and transparent enough to embrace this hybrid go-to-market motion as well.\n\n### 3- The “rent seeker” pricing of current billing solutions needs to stop\nWhy do payment companies take a cut on revenues?\nBecause the higher the amount, the higher the risk for them (e.g. fraud, disputes, etc.).\n\nWhy did billing companies adopt the same pricing structure? We’re not able to provide an answer that makes sense. It’s been said on the internet that they did this because they could (read more [here](https://news.ycombinator.com/item?id=16766846)).\n\n### One last thing…\nLago is agnostic and we aim at being as transparent as possible, so we won’t nudge or lock you into using a specific tool in exchange for using our billing API ([learn more](https://www.gmass.co/blog/negotiating-stripe-fees/)).\n","funding_links":["https://buy.stripe.com/7sIg2X2PVaA96v65kl"],"categories":["Go","Shell","Enterprise Products","By Industry","Usage-based pricing","others","Integrations","By Language","analytics","Applications","🛠 Part I: The Open SaaS Stack","\u003ca name=\"Go\"\u003e\u003c/a\u003eGo","Pricing"],"sub_categories":["Finance","Load, stress \u0026 soak testing","Deployment and Management Tools","Shell","Finance \u0026 Legal","Usage-based Pricing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlago%2Flago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlago%2Flago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlago%2Flago/lists"}