SaaS Subscription Database ER Diagram

Free template — view it below, open it in draw.io, or customize it with AI in seconds.

Customize with AI — free Open in draw.io

The prompt behind this diagram

An ER diagram for a SaaS subscription database: accounts, users (N per account), plans, subscriptions with status lifecycle, invoices, invoice_items, payments, usage_events, feature_flags per plan. Show primary keys, foreign keys and 1-N / N-N relationships.

Paste your own description (or Terraform / docker-compose / SQL schema) into draft1 and get a diagram like this for your exact system.

What this diagram shows

A SaaS subscription database models the core entities that track customer billing, feature access, and usage. The flow moves from account creation through subscription lifecycle management, usage metering, invoice generation, and entitlements enforcement. Accounts hold customer identity and contact data. Subscriptions track active plans and billing cycles. Usage records capture per-meter consumption (API calls, seats, storage). Invoices aggregate charges from subscriptions and overage usage. Entitlements define which features each plan tier unlocks. This schema handles recurring billing, usage-based charges, plan changes, and seat management while maintaining audit trails for disputes and compliance.

Key components

When to use it

Use this schema when building a SaaS application that charges on recurring subscriptions, usage, or both. It applies whether you offer tiered pricing, seat-based licensing, or metered consumption. Essential if you need to track active subscribers, forecast recurring revenue, dispute invoices, or audit entitlements. Avoid it for one-time purchases or affiliate marketplaces where transaction tracking alone suffices without lifecycle management.

Common mistakes

Adapting it to your system

Start by listing your plan tiers and their prices, then identify every consumable resource (seats, API requests, storage). Create a Usage_Meter row for each. Add custom fields to Accounts for your billing requirements (VAT ID, cost centre, internal ref). If you charge for feature access separately from consumption, add a Features table and junction it to Entitlements. If you support discounts or credits, add a Discounts table linked to Subscriptions or Invoices. Map your actual payment processor webhooks (Stripe, Zuora, Chargebee) to Invoice and Subscription status columns to stay synchronised.

More templates

AWS VPC Multi-AZ Architecture

A production AWS VPC layout template: public/private/data subnets across two AZs with NAT, RDS multi-AZ and S3 endpoin

AWS EKS Cluster Architecture

An EKS reference template: control plane, node groups, ALB ingress, ECR, IAM roles for service accounts and storage.

AWS ECS Fargate Architecture

Serverless containers on AWS: ALB, Fargate services, SQS decoupling, RDS and Redis — a production ECS template.

Azure 3-Tier Web Architecture

The Azure counterpart of the classic 3-tier stack: Front Door, App Gateway, App Services, SQL and Redis in a VNet.

GCP Web Application Architecture

A serverless GCP stack template: Cloud Run, Cloud SQL, Memorystore, Pub/Sub and CDN-fronted load balancing.

Kafka Event Streaming Pipeline

End-to-end event streaming: CDC ingestion, a three-broker cluster, stream processing and analytical sinks.

Data Lakehouse Architecture

Bronze/silver/gold lakehouse template: ingestion, Delta Lake zones, Spark + dbt transforms and a BI serving layer.