Start free
Guide · Usage-based billing

Per-customer API usage billing

Usage-based billing only works if you can say, for each customer, how many requests they made this month and on which plan. This page walks through the pieces you need and how API Meter covers the counting step.

1. Identify the customer on every request

Pick one stable identifier per customer: your internal account ID, not an email. With API Meter you return it in a response header (X-MSA-Customer-Id, plus X-MSA-Plan for the plan). The proxy reads both and strips them before the response reaches the client. If you don't set them, API Meter falls back to a hash of the API key, so raw keys are never stored. See the headers docs.

2. Count requests per customer, endpoint and plan

Change your API's base URL to your API Meter proxy URL. Every request is forwarded to your origin and counted with its customer, plan, normalized endpoint (for example /v1/orders/:id), status and latency. No request bodies and no client IPs are stored.

3. Decide what is billable

4. Export monthly totals to billing

At the end of each period, export per-customer counts from the dashboard (CSV) and feed them to your invoicing or billing tool. Direct Stripe metered-billing sync is on the roadmap, not built yet.

What API Meter costs

Free up to 250,000 requests a month. Indie is CA$19/month with 2M requests included, then CA$3 per extra million (checkout coming soon). Prices are in Canadian dollars.

Honest beta limits: during early access, event capture is capped at about 1,000 events per day across all APIs and events are kept for 7 days, so API Meter is suited to trying the setup and low-volume APIs today, not to month-end invoicing at scale. Traffic is always forwarded, even past the cap.

Try it

Start free, no card See the live demo dashboard

Related: Usage-based API pricing · API usage analytics per customer