API Billing Reconciliation
Match downstream usage, upstream charges, and payment settlements to find missing records, billing drift, wallet funding errors, and negative-margin API traffic.
Three-ledger reconciliation workbench
Selected files stay in this browser. Consumption revenue, wallet funding, and processor settlement remain separate so prepaid credits are not mistaken for earned revenue.
1. Consumption ledger
Customer charges, usage refunds, model and request IDs.
2. Upstream billing
Provider costs, credits, channels and request IDs.
3. Funding ledger
Payment captures, fees, refunds and wallet credits.
Reconciliation result
Amounts use decimal arithmetic. Exact request matching requires a shared request ID.
Action queue
Critical financial leaks first; completeness notices remain informational.
Request req_1002 cost more upstream than the recognized consumption revenue.
req_1002
Failed request req_1004 still has a net customer charge.
req_1004
Upstream charge req_orphan_upstream has no matched downstream usage record.
req_orphan_upstream
Settled payment pay_9002 issued less wallet credit than the captured amount.
pay_9002
Payment pay_9003 issued wallet credit without a settled capture.
pay_9003
No unique upstream charge matches request req_1004.
req_1004
Funding reconciliation
- Net settled cash
- $29.43
- Processor fees
- $0.57
- Payment refunds
- $0.00
- Wallet credits issued
- $33.00
Funding is shown separately from consumption revenue. A top-up increases wallet liability until the customer consumes it.
Automate this workflow
Use the connector manifest, native normalizer, and stateless reconciliation API with New API, One API, one-hub, or VoAPI exports.
Read API documentationMargin by model
Unmatched upstream charges remain visible as cost with no recognized revenue.
| Model | Requests | Revenue | Upstream | Profit | Margin |
|---|---|---|---|---|---|
| claude-sonnet | 1 | $0.052 | $0.061 | -$0.009 | -17.3% |
| gemini-image | 1 | $0.04 | $0.027 | $0.013 | 32.5% |
| gpt-5.4-mini | 2 | $0.027 | $0.0225 | $0.0045 | 16.7% |
Frequently asked questions
Practical answers for applying this calculator to a production API billing or usage plan.
Does PayAPIKey upload or store my gateway files?
The browser workbench calculates locally and does not upload selected files. The public API is stateless: it processes the submitted payload and returns a report without offering credential storage. Never include API keys, prompts, completions, cookies, or session tokens in an import.
Why are prepaid top-ups not counted as service revenue?
A top-up creates wallet credit that the platform still owes to the customer. The workbench recognizes usage revenue when that credit is consumed, while payment captures, fees, refunds, and wallet credits are reconciled in a separate funding ledger.
Which open-source gateways are supported?
The first release has a verified New API read contract, compatibility adapters for One API and one-hub, and canonical CSV or JSON import for VoAPI. Because fork APIs change, verify the connector manifest against the deployed version before automating live reads.
Can it reconcile cache, reasoning, image, and refund charges?
The canonical schema carries cache-read, cache-write, reasoning, media, expected-charge, refund, and payment fields. The report flags missing records and price-snapshot differences; exact model repricing depends on the fields supplied by the source export.
Related API billing guides
Read the concepts behind the calculator and adapt the examples to your own API pricing model.
How to Price an API: Cost, Margin, Usage and Billing Models
A practical API pricing guide for turning delivery cost, margin, usage volume, free tiers, and billing models into a paid API price.
Read guideAPI Charges Explained: How API Costs and Pricing Work
Understand API charges, billable units, cost per 1,000 requests, token pricing, credits, free tiers, and invoice examples.
Read guideAPI Billing Models: Usage-Based, Subscription, Credits and BYOK
Compare API billing models for developer products, including usage-based billing, subscriptions, credits, prepaid wallets, and bring-your-own-key.
Read guide