Client-first billing model
Client inference credits, provider prices, ForgeRouter platform fees and provider payables are distinct billing concepts. ForgeRouter does not hide platform fees as a commission deducted from provider payouts.
Client wallet
- Inference credits: prepaid client balance used only for billable model usage.
- Top-up: add credits from Billing or Top up credits.
- Platform fee: ForgeRouter fees are charged separately during top-up or contract billing.
- Taxes: taxes are shown as separate accounting lines when applicable.
- Payments: Stripe or manual operations can fund the wallet; the wallet is not a provider payable account.
Provider price and pricing snapshots
The provider sets the public inference price per million tokens. Prompt, completion and cache token prices may be stored separately when supported. Every billable request stores the pricing version used at routing time.
- The client wallet is debited at the selected provider inference price.
- The provider payable accrues at the same provider price on valid usage by default.
- Any difference between public price and payout requires an explicit traceable reason: funded promotion, refund, fraud, tax or contractual adjustment.
Append-only ledger
Ledger entries are appended, not mutated. Corrections use refunds or adjustments linked to the original request, purchase or statement.
[
{"account_type": "client_wallet", "entry_type": "topup_credit", "amount": "20.00"},
{"account_type": "platform_revenue", "entry_type": "platform_fee", "amount": "1.76"},
{"account_type": "client_wallet", "entry_type": "usage_debit", "amount": "-0.15", "request_id": "req_..."},
{"account_type": "provider_payable", "entry_type": "provider_accrual", "amount": "0.15", "request_id": "req_..."},
{"account_type": "provider_reserve", "entry_type": "reserve_hold", "amount": "-0.02", "statement_id": "stmt_..."},
{"account_type": "client_wallet", "entry_type": "refund", "amount": "0.15", "reason": "provider_error_adjustment"},
{"account_type": "provider_payable", "entry_type": "adjustment", "amount": "-0.15", "reason": "fraud_or_refund"}
]
Usage billing flow
- Preflight checks key status, policy, wallet balance, budget, RPM/TPM and provider capacity before the provider call.
- A reservation is created for the expected request budget.
- Token accounting uses provider-reported usage when valid, then gateway estimation or reconciliation rules when needed.
- Finalization is idempotent so retries do not duplicate debit or provider accrual entries.
- Reconciliation flags mismatches for admin review without editing existing ledger rows.
Clients can inspect billing impact in request history.
Provider statements
Provider statements summarize a period; they are statement amounts, not freely withdrawable client wallet credits.
- Period start and end
- Gross payable
- Reserve held and reserve released
- Refunds and adjustments
- Net payable
- Paid status
Providers review them from provider statements.
Admin billing operations
- Stripe reconciliation compares payments, credit purchases, platform fee entries and wallet credits.
- Wallet mismatch investigations create traceable adjustments instead of overwriting balances.
- Provider statement corrections are appended as refunds, reserve changes or adjustments.
- Fraud and refund decisions require explicit metadata and an audit trail.
- Admins use billing ops, request exports and provider statement screens for review.