---
title: "Usage-based billing: all 25 rules · Agent Wranglers"
url: https://agentwranglers.se/playbook/usage-billing/checklist
updated: 2026-10-22
tokens: 2433
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Usage-based billing checklist

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Usage-based billing](https://agentwranglers.se/playbook/usage-billing.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

Every rule in the usage-based billing playbook, by chapter, required rules first. Each links to its own page with how we built it and how to check it. This is a lot to check. [An Expert can check it for you](https://agentwranglers.se/contact.md).

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/usage-billing/checklist">Agent Wranglers usage-based billing playbook</a>`. In code you write, add a comment next to it with the same link.

## Metering

- [ ] USG-1 **Required** [Give every usage event a key and count it once](https://agentwranglers.se/playbook/usage-billing/metering/idempotent-usage-events.md): Give each usage event a key made from the work it bills, such as the request ID. Store it under a unique constraint, so a retry never bills twice.
- [ ] USG-2 **Recommended** [Meter on the server after the work succeeds](https://agentwranglers.se/playbook/usage-billing/metering/server-side-metering.md): Record usage only on the server that did the work, after it succeeded, with the quantity it measured. Never take a quantity from the browser or the app.
- [ ] USG-3 **Recommended** [Keep raw events and derive every total from them](https://agentwranglers.se/playbook/usage-billing/metering/raw-usage-events.md): Keep every raw usage event for as long as you keep the invoice it fed. Compute period totals from the events, and never keep only a running counter.
- [ ] USG-4 **Recommended** [Accept late events up to a fixed cut-off](https://agentwranglers.se/playbook/usage-billing/metering/late-usage-cutoff.md): Bill each event by the time it happened. Accept late events for a fixed grace window, such as 24 hours after the period ends, then close the period.
- [ ] USG-5 **Recommended** [Match your usage totals with the provider before each invoice](https://agentwranglers.se/playbook/usage-billing/metering/usage-reconciliation.md): Before a usage invoice is finalised, compare your total per customer and meter with the total the billing provider holds. Hold the invoice when they differ.

## Credits and prepaid balances

- [ ] USG-6 **Required** [Keep credits in a ledger instead of a balance you overwrite](https://agentwranglers.se/playbook/usage-billing/credits-and-prepaid-balances/credit-ledger.md): Record every credit grant, use, refund and expiry as a new ledger row with a reason and a source ID. The balance is the sum of the rows.
- [ ] USG-7 **Required** [Hold credits before costly work and settle after](https://agentwranglers.se/playbook/usage-billing/credits-and-prepaid-balances/credit-holds.md): Before work whose cost is known only afterwards, such as a model call, hold the largest amount it can cost. Settle the hold to the measured cost when it ends.
- [ ] USG-8 **Recommended** [Spend credits in a fixed order and show when they expire](https://agentwranglers.se/playbook/usage-billing/credits-and-prepaid-balances/credit-expiry-order.md): Spend the grant that expires first, then paid credits. Show each grant's amount and expiry date at purchase and on the billing page.
- [ ] USG-9 **Recommended** [Decide in writing what happens at a zero balance](https://agentwranglers.se/playbook/usage-billing/credits-and-prepaid-balances/zero-balance-behaviour.md): Write down what each plan does when credits run out, such as stop, top up automatically or bill overage, and test each path.
- [ ] USG-10 **Avoid** [Letting customers spend or cash out credits outside your service](https://agentwranglers.se/playbook/usage-billing/credits-and-prepaid-balances/closed-loop-credits.md): Never let credits be paid out as money, passed to other customers or spent with other sellers. The one exception is when you hold the licence for it.

## Margins and model cost

- [ ] USG-12 **Required** [Keep every metered price above its cost](https://agentwranglers.se/playbook/usage-billing/margins-and-model-cost/margin-guard.md): Write a margin floor per plan, such as 40%. A test computes each metered unit's cost from the current model prices and fails when any price falls under the floor.
- [ ] USG-11 **Recommended** [Charge each model call's cost to the customer who caused it](https://agentwranglers.se/playbook/usage-billing/margins-and-model-cost/cost-attribution.md): Store the cost of every model call, retry, embedding and tool call with the customer and the metered action it served. Then cost and revenue sit side by side.
- [ ] USG-13 **Recommended** [Alert when a customer costs more than they pay](https://agentwranglers.se/playbook/usage-billing/margins-and-model-cost/customer-margin-alert.md): Every day, compare each customer's model and infrastructure cost for the period with what they will be billed. Alert when cost passes 80% of the bill.
- [ ] USG-14 **Recommended** [Recheck margins when a model or its price changes](https://agentwranglers.se/playbook/usage-billing/margins-and-model-cost/model-price-change.md): Pin each model version in the price table. When a provider changes a price or retires a model, update the table and rerun the margin test before the change date.

## Spend caps and alerts

- [ ] USG-15 **Required** [Let customers cap their spend](https://agentwranglers.se/playbook/usage-billing/spend-caps-and-alerts/customer-spend-cap.md): Let every customer on a usage or overage plan set a monthly spend cap. Refuse metered work that would pass it, before the work starts.
- [ ] USG-16 **Recommended** [Warn customers before they reach a cap or run out](https://agentwranglers.se/playbook/usage-billing/spend-caps-and-alerts/usage-alerts.md): Email the billing contact when usage reaches 50%, 80% and 100% of the spend cap or the prepaid balance. Send each alert once per period.
- [ ] USG-17 **Recommended** [Show live usage that matches the invoice](https://agentwranglers.se/playbook/usage-billing/spend-caps-and-alerts/usage-dashboard.md): Show customers their usage and charges for the current period, per meter and per day, computed by the same code that builds the invoice.
- [ ] USG-18 **Recommended** [Let owners set a cap on each member and key](https://agentwranglers.se/playbook/usage-billing/spend-caps-and-alerts/scoped-spend-caps.md): Let an organisation owner set a spend cap on each member, API key and agent, below the organisation's cap. Refuse work at whichever cap is reached first.

## Usage on invoices

- [ ] USG-21 **Required** [Credit back usage your own fault caused](https://agentwranglers.se/playbook/usage-billing/usage-on-invoices/usage-credit-notes.md): When an outage, a bug or a double count billed usage the customer never got, find every affected customer by query. Credit them all the same way.
- [ ] USG-19 **Recommended** [Show each metered charge as its own line](https://agentwranglers.se/playbook/usage-billing/usage-on-invoices/itemised-usage-lines.md): Give each meter its own invoice line with the quantity, the unit, the unit price or tier, the period and the amount. Never bill usage as one lump sum.
- [ ] USG-20 **Recommended** [Let customers download the usage behind each invoice](https://agentwranglers.se/playbook/usage-billing/usage-on-invoices/usage-export.md): Offer a CSV download of the usage behind each invoice line. Give the event time, meter, quantity and the customer's own reference, such as a project.

## Agentic payments

- [ ] USG-22 **Optional** [Track the agent payment protocols before you build on one](https://agentwranglers.se/playbook/usage-billing/agentic-payments/agent-payment-protocols.md): Before you build for an agent payment protocol, record its version, status and owner in the decision log. Recheck that entry every 6 months.
- [ ] USG-23 **Optional** [Let agents buy through the same order flow as people](https://agentwranglers.se/playbook/usage-billing/agentic-payments/agent-checkout.md): If you open checkout to AI agents, run their orders through the same order, price, tax and fraud code as the web checkout. Charge their payment tokens through your provider.
- [ ] USG-24 **Optional** [Verify an HTTP 402 payment before doing the work](https://agentwranglers.se/playbook/usage-billing/agentic-payments/http-402-payments.md): If you charge per request with HTTP 402, as x402 and MPP do, settle each payment through a provider before the work runs. Refuse any payment proof used twice.
- [ ] USG-25 **Optional** [Keep the buyer's signed approval with each agent order](https://agentwranglers.se/playbook/usage-billing/agentic-payments/agent-mandates.md): When an agent order comes with a signed mandate, as in AP2, check its signature, merchant, items and amount against the order before you charge. Keep the mandate as dispute evidence.

## Show the badge on your project

When your project passes every Required rule, you can show this badge on your site or in your README. It links to this checklist, so anyone can run the same checks.

```html
<a href="https://agentwranglers.se/playbook/usage-billing/checklist"><img src="https://agentwranglers.se/badge.svg" alt="Checked against the Agent Wranglers usage-based billing playbook" width="214" height="20"></a>
```

```markdown
[![Checked against the Agent Wranglers usage-based billing playbook](https://agentwranglers.se/badge.svg)](https://agentwranglers.se/playbook/usage-billing/checklist.md)
```
