charge_policy_version: 1

Charge Policy & Billing Lifecycle

Double-entry accounting with micro-USD reservations and automatic release on failures.

Outcome Billing Matrix

Request OutcomeBilled
Successful live 2xx response (including empty page)Charged
Authorized cache hit (same listed price)Charged
Playground Mock mode executionNot Charged
Validation (400), Auth (401/403), Balance (402), Rate Limit (429)Not Charged
Upstream resource not found (404)Not Charged
Upstream timeout (504) or upstream/internal error (502/503)Not Charged
Duplicate request with matching Idempotency-KeyNot Charged

Reserve-Then-Settle Execution

  1. Authenticate key, check rate limits, validate query schema, and verify endpoint availability.
  2. Lock wallet row briefly to move the exact micro-USD price from available to reserved before any network I/O.
  3. Call upstream provider strictly outside database transactions under a deadline shorter than the reservation lease.
  4. Settle reserved funds to platform revenue on 2xx success or release back to available on any non-billable outcome.