Usage-based pricing fails when the metering model is unclear.
Before writing code, define the billable unit, the aggregation window, included units, overage rules, and customer-facing language. Then make usage ingestion idempotent so retries do not double-count events.
In Floatless, usage belongs to subscription items. That keeps usage tied to the customer contract and gives bill runs a clean source of truth.
Start with one metered product and one usage event. Validate the invoice. Then expand into tiers, minimums, and hybrid pricing.