Track 12 · Ledgers, schemas, APIs and billing in code
Accounting for Developers
If you build invoicing, billing, payments, marketplace or ERP software, you are building an accounting system whether you planned to or not. These lessons translate accounting rules into data models, invariants, state machines and production patterns.
4
modules
16
lessons
0%
complete
About 53 minutes of reading. Progress is saved in this browser only.
Course roadmap
Module 1
Concepts for engineers
The accounting rules your code must protect.
- Why Software Developers Need Accounting KnowledgeAny system that moves or records money is an accounting system. Borrowing accounting's rules (double entry, immutability, accrual timing) prevents a whole class of costly bugs.Beginner2 min
- Building a Double-Entry Accounting Engine in CodeA double-entry engine accepts journal entries only if their postings sum to zero, stores money as integers, never edits posted entries, and derives balances from postings.Intermediate3 min
Module 2
Data model and design
Schemas, ledgers, trial balances, reversals and audit trails.
- Chart of Accounts Database Design for DevelopersModel accounts as stable reference data with a type, normal balance, currency and optional parent. Never delete an account that has postings; deactivate it instead.Intermediate3 min
- Journal and General Ledger Database DesignStore journal entries as headers with immutable posting lines that sum to zero. Derive balances and the trial balance from postings, distinguish effective dates from created timestamps, and lock closed periods.Advanced2 min
- Building a Trial Balance from Ledger DataA trial balance aggregates integer postings per account as of an effective date, splits net balances into debit and credit columns, and asserts that column totals match to the minor unit.Intermediate3 min
- Reversals and Audit Trails in Accounting SystemsNever edit or delete a posted entry. Correct it with a reversing entry that mirrors the original, then post the correct entry, so the full history stays visible and every report can be reproduced.Intermediate2 min
Module 3
Workflows and integration
Invoices, payments and the APIs that feed the ledger.
- Invoice and Payment Lifecycle in Accounting SoftwareAn invoice is a workflow object backed by immutable ledger entries: drafts post nothing, issuing books receivable and revenue, and payments, credit notes, overpayments and write-offs each post balanced entries.Intermediate5 min
- Designing an Accounting APIAn accounting API exposes immutable ledger entries, enforces per-currency balance and idempotency on every write, uses explicit reversal endpoints instead of PATCH or DELETE, and supports deterministic as-of queries.Advanced4 min
Module 4
Production financial systems
Multi-currency, bank reconciliation, subscriptions, inventory, period close, tax and no-code.
- Multi-Currency Ledgers and Foreign Exchange in CodeStore both transaction-currency and functional-currency integer minor units plus the exact exchange rate snapshot on every posting, balance entries in both currencies, and book realised and unrealised FX differences explicitly.Advanced4 min
- Building a Bank Reconciliation EngineIngest bank feed lines idempotently by external transaction ID, link them to ledger postings through an append-only match table using staged exact, fuzzy and many-to-one rules, and surface unmatched bank items for adjustment.Advanced4 min
- Subscription Billing and Revenue Recognition SchedulesBook upfront subscription invoices to Unearned Revenue, generate deterministic period recognition schedules that allocate every remainder minor unit explicitly, and handle upgrades or cancellations prospectively without rewriting closed months.Advanced3 min
- Implementing Inventory Costing (FIFO and Average) in CodeTrack inventory costs—not just quantities—using row-locked FIFO cost layers or moving weighted average calculations, pairing every stock sale with a balanced COGS and Inventory journal entry.Advanced4 min
- Accounting Period Close and Locking in SoftwareModel accounting periods with open, soft_closed and locked states, enforce period locks in a database trigger on journal_entries, route late adjustments into the next open period, and automate balanced year-end closing entries.Advanced2 min
- Designing a Tax Calculation Engine for LedgersCompute tax-exclusive and tax-inclusive amounts with integer basis points, enforce one documented rounding mode per jurisdiction, snapshot applied tax lines immutably on issued invoices, and post VAT/GST to dedicated liability and asset accounts.Advanced4 min
- Payment Processor Reconciliation and Clearing AccountsUse a Processor Clearing asset account between customer card charges and bank payouts, book gross revenue and processing fees separately, and trace every refund, dispute and rolling reserve through clearing until bank settlement zeroes it out.Advanced4 min
- Accounting for AI and No-Code App BuildersEven in Airtable, Google Sheets, Notion or AI-generated Supabase apps, a 3-table model (Accounts, Entries, Lines) with automated balance checks prevents disappearing balances, overwrites and broken audit trails.Beginner4 min