Billerang Logo
Back to all articlesTechnical Guide

Usage-Based Pricing Without Losing Your Mind (A Survival Guide)

February 24, 20268 min read

Congratulations! You've decided to charge based on actual usage. Your customers will love the fairness. Your engineering team will... have questions.

Usage-based pricing is the dream: customers pay for what they use, incentives are aligned, and your revenue scales with adoption. In practice, implementing it will test every assumption you have about what “simple” means. This is your survival guide.

Step 1: Define What a “Unit” Actually Is

This sounds trivial. It is not. If you're an API company, is a “unit” an API call? What about failed calls? Do those count? What about calls that time out on your end? What about a single API call that triggers three internal microservice calls? What about webhooks? Are those billable events?

If you're a storage company, is a unit a gigabyte stored? Per hour? Per day? Peak usage or average? What happens when a customer uploads 100GB, realizes they uploaded the wrong folder, deletes it 30 minutes later, and then gets a bill for 100GB?

The definition of your billable unit is a business decision, not a technical one. Get your product, finance, and engineering leads in a room. Close the door. Don't come out until you can write the unit definition in one sentence that a customer would understand. Then write it down. Frame it. Put it on the wall. You'll be referring to it every week for the next year.

Step 2: Metering. Real-Time or Batch?

Spoiler: the answer is “it depends,” and “it depends” will become your mantra for the duration of this project.

Real-time metering means capturing every event as it happens. Great for accuracy, terrible for your infrastructure budget. You need an event pipeline that can handle your peak traffic with headroom. Think Kafka or Kinesis, consumer groups, idempotency guarantees, and dead-letter queues for when things go sideways. And things will go sideways.

Batch metering means collecting raw events and processing them periodically. Simpler to build, but now you have a delay between usage and visibility. Your customer dashboards show stale data. And if your batch job fails at 2 AM on a Saturday, you need someone on-call who understands the metering pipeline, which is probably the one person who built it and is currently at their kid's birthday party.

The pragmatic answer: start with batch, invest in real-time when your scale demands it. But design your event schema as if you're going real-time from day one. Future you will be grateful.

The Usage-Based Billing Pipeline - from usage event to collection

Step 3: Rating. Turning Raw Events Into Money

This is where things get genuinely complicated. Rating is the process of taking a raw usage event (“customer X made an API call at timestamp Y”) and turning it into a monetary amount. And the pricing models are wilder than you think:

  • Tiered: first 1,000 calls at $0.01, next 9,000 at $0.008, above 10,000 at $0.005
  • Volume: hit 10,000 calls and ALL calls retroactively become $0.005 (yes, this is different from tiered)
  • Stairstep: 0-1,000 calls = $50 flat, 1,001-5,000 = $150 flat, and so on
  • Graduated: like tiered, but with different rate structures per tier (flat fee + per-unit in one tier, pure per-unit in another)
  • Time-of-use: different rates for peak vs. off-peak hours (common in energy, increasingly used in cloud)

Yes, these are all different things. Yes, your customers will ask for all of them. Yes, your sales team will promise at least two of them to a prospect before your engineering team has built any of them. This is the way.

Same Usage, Very Different Bills - comparing tiered, volume, and stairstep pricing for 10,000 API calls

Step 4: The Invoice Moment

Your invoice needs to say something like: “Dear customer, you used 1,247,832 API calls this month. Here is how we calculated your bill.” Sounds straightforward. Except now you need to show the tier breakdown, any committed-use discounts, credits applied from last month's overage dispute, the promotional rate from the sales deal, and the tax applied per line item because your customer has offices in three different states.

The invoice is also a legal document. It needs to comply with local regulations (EU invoicing directives, for example, require specific fields). It needs sequential numbering. It needs to be immutable once issued. If you need to change it, you issue a credit note. If your billing system treats invoices as mutable database rows, stop reading and go fix that. Seriously. Your auditors will thank you.

Step 5: Dunning. Because Some Bills Are... Surprising

Usage-based billing has a unique dunning challenge: bill shock. When a customer on a flat-rate plan misses a payment, it's usually a card expiry issue. When a usage-based customer disputes an invoice, it's often because they genuinely did not expect to owe that much. “I used how much?” is a conversation your support team will have regularly.

Smart dunning for usage-based billing includes:

  • Spend alerts before the invoice lands (80% of commitment reached, unusual spike detected)
  • Clear usage dashboards so customers can self-serve answers to "why is my bill this high?"
  • Configurable billing thresholds ("pause my account if I exceed $500 in a billing period")
  • Grace periods with degraded service instead of hard cutoffs
  • A human-readable invoice that actually explains the charges (see Step 4)

The Golden Rule

If your customer cannot predict their bill within a reasonable margin, you have a pricing problem, not a billing problem. Usage-based pricing should feel fair and predictable. If every invoice is a surprise, your pricing model is broken, no matter how accurate your metering is.

The best usage-based models pair consumption pricing with some form of predictability: committed-use discounts, spending caps, or hybrid models where a base subscription covers typical usage and overages are billed incrementally. The goal is transparency, not gotchas.

Want to see how Billerang handles metering, rating, and invoicing for usage-based models?

Explore the documentation →

Ready to stop building billing from scratch?

Billerang handles the billing infrastructure so your team can focus on what matters.