Skip to content

Usage metering

You can't bill for usage you haven't counted. Usage metering is counting what each customer uses (API calls, tokens, GB-hours) so you can bill for it. Payrudder takes usage events through one API, counts each event once and turns the totals into invoice lines.

What you get

  • Idempotency key per event: a retry comes back as a duplicate and is not counted again
  • SUM, COUNT, MAX, UNIQUE and LAST with exact decimal quantities
  • A late event doesn't touch a closed invoice. It lands on the next one as an adjustment line
  • After a price change the closed month is recalculated and only the difference is billed

How it works

  1. 1Define a meter, for example ai_tokens with SUM
  2. 2Send events from your backend with the API or an SDK
  3. 3Close the period and the totals become invoice lines
Screenshot of the Payrudder console for this feature.

Questions

What happens if my client sends the same event twice?

Each event carries an idempotency key. A second event with the same key comes back as a duplicate with the original event id and is not counted.

Can I fix usage after a month is closed?

Yes. Replay rebuilds a tenant's totals from the event log. Re-rating prices a closed period at the new price and bills only the difference as a correction invoice.

Start billing by usage

The free plan covers your first live payments. Hook up one meter, close a month in test mode, then go live.