SaaS Billing Starter database schema

The SaaS Billing Starter database schema is a DB Planner template with 10 tables, 67 columns and 11 relationships, free to use. Core tables include account_members, accounts, credit_notes, invoice_lines. It can be opened as an interactive diagram or exported as PostgreSQL, MySQL, or MSSQL DDL.

Entity relationship diagram for the SaaS Billing Starter schema, showing 10 tables
FIG. 1 — entity relationship, 10 tables
Tables
10
Columns
67
Relationships
11
Category
SaaS
Exports
DBML, SQL, C#
Price
Free

What this schema models

A billing schema for a multi-tenant SaaS product. Accounts are the billable entity rather than users, so seats, invoices and payment methods hang off an account and a person can belong to several. Money is stored in minor units as integers, never floats. Invoice totals are snapshotted at issue time so a later price change cannot rewrite history, and refunds are recorded as credit notes rather than subtracted from the original invoice. Includes subscriptions with period boundaries and cancel-at-period-end, invoice lines, payments with a processor reference, and card display fragments only.

Tables (10)

Tables in the SaaS Billing Starter schema and how many columns each has
TableColumns
account_members6
accounts5
credit_notes5
invoice_lines6
invoices12
payment_methods7
payments7
plans6
subscriptions9
users4

Relationships (11)

  • account_members.account_id references accounts.id many to one
  • account_members.user_id references users.id many to one
  • accounts.owner_id references users.id many to one
  • credit_notes.invoice_id references invoices.id many to one
  • invoice_lines.invoice_id references invoices.id many to one
  • invoices.account_id references accounts.id many to one
  • invoices.subscription_id references subscriptions.id many to one
  • payment_methods.account_id references accounts.id many to one
  • payments.invoice_id references invoices.id many to one
  • subscriptions.account_id references accounts.id many to one
  • subscriptions.plan_id references plans.id many to one

How to use this template

  1. Open the diagram to see the tables and how they relate.
  2. Copy it into your workspace. You get your own editable copy.
  3. Export it as PostgreSQL, MySQL, or MSSQL DDL, or as C# models.

Frequently asked questions

What is in the SaaS Billing Starter schema?
10 tables and 11 relationships, across 67 columns. The table names and the full relationship list are shown on this page.
Can I export it to PostgreSQL or MySQL?
Yes. Every DB Planner template exports as DBML, PostgreSQL, MySQL, or MSSQL DDL, and as C# models.
Is this template free?
Yes. You can open it in the browser without an account, and copy it into your own workspace with a free DB Planner account.
Can I change it after copying it?
Yes. A copy is yours: you can rename tables, add columns, and export it. Changes the author makes later do not affect your copy.