Flow
Cost Recording
When a usage event occurs:- Verify organization has active subscription
- Verify token is ACTIVE
- Verify fee is compatible with org currency
- Calculate exchange rate (token currency → org currency)
- Create Cost record with
costBatchWindowRef
Cost Batching
Costs are grouped into batches bycostBatchWindowRef (hash of eventName, orgId, timestamp window). Batches are settled and reported to Stripe billing meters.