Daniel VossProduct engineer

Ridge Pay · 2025

Ridge

A reconciliation engine that had quietly become the reason finance closed the month late. I rebuilt it around an append-only ledger and made every settlement provable.

ClientRidge Pay
RoleLead engineer
Year2025
StackTypeScript, Postgres

Challenge

Ridge Pay moved money for 1,900 merchants. Every night a job matched processor reports against its own ledger, and every morning a finance analyst reconciled whatever the job got wrong. By the time I joined, that job took eleven seconds per merchant, retried blindly on failure, and had no way to explain a mismatch beyond a log line.

The real problem was not speed. It was that nobody could answer the only question that mattered: why does this settlement not balance? Without that, every fix was a guess and every guess made the next month harder.

Approach

I started by modelling the thing properly. Double-entry rows, one immutable table, and a rule that no process may update a settlement after it is written. Corrections become new entries with a reason attached, which is what auditors already expect from a ledger and what the old system was quietly avoiding.

Matching moved to a set-based query in Postgres with a composite index on merchant, currency and value date. The Go worker that used to fetch rows one at a time now streams batches and hands each merchant to a Temporal workflow, so a failure retries one merchant instead of the whole night.

Every run writes a reconciliation report: matched, unmatched, and the reason code for each mismatch, in the same transaction that closes the batch. Finance stopped asking engineering for a query.

Result

p95 reconciliation dropped from 11.4 seconds per merchant to 640 milliseconds, and failed settlements fell 41% in the first quarter, mostly because the reason codes exposed a rounding bug in a currency conversion path nobody had found in two years.

The month-end close moved from three days of manual matching to a report that is ready when the job finishes. Six months later the same code reconciles 4.2 million rows a night without a single manual correction.

640msp95 reconciliation
−41%failed settlements
4.2Mrows reconciled daily
“The first engineer who could tell us why a settlement did not balance. That changed how the whole finance team works.”
Priya Menon, Head of Finance, Ridge Pay

Stack

TypeScript service layer, Postgres 15 with partitioning by value date, Go for the matching worker, Temporal for orchestration, Grafana for the run dashboard.

TypeScriptPostgresGoTemporal