HomeSaaS & SubscriptionsUsage-Based Billing

Usage-Based Billing

Metered SaaS billing with tiered pricing, usage aggregation, credits, and invoice generation

SchemaVerse
SaaS & SubscriptionsPostgreSQLSaaSNormalizedTime-series
1
0
0
usage-billing.dbml
12 tables|17 relations

About this Schema

Overview

Usage-based billing system for metered SaaS products. Tracks consumption, applies tiered pricing, manages prepaid credits, and generates detailed invoices.

Key Design Decisions

  • Metered Events: Record every billable event with timestamps
  • Tiered Pricing: Different rates based on usage volumes
  • Credit System: Prepaid credits with automatic deduction
  • Invoice Aggregation: Monthly billing cycles with itemization

Tables

12 tables including usage events, pricing tiers, credit balances, invoices, subscriptions, and payment methods. Handles complex billing scenarios like prorations and refunds.

Comments

Sign in to comment on this schema

Loading comments...