Usage-based billing infrastructure
Keep metering independent from invoices. UsageBox records billable quantities, survives retries and late events, and gives your billing system an auditable number to rate.
A pricing rule can be corrected later. Missing usage usually cannot. Record quantity first, then let a billing system apply prices, credits, tax and invoice rules downstream.
Network retries are normal in production. An idempotent usage layer prevents the billing pipeline from interpreting the same logical event as additional consumption.
Retained raw events and rollups give engineering and finance a common trail when an invoice total looks wrong.
If the usage ledger belongs to the invoicing vendor, migrating vendors also means migrating the evidence behind every bill. Keep that record independently.
Requests, tokens, tasks, active users and other values are all metering signals. The billing model can change without rewriting instrumentation.
The public quickstart shows the exact usage request before signup. When it fits, create an API key and use the same contract in your server code.
Product boundary
UsageBox deliberately stops at quantity. It gives Stripe Billing, a custom ledger or another billing system trustworthy usage to work from instead of trying to replace every financial workflow.
Choose the usage signal, inspect the exact payload, then create a free key only when the contract fits your integration.