techlist.io

Usage Based Billing

2 posts

OpenAI2026-02-123 min readCurated summary

Beyond rate limits: scaling access to Codex and Sora

# Scaling Codex and Sora Beyond Rate Limits with a Hybrid Credits System OpenAI found that rate limits alone frustrate engaged users, while pure usage-based billing charges people from the first token. To bridge the gap, they built an in-house access engine that treats rate limits and prepaid credits as layers in a single decision flow. Each request is evaluated in real time, so users keep working past their limits without interruption, and every charge is traceable and auditable. ## Why Existing Access Models Fell Short - Rate limits protect capacity and fairness, but users who hit them get a "come back later" dead end. - Usage-based billing is flexible, but it charges from the first token, which discourages early exploration. - Raising rate limits would erode demand smoothing and capacity, while purely asynchronous billing introduces lag, overages, and reconciliation problems. - The required system had to enforce rate limits first, switch to credits within the same request, make that decision in real time, and track credit consumption with rigorous accuracy. ## Access as a Waterfall - Instead of asking "is this allowed?", the system asks "how much is allowed, and from where?" - Rate limits, free tiers, credits, promotions, and enterprise entitlements are all layers in one decision stack. - Users never "switch systems," which is why credits feel invisible in daily use. ## Why They Built It In-House Third-party metering and billing platforms suit invoicing and reporting, but they fell short on two requirements: - **Real-time correctness:** Delayed or best-effort counting causes surprise blocks, inconsistent balances, and incorrect charges. - **Reconcilability and trust:** Every outcome needed to be explainable, including why a request was allowed or blocked, how much usage it consumed, and which limits or balances applied. That level of visibility required tight integration with the decision waterfall. ## A High-Scale Usage and Balance System - Tracks usage per user and per feature - Maintains rate-limit windows and real-time credit balances - Debits balances idempotently through a streaming async processor - Routes every request through one evaluation path that synchronously consumes rate limits and verifies credit sufficiency, then returns a single outcome while settling credit debits asynchronously. This keeps behavior consistent across products and avoids duplicated logic across teams. ## A Provably Correct Billing System The system maintains three linked datasets, each triggering the next: - **Product usage events:** What the user actually did, published for all activity whether or not it consumed credits, providing an audit trail that explains every charge or non-charge. - **Monetization events:** What the user is charged for their usage. - **Balance updates:** How much the credit balance changed and why. Key mechanisms: - **Stable idempotency keys** on every event ensure retries, replays, or worker restarts can never double-debit a balance. They also enable offline batch reconciliation. - **Near-real-time asynchronous balance updates** trade a small delay for auditability. If that delay causes a balance overshoot, the user is automatically refunded, so the team prioritizes provable correctness and trust over strict enforcement. - **Atomic transactions** decrease the credit balance and insert a Balance Update record together. Updates are serialized per account, so concurrent requests cannot race to spend the same credits, and every adjustment links back to the monetization event that triggered it. ## Architecture in Service of Momentum The design goal is to keep users working. Real-time balances prevent unnecessary interruptions, atomic consumption prevents double-charging, and unified access logic makes behavior predictable. The team treats the underlying access, usage, and billing as one system, and expects the same foundation to extend beyond Codex and Sora to other products.

Stripe2026-01-232 min readCurated summary

Metronome + Stripe: Building the future of billing

Stripe has finalized its acquisition of Metronome to strengthen Stripe Billing’s usage-based and hybrid billing capabilities. The combined platform will support everything from self-serve subscriptions to complex, sales-led contracts and large-scale AI product catalogs. Stripe’s goal is a unified monetization system covering billing, payments, analytics, revenue recognition, and tax. ## Expanding Usage-Based Billing - Stripe Billing already supports thousands of customers, including rapidly growing AI companies. - Existing models include: - Credit burndown, used by Lovable - Outcome-based billing, used by Intercom - Subscriptions, used by Anthropic - Metronome adds expertise in complex usage-based billing and strengthens Stripe’s ability to support evolving pricing models. ## Supporting Complex Product Catalogs - The combined platform will handle product catalogs with thousands of SKUs. - Multidimensional metering will support sophisticated AI infrastructure pricing, such as OpenAI’s models. - Custom contracting will serve companies combining sales-led growth with usage-based pricing, including Confluent and Anyscale. ## One Platform for Multiple Sales Models - Stripe plans to support: - Self-serve product-led growth - High-touch enterprise sales - Purchases through cloud marketplaces - Metronome customers will gain access to Stripe’s global reach and reliability. - Integrated payments, analytics, revenue recognition, and tax tools are intended to reduce the need for separate systems and specialized engineering teams. ## Monetization as Product Development - Stripe argues that pricing and monetization are becoming active parts of product strategy rather than back-office operations. - Flexible billing infrastructure allows companies to experiment with pricing and adapt as their products and markets evolve. - The long-term goal is a billing platform suitable for startups as well as public companies operating globally. Stripe recommends that businesses interested in modern usage-based or hybrid monetization explore the combined Stripe Billing and Metronome offering.