Getlago

Oct 9

/

2 min read

Price Usage by Dimension with Lago Pricing Group Keys

Anh-Tho Chuong

Anh-Tho Chuong

Share on

LinkedInX

If a customer’s usage costs a different amount by model, region, cloud provider, or service tier, one flat rate hides the economics. Creating a separate product for every combination makes the catalog hard to maintain. Lago’s pricing group keys let one usage charge price event groups separately.

One charge, distinct billable groups

Add a pricing group key, such as region, to a charge. Send usage events with that property. Lago groups the events by their value and creates a separate fee for each group, with its own quantity and amount. Values come from the events; you do not have to list every possible region when you define the key. A charge can use more than one pricing group key, and the feature works with Lago’s charge models. The current group-key documentation shows the dashboard and API configuration.

Imagine a storage metric that sums gigabytes. A customer uses 10 GB in one region and 15 GB in another. With region as a pricing group key, the invoice has two usage fees. If both groups are priced at $1 per GB, the fees are $10 and $15. If the commercial rates differ by region, each group can be priced independently. The customer can see the units and charge for each region instead of one unexplained total.

Choose pricing or presentation deliberately

Not every dimension should change price. Lago also has presentation group keys: they break down a fee’s units by a property, while the charge is priced once. Use a pricing key when the dimension changes the billable fee or rate. Use a presentation key when finance or the customer only needs to see where usage came from. For tiered or other nonlinear pricing, that choice matters: splitting usage into independently priced groups can change the total, while a presentation breakdown does not. Lago allows the two kinds of keys on the same charge.

Test the invoice before rolling it out

Pick one customer and one metric. Send events for two values of the pricing key, then inspect the usage response and invoice. Check the metric’s aggregation, each group’s quantity and rate, and the sum of the fees. Add an event with a missing or unexpected property and confirm the behavior you want before production. Repeat the test with a negotiated rate or pricing change if your contracts use one.

The useful outcome is a smaller catalog and an invoice whose dimensional charges can be traced back to usage. Pricing group keys were introduced in Lago’s 2025 product updates; this guide reflects the current documented behavior, not a new launch announcement. For implementation details, start with the group-key guide.

Anh-Tho Chuong

Anh-Tho Chuong

Anh-Tho Chuong is the co-founder and CEO of Lago, the open-source billing platform. She writes about pricing, business models as code, and using product as a monetization lever.


Share on

LinkedInX

Lago solves complex billing.