Launch HN: Lago (YC S21) – Open-source usage-based billing
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 platfor...
143 comments
[ 3.1 ms ] story [ 233 ms ] thread>> The tech stack we use to build Lago (YC S21), the open source billing API (https://news.ycombinator.com/item?id=32438355)
>> Lago: The Open Source Stripe Billing Alternative (https://news.ycombinator.com/item?id=32438355)
>>Lago: The Open Source Stripe Billing Alternative(https://news.ycombinator.com/item?id=31638797)
>>Show HN: 6 Steps to build a usage-based billing system with Lago (YC S21)(https://news.ycombinator.com/item?id=32765162)
>> Show HN: Lago: Open-source metering and usage-based billing (https://news.ycombinator.com/item?id=33505229)
Our previous articles focused on billing-related content. They discussed various aspects of billing, such as Stripe fees, alpha launch, and various features.
YC video about launching and launching again.
Keep up the good work, regardless!
[0]: https://keygen.sh/docs/choosing-a-licensing-model/metered-li...
I agree that usage-based billing can be difficult to predict revenue from. We don't think companies will switch entirely to this model. However, the hybrid model can be beneficial for both customers and vendors. Companies can charge a base platform fee and then charge for overage instead of blocking it. This could increase revenue for companies that currently use subscription-based billing.
Per-seat pricing has always felt annoying to me. Ideally you want everyone at your company to be able to access the tools that everyone else uses (you don't want to create a bunch of second class citizens), but that gets really expensive really quickly. So per-user-per-month has never felt great to me.
That said, usage-based billing is confusing. And when customers are confused, they simply chargeback the credit card charge. AWS can make it work, but I'm not sure if everyone else can. Will be interesting to see.
this is not good faith B2B behavior. i'd be surprised if 1% of B2B usage based billing customers behave like this.
It's something you have to expect, and kind of gauge how much money the customer has and send them lots of email as they approach a limit, and make it very clear in the UI that money is being spent that they will soon have to pay. Even then, who knows what people will do. It's bad faith on their part; you, the service provider, are the ones penalized.
I remember having to negotiate with Stripe the removal of their lowest limits. The quantum of unit I was billing on my cloud platform was such that you could consume just enough CPU and storage to end up with a $0.01 invoice at the end of the month.
It was impossible for Stripe to process this payment. IIRC their lowest limit was $0.50 or $0.10. I guess they had this limit in place to prevent abuse and limit fraud. As we had similar hard-coded heuristics for the same reasons.
My most recent Rackspace bill was $0.05. I don't even remember what I'm using it for any more, but it's not worth it to check out.
My last Pulumi bill was $0.86.
That's worth investigating!
Now in a fictional, adversarial way, you can think of a bot exploiting this discrepancy to bankrupt a competitor: create dozens of fake accounts, consume just shy of $0.01 of resources, and have the platform pays 30x more in payment fees (public Stripe price is 30¢/transaction).
To incur a net loss of $1,000,000, you’ll have to find an antagonist ready to create 3,448,276 accounts (1_000_000 / (0.30 - 0.01)), each with their own identity and mean of payment, for a total of $34,482.76.
Fortunately this is highly impractical and will be caught real fast by your internal anti-abuse systems (you have those in place right?).
Small players would be impacted by a 100k$ net loss...and you could even spread it out over several months to be less likely to be caught by anti-abuse systems...
Of course, the vendor/distributor/consumer model can become vendor-many-clients through simplication, same ideas hold.
As it turned out, the company was lucky to have some data-storage-discovery-and-inventory software built as part of the bigger eventual vision that attracted a buyer. It was not the time to work on ambitious greenfield stuff, I guess. The patents were not relevant to the acquirer, and they lapsed at some point.
https://patents.google.com/patent/US20030083998
https://patents.google.com/patent/US20030084000
https://patents.google.com/patent/US20030083892
https://patents.google.com/patent/US20030083995
https://patents.google.com/patent/US20030083994
https://patents.google.com/patent/US20030084145
https://patents.google.com/patent/US20030083999
https://patents.google.com/patent/US20030084060
https://patents.google.com/patent/US20030084343
https://patents.google.com/patent/US20030084341
[edit: 2000 -> 2000/2001 ... "any patent issues" --> "many patent issues" ... a few other in the inventory of ideas ... simplification of model to vendor-many-clients ... fixed one link]
Lago is completely agnostic of payment providers, meaning you can use any payment service provider (PSP) with it, whereas Stripe requires the use of its entire stack.
Lago is event-based, making it easy to ingest a high volume of usage-based components. This eliminates the need for users to manually bill their own usage-based billing aggregation on top of Stripe.
Lago is open-source, so there is no revenue taken as a cut. For its fully cloud-hosted version, Lago prices a platform fee and tiers on usage-based events, making it more scalable for high-volume companies. Additionally, its open architecture allows for full customization to fit your needs.
https://news.ycombinator.com/item?id=34773891
https://www.getlago.com/blog/open-source-licensing-and-why-l...
https://plausible.io
I think what matters more is how the creators of the software intend the license. In case of Lago it's clear they want you to use it this way, and AGPL is only really meant to restrict businesses that want to fork it and start a proprietary billing service.
That is - offer your code to your customers under the agpl, not necessarily back to Lago or the community. But, since your customers get the code under AGPL, they in turn are free to distribute it. So, in practice, going that way - it generally makes sense to just open it up, and contribute back directly.
(imagine your only customer is IBM, or some other big company - they might not care/have an interest in re-distribution of the AGPL code - so you could be compliant (offer source to IBM) - but effectively closed off from the community).
Restricting your usage tracking to your users is fine until you start shouting to them directly on their phones.
>Case 1: You fork our code to build your own billing system at your company. It’s awesome and we would be grateful if you could take some time to share your code as well, as it could help other companies. This is _strongly encouraged but not required_, as we understand not all companies can afford to do this.
And later in the quoted explanation of AGPL:
> "If you run a modified program on a server and let other users communicate with it there, your server must also allow them to download the source code corresponding to the modified version running there."
If you fork the project, your company's customers are communicating with your forked code. So are you required to publish your forked changes? Only required to share the fork with paying customers? Or as your desired case states, not required?
(In any case, Lago looks very cool. Thanks for pushing forward the conversation on open licensing!)
I wonder, would it ever be possible to use the structure provided by lago to also set up a marketplace where user can buy/sell from eachother?
With our open source version of Lago, we offer: - Fair pricing: scale your billing as your company grows - Composability: build the pricing/billing you have in mind, without the limitations of vendors - Participative approach: contribute to the entire billing engine so other companies can benefit from it.
But then I've noticed that you use git submodules for the frontend and backend. It's actually a Rails application from what I can tell.
Any plans to tackle Stripe Connect like functionality (platform / marketplace payments)?
Which of those is the smallest negative depends on your product.
Strong vibes of the dot-com era reading the description but there's probably one or two insights there worth revisiting. Ordered! :)
First of all, we launched our open source billing repository months before they did. In fact, they even reached out to us for inspiration. This could be related to the fact that our team has prior experience building billing engines, so we have a better understanding of the space.
From a product perspective, our coverage is more extensive. We provide more advanced coupons, usage-based components and billing use-cases. For example, we offer credit notes and refunds, small examples that are not listed in their API. Our product covers more billing edge-cases and deeper features.
Finally, we have customers in production. Our top user is invoicing 5M customers a month, which might not be the case for them.
To conclude, I would assert that we are more advanced.
Hi! Lotus has a great product. We should know, as they reached out to us for inspiration before. Our team has prior experience building billing engines, so we have a very good understanding of the space.
From a product perspective, our coverage is more extensive. We provide more advanced coupons, usage-based components and billing use-cases. For example, we offer credit notes and refunds, small examples that are not listed in their API. Our product covers more billing edge-cases and deeper features.
While we don't know how many customers Lotus has in production, our top user is invoicing 5M customers a month!
Overall, we believe at this point that our product is more advanced. We wish them luck though, the more products in this space the better.
Focus on why your product is better or different and not these factors like who was early, who has more experience with billing engines etc because again, experience doesn't translate to success necessarily.
All the best.
First, congrats on the launch Lago. I've been very impressed with your ability to educate devs about the intricacies of billing and you are certainly pushing the entire space forward.
While you offer coupons and credit notes, there are features you don't have that we have prioritized and built, including, usage alerts, plan versioning, gauge metrics, custom sql etc. etc. Point being I think its unfair to say we are a subset of your product.
In addition, we have a 25+ year billing expert on our team who has been CTO of a startup processing $300 million a year.
Lastly, I don't think it's fair to make statements about our customers just because we haven't "announced" them yet.
Happy to chat more with anyone about our differences.
We're also working in the billing space with a complementary tool, Tier (https://github.com/tierrun/tier). Although we currently do not support Lago directly, it's exciting to see more options emerging. Their content marketing has been particularly impressive on HN and in general.
With metering, entitlement management, CPQ, feature gating, and everything else required in a modern SaaS company, the PriceOps space can be quite complex for developers.
Congratulations on the launch and best of luck!
Want to say Thank you for putting all artefacts online. Same applies to Lago!
Admire your focus on Stripe and beginner friendly approach from the day one
https://github.com/tierrun/tier/blob/main/pricing/schema.jso... https://docs.tier.run/docs/resources/mapping-to-stripe https://github.com/tierrun/tier/wiki/Stripe-Glossary
Lago backend is built with Ruby and GraphQL ... which is kind of deal-breaker for me. No time to invest in Ruby ecosystem. I'm only using opensource products which I can fork and debug later on. https://github.com/getlago/lago-api/tree/619a7a53f98d9a19908...
Lago is much closer the production ready however. Solid stand-alone tool already.
Tier like projects gives me hope to give SaaS user better embedded billing experience and more control in the future.
My biggest scare - successful open source projects are getting too many extraline of code overtime.
Ex. Sentry with 25+ containers inside https://github.com/getsentry/self-hosted/blob/48c855aa3def45...