Design an Auditable Ledger with Balanced Entries

Quick Overview

Design an auditable double-entry ledger with atomic balanced postings, idempotency, exact money arithmetic, immutable corrections, and balance reconciliation.

Design an Auditable Ledger with Balanced Entries

Company: Stripe

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

Design a ledger service that records financial movements and supports reliable balance queries. Explain how entries are posted, how duplicate requests are handled, and how corrections preserve an audit trail. ### Constraints & Assumptions The source names a ledger design without its exact accounting model. Use double-entry bookkeeping as an explicit proposed design, with amounts in integer minor units or exact decimals and separate balancing per currency. Clarify account and transaction types before implementation. ### Clarifying Questions to Ask - Must postings balance within each currency, and are multi-currency conversions in scope? - Are pending movements distinct from posted entries? - Must balance reads include only committed postings or also reservations? ```hint Correct history by adding history Editing an old financial entry can erase the evidence needed to explain a balance. ``` ### What a Strong Answer Covers - Immutable journal transactions with balanced debit/credit entries. - Atomic posting, idempotency, and exact monetary arithmetic. - Derived/materialized balances and reconciliation. - Reversals or adjusting entries instead of silent history mutation. ### Follow-up Questions - How would you prevent two concurrent debits from violating a no-overdraft rule? - How would you rebuild a corrupted balance projection?

Overview: Design an auditable double-entry ledger with atomic balanced postings, idempotency, exact money arithmetic, immutable corrections, and balance reconciliation.

Read the full Stripe Software Engineer interview experience this question came from

Stripe logo
Stripe
Nov 8, 2026
mediumSoftware EngineerOnsiteSystem Design
0
0

Design a ledger service that records financial movements and supports reliable balance queries. Explain how entries are posted, how duplicate requests are handled, and how corrections preserve an audit trail.

Constraints & Assumptions

The source names a ledger design without its exact accounting model. Use double-entry bookkeeping as an explicit proposed design, with amounts in integer minor units or exact decimals and separate balancing per currency. Clarify account and transaction types before implementation.

Clarifying Questions to Ask Guidance

  • Must postings balance within each currency, and are multi-currency conversions in scope?
  • Are pending movements distinct from posted entries?
  • Must balance reads include only committed postings or also reservations?

What a Strong Answer Covers Guidance

  • Immutable journal transactions with balanced debit/credit entries.
  • Atomic posting, idempotency, and exact monetary arithmetic.
  • Derived/materialized balances and reconciliation.
  • Reversals or adjusting entries instead of silent history mutation.

Follow-up Questions Guidance

  • How would you prevent two concurrent debits from violating a no-overdraft rule?
  • How would you rebuild a corrupted balance projection?