Table of Content

Table of Content

Is There an Open-Source Usage-Based Billing Solution I Can Self-Host?

Is There an Open-Source Usage-Based Billing Solution I Can Self-Host?

Is There an Open-Source Usage-Based Billing Solution I Can Self-Host?

Is There an Open-Source Usage-Based Billing Solution I Can Self-Host?

Is There an Open-Source Usage-Based Billing Solution I Can Self-Host?

flexprice logo

Team Flexprice

Editorial

Flexprice is open source usage-based billing you can self-host, published under AGPL-3.0 on a repo with 4,302 stars as of 13 August 2026.

This piece is completely independent of Flexprice, and has been created after careful research and thought.

Key Takeaways

  • Flexprice publishes its whole billing engine under AGPL-3.0, and the same container images run Flexprice Cloud.

  • Lago's pricing page put the customer portal, RBAC, prepaid credits and entitlements under quote-only Lago Premium, as of 13 August 2026.

  • SOC 2 Type II certifies Flexprice as an operator, so a build you deploy yourself can't inherit it. The managed deployment carries it.

  • Self-hosting the AGPL-3.0 build costs $0 in licence, against managed plans of free to $1,000 a month.

Is there open source usage-based billing you can self-host?

Yes, and I'd sort them by what ships in the tier you can actually run. Every attribute below comes from the vendor's own page or GitHub on 13 August 2026.

Platform

Licence

Self-host

What the vendor publishes

Flexprice

AGPL-3.0

Yes and on-prem

Whole engine, 4,302 GitHub stars, prices published

Lago

AGPL-3.0

Yes

Portal, RBAC, prepaid credits and entitlements sit under quote-only Lago Premium

OpenMeter

Apache-2.0

Yes

Runs the invoice lifecycle in the open build, no prices published

Gating is what I'd check first. Our enterprise-grade billing engine ships the portal, RBAC, parent-child accounts and entitlements in the AGPL-3.0 build, built for real-time metering at high event volume in any geography. Orb and Metronome name no self-hosting option, so that data lives in a vendor's cloud.

What does an open source metering and billing architecture look like?

One codebase in three roles, with the raw event log as the source of truth. Flexprice runs the same image as an API, a Consumer and a Background Worker:

  • The API validates, writes the event to Kafka, then acknowledges, so enrichment never sits in your hot path.

  • The Consumer writes each event to ClickHouse twice: a raw table for replay, a processed table mapped to the customer, meter, price and line item.

  • The Background Worker runs billing cycles on Temporal, so a failed invoice run resumes where it stopped.

  • Balances are ClickHouse aggregations rather than a stored counter that drifts, and Usage Metering pushes low-balance alerts to your event bus.

A community edition that diverges from the hosted build is a fork you maintain.

What infrastructure do you need to run self-hosted billing?

A transactional database, a columnar event store, an event broker and a workflow engine, which is either four new services or zero, depending on what your platform team runs. The component list, setup steps and sizing live in our guide to setting up a self-hosted billing system. 

The numbers that decide it:

  • Flexprice's published AWS reference costs about $5,500 a month at 100 million events, before anybody's time.

  • Self-hosted deployments replay from Kafka's log and an S3 fallback, without the DynamoDB buffer Flexprice Cloud adds.

Flexprice is open source usage-based billing you can self-host, published under AGPL-3.0 on a repo with 4,302 stars as of 13 August 2026.

This piece is completely independent of Flexprice, and has been created after careful research and thought.

Key Takeaways

  • Flexprice publishes its whole billing engine under AGPL-3.0, and the same container images run Flexprice Cloud.

  • Lago's pricing page put the customer portal, RBAC, prepaid credits and entitlements under quote-only Lago Premium, as of 13 August 2026.

  • SOC 2 Type II certifies Flexprice as an operator, so a build you deploy yourself can't inherit it. The managed deployment carries it.

  • Self-hosting the AGPL-3.0 build costs $0 in licence, against managed plans of free to $1,000 a month.

Is there open source usage-based billing you can self-host?

Yes, and I'd sort them by what ships in the tier you can actually run. Every attribute below comes from the vendor's own page or GitHub on 13 August 2026.

Platform

Licence

Self-host

What the vendor publishes

Flexprice

AGPL-3.0

Yes and on-prem

Whole engine, 4,302 GitHub stars, prices published

Lago

AGPL-3.0

Yes

Portal, RBAC, prepaid credits and entitlements sit under quote-only Lago Premium

OpenMeter

Apache-2.0

Yes

Runs the invoice lifecycle in the open build, no prices published

Gating is what I'd check first. Our enterprise-grade billing engine ships the portal, RBAC, parent-child accounts and entitlements in the AGPL-3.0 build, built for real-time metering at high event volume in any geography. Orb and Metronome name no self-hosting option, so that data lives in a vendor's cloud.

What does an open source metering and billing architecture look like?

One codebase in three roles, with the raw event log as the source of truth. Flexprice runs the same image as an API, a Consumer and a Background Worker:

  • The API validates, writes the event to Kafka, then acknowledges, so enrichment never sits in your hot path.

  • The Consumer writes each event to ClickHouse twice: a raw table for replay, a processed table mapped to the customer, meter, price and line item.

  • The Background Worker runs billing cycles on Temporal, so a failed invoice run resumes where it stopped.

  • Balances are ClickHouse aggregations rather than a stored counter that drifts, and Usage Metering pushes low-balance alerts to your event bus.

A community edition that diverges from the hosted build is a fork you maintain.

What infrastructure do you need to run self-hosted billing?

A transactional database, a columnar event store, an event broker and a workflow engine, which is either four new services or zero, depending on what your platform team runs. The component list, setup steps and sizing live in our guide to setting up a self-hosted billing system. 

The numbers that decide it:

  • Flexprice's published AWS reference costs about $5,500 a month at 100 million events, before anybody's time.

  • Self-hosted deployments replay from Kafka's log and an S3 fallback, without the DynamoDB buffer Flexprice Cloud adds.

Use Flexprice’s On-Prem Feature to Simplify Your Billing Stack

Use Flexprice’s On-Prem Feature to Simplify Your Billing Stack

How much data control and residency does self-hosted billing give you?

Complete control, because usage events carry customer identifiers and never leave the perimeter you own. Flexprice deploys three ways on the same engine:

  • Inside your own VPC on AWS, Azure or GCP.

  • On-prem in your own data centre, in any geography, with an air-gapped option.

  • Flexprice cloud, region-isolated across the US, India and the EU, so a region's data stays inside it.

SOC 2 Type II certifies Flexprice as an operator, so a build you deploy yourself can't inherit it. The managed deployment carries it, on the Mission Critical plan.

Is open source billing cheaper than managed SaaS billing?

Only when your platform team already runs the components, because the licence is free and the operations get billed in engineering hours. Flexprice charges a flat fee per plan, never a share of revenue.

Your situation

What I'd run

Data residency or air-gap requirement

Self-host, or managed on-prem on Mission Critical

Kafka and a columnar store already in production

Self-host the AGPL-3.0 build, $0 in licence

Under 100K events a month, no platform team

Basic, free, on Flexprice's published plans

Past 1M events with no on-call to spare

Build at $500 a month, or Scale at $1,000

Who should not self-host billing?

Teams without an on-call rotation that already covers stateful infrastructure. A Kafka partition problem at 2am becomes an invoicing incident by breakfast. 

Skip self-hosting if:

  • Nobody on your team operates a columnar store or an event broker in production.

  • Procurement needs a SOC 2 report, which only the managed deployment produces.

  • You're pre-revenue and an engineer's week costs more than the managed plan.

I'd rather say that than win an argument I'd lose by month three. Flexprice runs 20B+ events monthly for 100+ customers including Simplismart, Segwise and Vapi.

Frequently asked questions

How do you self host a usage billing system?

Clone the AGPL-3.0 repo, stand up the data tier, then point your events at it. Setup steps and sizing are in our self-hosted billing setup guide.

Which open source usage based billing platforms exist?

Flexprice and Lago under AGPL-3.0, OpenMeter under Apache-2.0, all read on 13 August 2026. Orb and Metronome named no self-hosting option the same day.

Does self-hosting billing actually save money?

Only if you already run the infrastructure. The licence costs $0 under AGPL-3.0, and the managed plans sit on our pricing page.

Where should you start?

Start with the repo. Clone github.com/flexprice/flexprice and check the components against what your platform team already runs. If Kafka and a columnar store are there, self-hosting is a small decision. If not, it's a hiring decision.



How much data control and residency does self-hosted billing give you?

Complete control, because usage events carry customer identifiers and never leave the perimeter you own. Flexprice deploys three ways on the same engine:

  • Inside your own VPC on AWS, Azure or GCP.

  • On-prem in your own data centre, in any geography, with an air-gapped option.

  • Flexprice cloud, region-isolated across the US, India and the EU, so a region's data stays inside it.

SOC 2 Type II certifies Flexprice as an operator, so a build you deploy yourself can't inherit it. The managed deployment carries it, on the Mission Critical plan.

Is open source billing cheaper than managed SaaS billing?

Only when your platform team already runs the components, because the licence is free and the operations get billed in engineering hours. Flexprice charges a flat fee per plan, never a share of revenue.

Your situation

What I'd run

Data residency or air-gap requirement

Self-host, or managed on-prem on Mission Critical

Kafka and a columnar store already in production

Self-host the AGPL-3.0 build, $0 in licence

Under 100K events a month, no platform team

Basic, free, on Flexprice's published plans

Past 1M events with no on-call to spare

Build at $500 a month, or Scale at $1,000

Who should not self-host billing?

Teams without an on-call rotation that already covers stateful infrastructure. A Kafka partition problem at 2am becomes an invoicing incident by breakfast. 

Skip self-hosting if:

  • Nobody on your team operates a columnar store or an event broker in production.

  • Procurement needs a SOC 2 report, which only the managed deployment produces.

  • You're pre-revenue and an engineer's week costs more than the managed plan.

I'd rather say that than win an argument I'd lose by month three. Flexprice runs 20B+ events monthly for 100+ customers including Simplismart, Segwise and Vapi.

Frequently asked questions

How do you self host a usage billing system?

Clone the AGPL-3.0 repo, stand up the data tier, then point your events at it. Setup steps and sizing are in our self-hosted billing setup guide.

Which open source usage based billing platforms exist?

Flexprice and Lago under AGPL-3.0, OpenMeter under Apache-2.0, all read on 13 August 2026. Orb and Metronome named no self-hosting option the same day.

Does self-hosting billing actually save money?

Only if you already run the infrastructure. The licence costs $0 under AGPL-3.0, and the managed plans sit on our pricing page.

Where should you start?

Start with the repo. Clone github.com/flexprice/flexprice and check the components against what your platform team already runs. If Kafka and a columnar store are there, self-hosting is a small decision. If not, it's a hiring decision.



Share it on:

Ship Usage-Based Billing with Flexprice

Ship Usage-Based Billing with Flexprice

Ship Usage-Based Billing with Flexprice

More insights on billing

More insights on billing

Get Instant Feedback on Your Pricing | Join the Flexprice Community with 400+ Builders on Slack

Join the Flexprice Community on Slack