Skip to content
V-Sum

Modern Treasury

Modern Treasury Technical Briefing

Published June 14, 2022

Modern Treasury Technical Briefing thumbnail

Supported by Modern Treasury , IowaEDA and Brale

Overview

Koji, PM at Modern Treasury, walks through Modern Treasury Ledgers — a managed double-entry ledger API for fintechs like Revolut and Marqeta, marketplaces like ClassPass and Outdoorsy, and anyone building money-movement apps. The demo builds out "BillFold," a sample digital wallet, and walks through the patterns Modern Treasury has seen in production: custom ISO currencies (including USDC with a six-digit exponent for stablecoin-native apps), pending-vs-posted states for in-flight payments, immutable pending transactions with full audit trails, combined payment-plus-ledger API calls, and optimistic locking for just-in-time card funding flows alongside card issuers like Lithic and Marqeta. The closing pattern — purely in-ledger transactions between user accounts — makes user-to-user transfers essentially instant without ever touching an external rail.

0:00 Introduction to Modern Treasury Ledgers

Koji, PM at Modern Treasury, introduces the Modern Treasury Ledgers API — a managed double-entry ledger for fintechs like Revolut and Marqeta, marketplaces like ClassPass and Outdoorsy, and anyone building money-movement apps.

1:00 Creating a ledger object (custom USDC currency)

Live walk-through of creating a Modern Treasury ledger in the dashboard (and the public API docs), including a custom USDC currency with a six-digit exponent for stablecoin-native apps.

2:00 The BillFold demo wallet — accounts and balances

A sample wallet app called BillFold is used to show core ledger objects — user ledger accounts, a cash account, and a card settlement account — and the posted vs pending balances tracked on each.

2:30 Double-entry ledger transactions

Why every money movement in the ledger has matching credits and debits — the pattern good fintechs use, whether the movement happens inside the app (user-to-user) or across external rails.

3:30 Pending vs posted — modelling money in flight

How Modern Treasury models payments as pending before they settle and posted after, so ACH in-transit or card authorizations are tracked accurately before they clear.

4:30 Combined payment-and-ledger API call

A Postman walk-through of payment orders: Jane deposits money into BillFold. One API call moves funds between bank accounts and writes the matching ledger entries, with an external_id for idempotency.

5:30 Immutable pending transactions + audit trail

Pending Modern Treasury ledger transactions are immutable with a full audit trail — so card-authorization amount changes are captured as edits rather than overwrites and the full history is reconstructable.

6:30 Just-in-time card funding with Lithic / Marqeta

The common pattern of using Modern Treasury Ledgers to manage card balances in real time alongside card issuers like Lithic and Marqeta — authorizing swipes against the ledger, then posting once the card network confirms.

7:30 Optimistic locking for card race conditions

How the ledger avoids race conditions on high-throughput card flows: each account read returns a locked version, which the subsequent transaction must reference; the write only succeeds if the version hasn't moved.

Presented by Koji Murase Modern Treasury · LinkedIn · website

Topics: Payments, Treasury, Developer Tools

More from V-Sum Fifteen