SaaS Pricing Models and Billing Architecture: Subscriptions, Usage, and Hybrid
Muhammad Zain
TelGates Team
Your billing architecture determines your revenue potential. Hardcoding pricing logic is a recipe for disaster. Here is how to build flexible billing systems.
The Three Main Pricing Models
- Flat-Rate / Tiered Subscriptions: (e.g., $9/mo for Basic, $29/mo for Pro). Easy to implement, predictable revenue, but limits upside.
- Usage-Based (Metered): (e.g., $0.01 per API call). Aligns cost with value, high upside, but unpredictable revenue. Common in developer tools and AI products.
- Hybrid: A base subscription fee + usage fees for overages. The sweet spot for most modern SaaS.
Stripe Integration Architecture
For a hybrid model, we architecture Stripe as follows: - Create Products and Prices in Stripe. - Subscribe the user to a base plan. - Use Stripe Metered Billing for usage. - Idempotency: When tracking usage, always send idempotency keys to Stripe. If your server crashes and retries the request, Stripe won't double-charge the user.
Usage Tracking Infrastructure
Do not track usage synchronously in your main database. It will crash under load. Instead: 1. Application fires a usage event. 2. Event goes into a message queue (Kafka or AWS SQS). 3. A background worker aggregates events (e.g., every 5 minutes). 4. The worker writes the aggregated usage to a time-series database (ClickHouse or TimescaleDB) and reports it to Stripe.
Feature Gating
Decouple billing from feature access. Use an internal entitlement system. Stripe tells you "User is on Pro Plan". Your entitlement system maps "Pro Plan" to `can_export_pdf = true`. This allows you to change pricing plans without rewriting application logic.