Open Source Usage-Based Billing

Usage-based billing and metering at scale, at every stage of your company.
For usage-based, subscription-based, and all the nuances of pricing in between.

Thanks for subscribing to our newsletter!

Oops, a problem occurred while submitting your email. Please try again or don't hesitate to reach out if the issue remains unsolved.
Backed by
Logo of Y Combinator

1// Ingest metered events to aggregate billing usage
2LAGO_URL="https://api.getlago.com"
3API_KEY="__YOUR_API_KEY__"
4
5curl --location --request POST "$LAGO_URL/api/v1/events"/
6--header "Authorization: Bearer $API_KEY" /
7--header 'Content-Type: application/json' /
8--data-raw '{ 
9	"event": {
10		"transaction_id": "1234_5678_9012_3456",
11		"customer_id": "0987_6543_3210_0987",
12		"code": "api_calls",
13		"timestamp": 1653481578,
14		"properties": { 
15			"nb_api_calls": 12
16		}
17	}
18}'

Creation of billable metric

Monitor usage with real-time events

Lago ingests all events coming from your back-end system and converts them into billable metrics that track your customers' consumption.

Usage metering with Maneki

1// Charge those billing events inside plans, with flexibility!
2LAGO_URL="https://api.getlago.com"
3API_KEY="__YOUR_API_KEY__"
4
5curl --location --request POST "$LAGO_URL/api/v1/subscriptions" /
6--header "Authorization: Bearer $API_KEY" /
7--header 'Content-Type: application/json' /
8--data-raw '{ 
9	"subscription": {
10		"customer_id": "0987_6543_3210_0987",
11		"plan_code": "premium"
12	}
13}'

Add usage-based charges to your plans

Our flexible pricing models allow you to create hybrid pricing plans that may include a subscription and multiple consumption-based charges.


1// Lago automatically aggregates charges into invoices
2"fees": [
3   {
4     "item": {
5	   "type": "subscription",
6	   "code": "premium",
7	   "name": "Premium"
8     },
9     "amount_cents": 1000,
10     "amount_currency": "USD",
11     "vat_amount_cents": 200,
12     "units": "1"
13     },
14     "item": {
15	   "type": "charge",
16	   "code": "api_calls",
17	   "name": "API Calls"
18     },
19     "amount_cents": 1550,
20     "amount_currency": "USD",
21     "units": "12901"
22     }]

Issue auto-generated invoices

Depending on the configuration of your plans, Lago automatically calculates how much you are owed and generates an invoice for each customer.

What they say about us

GitHub logo

Big fan of Lago's work. Payments and billing create huge underrated nightmares for engineers. With their open-source approach, Lago can help solve the long tail of challenges.

Lago provides a solid foundation for billing engineers to build on and customize to their needs. The team is super reactive and experienced in the space too!

Photo of Joel Taylor

Joel Taylor

Sr. Billing Engineer at GitHub

Qonto logo

Billing has millions of edge cases. But it's also a 'talent nightmare'. No CTO wants to staff their engineers on billing, and no engineer wants to work on it for the long term.

I just wish Lago existed five years ago, so that my team could build on top of their API and go back to building our core product asap.

Photo of Gabriel Klein

Gabriel Klein

CTPO at Masteos
ex-VP Engineering at Qonto

Algolia logo

I wish Lago existed when we started Algolia.

We've revamped our billing stack three times and even went through a failed implementation with Zuora.

We totally underestimated the complexity of billing at the time, and our needs were too specific for closed-source vendors.

Photo of Nicolas Dessaigne

Nicolas Dessaigne

Co-founder at Algolia
Partner at Y Combinator

Measure, price, invoice
and keep your tools in sync

Bill your customers
seamlessly and effortlessly

Coupons

Create marketing campaigns with coupons that customers can redeem to get a discount on their next invoice.

Coupons

Add-ons

Use add-ons to charge for additional services and products, such as implementation support and optional features.

Add-ons

Real-time usage

Monitor consumption throughout the billing cycle and help customers understand how they are charged.

Real-time usage

Tax management

Define tax rates at company level or customer level to ensure compliance with local legislation.

Tax management

For usage-based
and hybrid pricing models

Fintech

Handle dozens of recurring and one-off banking fees.
Bypass payment processors by debiting your own wallets.

Billing system for fintechs

API solution

Use any end-point as a billable metric.
Offer prepaid credits to get paid in advance.

Data management

Charge recurring platform fees.
Increase your revenue by billing customers for overage.

Could infrastructure

Create a Heroku-like pricing model in no time.
Assign several plans to a customer and measure consumption.

We ship incredibly fast
and it's only the beginning

See all product updatesConsult our public roadmap

Thanks for subscribing to our newsletter!

Oops, a problem occurred while submitting your email. Please try again or don't hesitate to reach out if the issue remains unsolved.

Built for teams
who need more control

Billing composability
Composability

Use our event-based infrastructure, or fork it to fit your specific pricing model without begging us for a product update.

Cost controlled billing
Costs

Our self-hosted version is free forever. We will not take a percentage of your hard-earned revenue. More information here.

Privacy biling
Privacy

Your customer and financial data never has to leave your infrastructure. Stay in total control.

Have some questions?

Why is your solution open-source?

You can find our detailed answer in this blog post, but essentially:

1/ To address the issue of the increasing diversity and complexity of pricing models
Combinations of pricing dimensions (recurring fees, one-off, payment fees, etc.) are infinite, and teams usually want to iterate on these models over time. That’s why engineers end up investing a huge amount of time to maintain their own billing system, even when they already use an existing closed-source billing service like Stripe Billing or Chargebee.

2/ To offer a way out of the 'rent seeker' pricing model (a cut on transaction volume)
We aim at striking a fairer pricing model for our own service, not relying on taking a cut on each transaction that goes through Lago. To start with, our open-source library is forever free.

Which open-source license did you choose?

We chose the AGPLv3 license. We believe that this license will allow us to create a sustainable model to bring value to our community in the long term. You can find more information about AGPLv3 in this article.

Is Lago a payment service provider?

Lago is an open-source billing API that helps you monitor usage, manage pricing plans and automate invoicing (among other things). We don't process payments but integrate with your favorite payment processors (e.g. Stripe Payments, PayPal, Paddle).

Lago automatically generates invoices that can be used to trigger the cash collection process. Invoices are available in PDF format or can be retrieved via webhook.

How do you generate revenue?

Our priority is to generate value for our users and our community. We have started to think about monetization and our guiding principles are clear: we want a pricing that is fair, transparent and sustainable. We will not take a percentage of your revenue. Click here to learn more.

Who are you?

We’re a nimble team who previously built from scratch and maintained a usage-based billing system for a fintech unicorn. At the time, we seriously underestimated the dozens of edge cases, engineering challenges, and huge impact on business teams (i.e. revenue growth, marketing, customer success, finance). We're now on a mission to build the tool we wish we had.

On top of that, we’re backed by Y Combinator, and some of the best open-source and fintech leaders.

How safe is it to use Lago?

With Lago, your data never has to leave your infrastructure. Even if Lago had to shut down - which is definitely not our plan - your billing system would remain unchanged, as you would be able to host our open-source library.

Also, feel free to customize our API as much as needed, by forking our code: make your billing fit your needs instead of hacking around incumbent SaaS or worse, building your home-made system.

Do you have a cloud-hosted version?

Yes, of course. To access the cloud-hosted version, please fill the following form.