Lago (YC S21) – Open-source usage-based billing

Hi HN, we’re the cofounders of Lago: an open-source alternative to Stripe Billing, Chargebee, and Recurly. That is, we make software that helps businesses calculate how much their own customers should pay them—based on their subscription, consumption, discounts, taxes, credit notes, or negotiated terms—and then invoice them.

Our website is at https://www.getlago.com and our Github is here: https://github.com/getlago/lago.

We’re focused on composability (use only the parts you need), metering (measuring how much of a software service end users use, so that the service can charge them based on that), code transparency (we’re open source, so no black box - you can have a full understanding of how we built our API) auditable code, no lock-in into anyone’s ecosystem, and fair pricing (we don’t take a cut of your revenue).

We’ve been in Fintech for more than 7 years, and were the earliest employees at Qonto.com (SMB Neobank in EU), where we built and scaled the billing system and led the revenue team that took the company from pre-launch to $100M+ of ARR.

Back in the early days at Qonto, our pricing was very simple, a single “all-included” subscription. We budgeted 3 months of a single back-end to “get it done, once and for all”. As we shipped new features (add-ons, new tiers, usage-based etc), improved the packaging, changed our reporting structure as we matured (or instance, we changed the billing cycles from anniversary dates to calendar dates which looked trivial until we had to migrate 100K+ companies), launched new countries (new prices, new taxes implications new reporting!), we iterated on pricing dozens of times.

We consistently underestimated the engineering nightmare billing would create, and learned the hard way about side effects: delayed launches at best, billing errors at worst, resulting in churning users. We wrote an article about this that had a large HN thread last year (https://news.ycombinator.com/item?id=31424450).

We tried to get rid of our home-grown system many times but never found an alternative that was flexible enough. As a result, there were only two options: either stop iterating on pricing and leave revenue on the table, or grow a billing engineering team. We chose the second, but it was expensive. Finding pricing or monetization experts living in spreadsheets is easy, but finding technical professionals to build and maintain a billing system is a real bottleneck. Few engineers or product managers have experience in billing, and it’s rarely a career path they look forward to.

At some point, we realized we’d stopped being able to do pricing strategy based on what was best for the company and found ourselves driven by what was easiest to implement—not because we wanted to, but because it was all too complicated. We asked around and realized a lot of companies were in a similar situation. There are a lot of clunky internal billing systems out there! We spent a lot of time analyzing why no one had solved this problem, as we thought companies like Stripe or Chargebee had partially addressed it. We came to the conclusion that a proper solution needed to be open source.

A lot of teams continue to build their billing system themselves because they have unique edge cases that closed-source solutions can’t address. They are part of the “long tail”, which a closed-source SaaS has no incentive to invest in solving. That’s how we arrived at the idea of open sourcing “core billing” foundations that other people could use and build on. We don’t solve 100% of use cases either, but what we don’t solve, others can build, without having to reinvent an entire system. We think of Lago’s features like “Legos” you can pick to build your own system, rather than a “one size fits all” billing platform.

Unlike closed source solutions, we aim at giving full transparency on how Lago works (auditable code), and enable our users to pick only the parts of our product that are relevant to their needs (e.g., if they are already handling subscription management but want to manage prepaid credits with Lago, they can). You can make your own design decisions, build anything custom that you need, and collaborate with other engineers in the community.

For instance, one of our users built a Javascript SDK that is now available to everyone. Others are developing additional “charge models”: for instance we don’t offer the ability to “cap a charge” yet: if you’re a fintech processing transactions, you’d like to bill for instance “2% of the transaction amount capped at $50”, to make your pricing attractive. We’re working with a team who are contributing this to Lago. Other contributions involve adding native integrations with local payment processors (in India, Northern Europe, Africa, Middle East), because they usually cater better to the needs of local players in these regions: better payment success rates, better conversions at checkout pages, and usually better prices.

We’re making Lago as open as possible to adjacent tools (e.g., payment processors, quoting software, CRMs, etc.)—both market leaders and niche solutions in smaller markets. We’ve built native integrations with GoCardless and Stripe Payments, but our API is usable with any payment processor from any region, and some community members are already doing so.

We’re also partnering with Osohq.com, open-source as well, that manages authorization and entitlements (granting access to a specific feature if a user had subscribed to a specific plan): https://doc.getlago.com/docs/integrations/entitlements/oso You can also use Lago with automation tools like n8n.io to create workflows, for instance if you notice your end users have an unusually high consumption of your product, and you want to avoid “bill shock”, you might want to alert them or your customer success team to take proactive actions: https://doc.getlago.com/docs/integrations/alerting/n8n#overc...

We’re actively working to build an ecosystem around Lago and address the long tail of edge cases that makes billing and monetization complex, with the help of the community.

How it works: Lago collects HTTP events sent by a backend application. These events are automatically aggregated to create “units to be charged”. Each unit can be priced using different pricing models (tiers, packages, percentages). At the end of each billing period (month, quarter, year), a worker gathers all the fees into an invoice (PDF or JSON webhook message). The issued invoice can be connected to various services (payment providers, accounting tools, CRMs) and edited with discounts or credit notes to adjust it.

Once the back-end events are sent to Lago, non-technical users can use our user interface and manage pricing without help from engineers. This is what our UI looks like: https://youtu.be/dXnoMRetsr4

Lago is self-hostable and you can download a Docker image here: https://github.com/getlago/lago. We also have a cloud product that is being used in production. For now we’re still granting access manually, but we’ll make it generally available in the near future. In terms of pricing: the self-hosted product, which contains the core billing features, is free. We’ve tried to make it featureful enough for a business to just use the free product and build what they need on top of it. Premium (i.e paid) features currently include billing on different time zones, credit notes, and will include Salesforce integration in the future. Beyond that, we’re still working out our approach to pricing and have written some of our thoughts about it here: https://www.getlago.com/blog/how-we-think-about-our-own-pric....

The billing / monetization is space is huge and we’re continuing to learn every day, so we would greatly appreciate and are (nervously) eager for your feedback! Thanks!



Get Top 5 Posts of the Week



best of all time best of today best of yesterday best of this week best of this month best of last month best of this year best of 2023 best of 2022 yc w24 yc s23 yc w23 yc s22 yc w22 yc s21 yc w21 yc s20 yc w20 yc s19 yc w19 yc s18 yc w18 yc all-time 3d algorithms animation android [ai] artificial-intelligence api augmented-reality big data bitcoin blockchain book bootstrap bot css c chart chess chrome extension cli command line compiler crypto covid-19 cryptography data deep learning elexir ether excel framework game git go html ios iphone java js javascript jobs kubernetes learn linux lisp mac machine-learning most successful neural net nft node optimisation parser performance privacy python raspberry pi react retro review my ruby rust saas scraper security sql tensor flow terminal travel virtual reality visualisation vue windows web3 young talents


andrey azimov by Andrey Azimov