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.
- 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)
| Table | Columns |
|---|---|
| account_members | 6 |
| accounts | 5 |
| credit_notes | 5 |
| invoice_lines | 6 |
| invoices | 12 |
| payment_methods | 7 |
| payments | 7 |
| plans | 6 |
| subscriptions | 9 |
| users | 4 |
Relationships (11)
account_members.account_id references accounts.idmany to oneaccount_members.user_id references users.idmany to oneaccounts.owner_id references users.idmany to onecredit_notes.invoice_id references invoices.idmany to oneinvoice_lines.invoice_id references invoices.idmany to oneinvoices.account_id references accounts.idmany to oneinvoices.subscription_id references subscriptions.idmany to onepayment_methods.account_id references accounts.idmany to onepayments.invoice_id references invoices.idmany to onesubscriptions.account_id references accounts.idmany to onesubscriptions.plan_id references plans.idmany to one
How to use this template
- Open the diagram to see the tables and how they relate.
- Copy it into your workspace. You get your own editable copy.
- 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.