~/Rev_

A Provider-Agnostic Bank Layer, and Why It Paid Off One Day Later

I wrote the bank-data layer behind an interface instead of against one vendor. The next day that vendor wasn't available to me, and switching cost one adapter.

work: 9 Nov 2026 · Built · DecoupleX Finance, Fintech, TypeScript, API Design

The decision

The first plan used Teller's free developer tier for me and a few testers, with Plaid later at scale (better coverage, 24 months of history, card liabilities data). Since a switch was already planned, nothing above the ingest layer was allowed to know which provider was underneath:

interface Source {
  accounts(): Promise<Account[]>;
  transactions(cursor?: string): Promise<{ items: Txn[]; next?: string }>;
}

The Teller adapter, the CSV importer and (later) the Plaid adapter all implement it. Every adapter's results go through one merge step, where live data wins over CSV backfill.


Teller's undocumented sign convention

Teller's docs didn't state whether a purchase arrives as a positive or negative amount. Guessing wrong silently inverts every forecast, so the adapter infers the sign from running balances: if the balance falls by the transaction amount, it's a debit. When the inference comes from a majority vote rather than a clean match, it raises a warning to verify on the first live sync.

The adapter also redacts the access token from any error it throws, so a failed request can never print a credential into a log.


The pivot

Teller sign-up turned out not to be available to me. Plaid was. The swap was a new adapter and nothing else. The engine, the merchant recognition, the review queue and the pages didn't change.


CSV stays forever

The CSV importer handles auto-detected headers, signed or split debit/credit columns, bank preambles above the header row, and idempotent row IDs, so importing the same file twice changes nothing. It's the fallback for any bank no provider covers, and for anyone who'd rather not connect a bank.


Lessons

  • Put the interface where you already expect a change.
  • Don't guess a sign convention. Infer it from data you trust, and flag it when the evidence is weak.
  • Imports must be idempotent. People will upload the same file twice.

Sources: DecoupleX build log, "ingest v0.1" (9 Nov 2026); DecoupleX Finance roadmap, Shipped: Plaid (9–10 Nov 2026)