← Projects

Ledger

Interactive tools for exploring payment processing and reconciliation logic. All data is generated locally — no external APIs, no real transactions.

Next.js · TypeScript · React · Client-side Data Generation


Context

In payment operations, data rarely lines up cleanly. Provider records and internal ledgers drift apart — through timing differences, failed writes, rounding errors, or currency handling edge cases. Reconciliation is the process of finding and resolving those gaps before they become financial discrepancies.

These tools make that process concrete. The Transaction Timeline surfaces patterns across a simulated 30-day window. The Reconciliation Explorer runs a configurable matching algorithm across provider and ledger datasets, classifying every discrepancy by type. Both are fully interactive and run entirely in the browser.


How Reconciliation Works

The matching algorithm works by iterating over provider transactions and attempting to find a corresponding ledger entry by transaction ID. When a match is found, it checks two configurable conditions: whether the amounts are within a defined tolerance (defaulting to one cent), and whether currencies match. A match that fails either condition is classified as a mismatch rather than silently dropped.

Mismatches fall into four categories: missing from the ledger entirely, present in the ledger but absent from the provider feed, amount discrepancy within the same record, and currency mismatch. Each is surfaced separately because the remediation path differs — a missing ledger entry requires a write, an extra entry requires investigation, and an amount mismatch may indicate a fee was applied mid-transit.

for (const provider of providerTransactions) {
  for (const ledger of ledgerEntries) {
    if (usedLedgerIds.has(ledger.transactionId)) continue;

    if (provider.id === ledger.transactionId) {
      const amountDiff = Math.abs(provider.amount - ledger.amount);
      const amountMatches = amountDiff <= options.amountTolerance;
      const currencyMatches =
        !options.currencyMatchRequired ||
        provider.currency === ledger.currency;

      if (amountMatches && currencyMatches) {
        matches.push({ provider, ledger });
        usedLedgerIds.add(ledger.transactionId);
        matched = true;
        break;
      } else {
        // ID matches but data doesn't — classify the mismatch type
        mismatches.push({
          type: !amountMatches ? "amount_mismatch" : "currency_mismatch",
          providerTransaction: provider,
          ledgerEntry: ledger,
          details: `...`,
        });
      }
    }
  }
}

Explore

Two tools, fully interactive. Data is freshly generated on each load.

Transaction Timeline

Explore and filter simulated transaction data across a 30-day window.

Showing 50 of 50 transactions

txn_brpt55efkcompletedpaypal

Kroger

Jul 15, 2026, 01:32 PM

$9454.15

txn_yvlupl1phcompletedwire

Amazon

Jul 15, 2026, 11:39 AM

$6986.22

txn_n1gznf97freversedwire

Lowe's

Jul 15, 2026, 05:29 AM

$370.20

txn_h8imwa0edpendingpaypal

Starbucks

Jul 14, 2026, 11:42 AM

$7546.86

txn_9je6a7x9rreversedpaypal

Starbucks

Jul 14, 2026, 05:13 AM

$6586.06

txn_notd7j4ukreversedstripe

Amazon

Jul 13, 2026, 12:02 PM

$10009.72

txn_ibroou5y3failedstripe

Amazon

Jul 13, 2026, 04:42 AM

$2905.56

txn_w7omhztpsfailedach

Starbucks

Jul 13, 2026, 02:31 AM

$4946.47

txn_y78thw1rjcompletedwire

Walmart

Jul 12, 2026, 02:16 PM

$2266.39

txn_3xdzfbhmwcompletedach

Costco

Jul 12, 2026, 10:24 AM

$1436.63

txn_w0so63c5ependingcard

Costco

Jul 11, 2026, 11:11 PM

$1812.72

txn_g5ggfdr7sreversedwire

Costco

Jul 11, 2026, 09:00 AM

$3066.82

txn_c3gfthtcufailedwire

Home Depot

Jul 11, 2026, 06:17 AM

$364.31

txn_4sogqu00zpendingstripe

Lowe's

Jul 11, 2026, 05:11 AM

$7292.69

txn_l8bdhe7q3reversedwire

Kroger

Jul 10, 2026, 07:04 PM

$8850.29

txn_kns0d9ua4completedach

Target

Jul 10, 2026, 04:08 PM

$4345.60

txn_lj0b9hemmpendingstripe

Walgreens

Jul 9, 2026, 07:11 PM

$8613.50

txn_mgq749en8completedstripe

Target

Jul 9, 2026, 05:53 PM

$2458.75

txn_c1qx9o11tpendingach

Costco

Jul 9, 2026, 10:06 AM

$4445.23

txn_6z8ncy8yzfailedpaypal

Costco

Jul 8, 2026, 07:46 PM

$597.88

txn_p4pruypyspendingpaypal

Walgreens

Jul 8, 2026, 04:44 AM

$3748.23

txn_lz7b0b4k2completedach

Target

Jul 7, 2026, 04:24 PM

$4503.79

txn_ga32qun35reversedwire

Target

Jul 6, 2026, 09:55 PM

$1469.52

txn_270z3i24freversedwire

Lowe's

Jul 6, 2026, 04:46 AM

$1728.07

txn_5l0etb3k4completedcard

Kroger

Jul 5, 2026, 03:29 AM

$5281.65

txn_tuebzh07ufailedstripe

Amazon

Jul 4, 2026, 03:21 PM

$5608.85

txn_t2wydxxnspendingpaypal

Walgreens

Jul 3, 2026, 03:48 PM

$6872.24

txn_xd78f6bc1pendingpaypal

Costco

Jul 2, 2026, 07:21 PM

$921.59

txn_639ht3bxtpendingach

Kroger

Jun 30, 2026, 10:34 AM

$8706.79

txn_mwcrsm658reversedach

Walgreens

Jun 29, 2026, 07:59 AM

$7973.56

txn_rphttqtrtcompletedstripe

Kroger

Jun 29, 2026, 05:24 AM

$7018.37

txn_jgw4s7x2wpendingpaypal

Home Depot

Jun 28, 2026, 02:28 AM

$7814.01

txn_0v5id3ca6failedstripe

Best Buy

Jun 27, 2026, 12:52 AM

$2119.30

txn_kisa1ykz8reversedach

Kroger

Jun 26, 2026, 12:30 PM

$7602.99

txn_6h2itcrq5failedpaypal

Walgreens

Jun 26, 2026, 01:09 AM

$2544.54

txn_4u0b2keoufailedwire

Amazon

Jun 25, 2026, 05:58 PM

$726.79

txn_xnry1mszqfailedstripe

Target

Jun 23, 2026, 07:53 PM

$6561.00

txn_8iu55jx99completedstripe

Lowe's

Jun 23, 2026, 03:29 AM

$5651.89

txn_xqko9ey6vfailedwire

Kroger

Jun 22, 2026, 03:41 AM

$5127.47

txn_hus31pl0upendingach

Best Buy

Jun 22, 2026, 01:48 AM

$6910.62

txn_ufnavekvcfailedstripe

Kroger

Jun 20, 2026, 01:13 AM

$533.70

txn_33bqfa3fbcompletedstripe

Amazon

Jun 20, 2026, 01:10 AM

$1383.00

txn_f4x6mgug4failedcard

Target

Jun 20, 2026, 12:26 AM

$1443.30

txn_51h3kyz5kcompletedstripe

Best Buy

Jun 19, 2026, 07:45 PM

$7007.91

txn_gxmkvf2tppendingcard

Walgreens

Jun 19, 2026, 12:01 AM

$3685.20

txn_y0efnthjxfailedpaypal

Costco

Jun 18, 2026, 11:39 AM

$587.96

txn_bmq4aoo3wcompletedcard

Amazon

Jun 17, 2026, 11:56 PM

$1020.23

txn_7mfppxf1dreversedstripe

Kroger

Jun 17, 2026, 05:46 PM

$6480.77

txn_ic5fn9dusreversedstripe

Starbucks

Jun 17, 2026, 07:20 AM

$2804.02

txn_923b5ligzpendingwire

CVS

Jun 16, 2026, 09:01 PM

$3167.57

Reconciliation Explorer

Compare provider transaction data with internal ledger entries. Identifies matches and mismatches using configurable tolerance rules.

Provider Transactions

30

Ledger Entries

30

Matched

0

Mismatches

60

Missing in Ledger

30

Extra in Ledger

30

Mismatches

missing in ledgerTransaction provider_0qn8k3p4r not found in ledger

Provider Transaction

ID: provider_0qn8k3p4r
Amount: $1887.24
Jul 13, 2026, 05:07 PM
missing in ledgerTransaction provider_fz6n9b884 not found in ledger

Provider Transaction

ID: provider_fz6n9b884
Amount: $9877.96
Jul 11, 2026, 07:39 AM
missing in ledgerTransaction provider_t1vznjumu not found in ledger

Provider Transaction

ID: provider_t1vznjumu
Amount: $9313.81
Jul 14, 2026, 08:42 AM
missing in ledgerTransaction provider_ssbkmezbi not found in ledger

Provider Transaction

ID: provider_ssbkmezbi
Amount: $9426.07
Jul 10, 2026, 12:15 PM
missing in ledgerTransaction provider_eq6dat21m not found in ledger

Provider Transaction

ID: provider_eq6dat21m
Amount: $6874.69
Jul 13, 2026, 02:52 PM
missing in ledgerTransaction provider_l9xnygksu not found in ledger

Provider Transaction

ID: provider_l9xnygksu
Amount: $3562.18
Jul 10, 2026, 10:48 AM
missing in ledgerTransaction provider_vh73bf39e not found in ledger

Provider Transaction

ID: provider_vh73bf39e
Amount: $3245.71
Jul 14, 2026, 09:22 AM
missing in ledgerTransaction provider_mvz6vlkj2 not found in ledger

Provider Transaction

ID: provider_mvz6vlkj2
Amount: $9063.48
Jul 12, 2026, 06:34 PM
missing in ledgerTransaction provider_zg3xpbcj6 not found in ledger

Provider Transaction

ID: provider_zg3xpbcj6
Amount: $4160.98
Jul 12, 2026, 01:00 PM
missing in ledgerTransaction provider_tu5qpv4oi not found in ledger

Provider Transaction

ID: provider_tu5qpv4oi
Amount: $3139.71
Jul 16, 2026, 05:04 AM
missing in ledgerTransaction provider_6px99pggw not found in ledger

Provider Transaction

ID: provider_6px99pggw
Amount: $3269.38
Jul 14, 2026, 03:07 AM
missing in ledgerTransaction provider_x9n4a6hwa not found in ledger

Provider Transaction

ID: provider_x9n4a6hwa
Amount: $2075.37
Jul 15, 2026, 05:55 PM
missing in ledgerTransaction provider_krv4du47u not found in ledger

Provider Transaction

ID: provider_krv4du47u
Amount: $1915.30
Jul 9, 2026, 11:39 PM
missing in ledgerTransaction provider_gbg24cvxg not found in ledger

Provider Transaction

ID: provider_gbg24cvxg
Amount: $9110.94
Jul 16, 2026, 11:19 AM
missing in ledgerTransaction provider_bmkmh2t5h not found in ledger

Provider Transaction

ID: provider_bmkmh2t5h
Amount: $9946.60
Jul 10, 2026, 06:38 PM
missing in ledgerTransaction provider_tv3etlms3 not found in ledger

Provider Transaction

ID: provider_tv3etlms3
Amount: $4962.71
Jul 10, 2026, 06:13 PM
missing in ledgerTransaction provider_xovlu5ufe not found in ledger

Provider Transaction

ID: provider_xovlu5ufe
Amount: $1007.13
Jul 13, 2026, 07:38 PM
missing in ledgerTransaction provider_vl9asuquq not found in ledger

Provider Transaction

ID: provider_vl9asuquq
Amount: $2851.01
Jul 10, 2026, 07:33 AM
missing in ledgerTransaction provider_612s3ycot not found in ledger

Provider Transaction

ID: provider_612s3ycot
Amount: $4599.66
Jul 9, 2026, 11:40 PM
missing in ledgerTransaction provider_nbtpl8vta not found in ledger

Provider Transaction

ID: provider_nbtpl8vta
Amount: $4459.10
Jul 9, 2026, 06:08 PM
missing in ledgerTransaction provider_e9fb5a9uw not found in ledger

Provider Transaction

ID: provider_e9fb5a9uw
Amount: $8230.23
Jul 13, 2026, 07:16 PM
missing in ledgerTransaction provider_sl49o5dcl not found in ledger

Provider Transaction

ID: provider_sl49o5dcl
Amount: $8483.37
Jul 12, 2026, 10:15 AM
missing in ledgerTransaction provider_ybrz7loz4 not found in ledger

Provider Transaction

ID: provider_ybrz7loz4
Amount: $2446.84
Jul 12, 2026, 07:32 AM
missing in ledgerTransaction provider_igcbjrk42 not found in ledger

Provider Transaction

ID: provider_igcbjrk42
Amount: $2521.61
Jul 15, 2026, 10:16 PM
missing in ledgerTransaction provider_257iud6ck not found in ledger

Provider Transaction

ID: provider_257iud6ck
Amount: $9813.91
Jul 11, 2026, 01:30 AM
missing in ledgerTransaction provider_44shfm999 not found in ledger

Provider Transaction

ID: provider_44shfm999
Amount: $1332.76
Jul 12, 2026, 03:56 PM
missing in ledgerTransaction provider_h1a7y4izc not found in ledger

Provider Transaction

ID: provider_h1a7y4izc
Amount: $7070.75
Jul 12, 2026, 12:03 PM
missing in ledgerTransaction provider_29t2q7865 not found in ledger

Provider Transaction

ID: provider_29t2q7865
Amount: $8983.61
Jul 16, 2026, 02:36 PM
missing in ledgerTransaction provider_5hk6quz9k not found in ledger

Provider Transaction

ID: provider_5hk6quz9k
Amount: $7493.42
Jul 13, 2026, 04:06 AM
missing in ledgerTransaction provider_a4l9q59xj not found in ledger

Provider Transaction

ID: provider_a4l9q59xj
Amount: $5756.94
Jul 12, 2026, 06:52 AM
extra in ledgerTransaction txn_u8hjvnfp6 found in ledger but not in provider data

Ledger Entry

TX ID: txn_u8hjvnfp6
Amount: $6349.05
Jul 12, 2026, 11:52 AM
extra in ledgerTransaction txn_7u8ve0q60 found in ledger but not in provider data

Ledger Entry

TX ID: txn_7u8ve0q60
Amount: $6421.65
Jul 14, 2026, 06:43 AM
extra in ledgerTransaction txn_p6wnwbqmj found in ledger but not in provider data

Ledger Entry

TX ID: txn_p6wnwbqmj
Amount: $2453.16
Jul 15, 2026, 11:40 PM
extra in ledgerTransaction txn_6hwta3whu found in ledger but not in provider data

Ledger Entry

TX ID: txn_6hwta3whu
Amount: $4209.81
Jul 13, 2026, 07:52 PM
extra in ledgerTransaction txn_3lytnx6id found in ledger but not in provider data

Ledger Entry

TX ID: txn_3lytnx6id
Amount: $7034.36
Jul 13, 2026, 06:41 AM
extra in ledgerTransaction txn_jvvlugkeh found in ledger but not in provider data

Ledger Entry

TX ID: txn_jvvlugkeh
Amount: $7651.23
Jul 10, 2026, 02:35 AM
extra in ledgerTransaction txn_nd56o76p1 found in ledger but not in provider data

Ledger Entry

TX ID: txn_nd56o76p1
Amount: $7140.75
Jul 11, 2026, 01:45 PM
extra in ledgerTransaction txn_s5r6cv7xz found in ledger but not in provider data

Ledger Entry

TX ID: txn_s5r6cv7xz
Amount: $5324.74
Jul 15, 2026, 09:43 AM
extra in ledgerTransaction txn_ydn9v8fdv found in ledger but not in provider data

Ledger Entry

TX ID: txn_ydn9v8fdv
Amount: $8397.26
Jul 13, 2026, 06:42 AM
extra in ledgerTransaction txn_j2yxr6na4 found in ledger but not in provider data

Ledger Entry

TX ID: txn_j2yxr6na4
Amount: $3084.51
Jul 10, 2026, 01:39 PM
extra in ledgerTransaction txn_lyp8h74dy found in ledger but not in provider data

Ledger Entry

TX ID: txn_lyp8h74dy
Amount: $5965.19
Jul 13, 2026, 09:25 AM
extra in ledgerTransaction txn_4ktz7usqj found in ledger but not in provider data

Ledger Entry

TX ID: txn_4ktz7usqj
Amount: $1146.96
Jul 12, 2026, 07:09 PM
extra in ledgerTransaction txn_abs3v74yh found in ledger but not in provider data

Ledger Entry

TX ID: txn_abs3v74yh
Amount: $3087.62
Jul 12, 2026, 11:28 AM
extra in ledgerTransaction txn_o7xvxyzzd found in ledger but not in provider data

Ledger Entry

TX ID: txn_o7xvxyzzd
Amount: $4502.13
Jul 13, 2026, 09:22 AM
extra in ledgerTransaction txn_6i5xxsa5w found in ledger but not in provider data

Ledger Entry

TX ID: txn_6i5xxsa5w
Amount: $1177.35
Jul 14, 2026, 08:35 PM
extra in ledgerTransaction txn_g0ksaz5v6 found in ledger but not in provider data

Ledger Entry

TX ID: txn_g0ksaz5v6
Amount: $4475.28
Jul 14, 2026, 02:44 AM
extra in ledgerTransaction txn_5p2k0xkls found in ledger but not in provider data

Ledger Entry

TX ID: txn_5p2k0xkls
Amount: $316.10
Jul 15, 2026, 02:21 PM
extra in ledgerTransaction txn_hjvlj5yu3 found in ledger but not in provider data

Ledger Entry

TX ID: txn_hjvlj5yu3
Amount: $4234.29
Jul 13, 2026, 01:40 PM
extra in ledgerTransaction txn_gxkw9p90d found in ledger but not in provider data

Ledger Entry

TX ID: txn_gxkw9p90d
Amount: $2488.37
Jul 10, 2026, 06:58 PM
extra in ledgerTransaction txn_lsyoi1sj1 found in ledger but not in provider data

Ledger Entry

TX ID: txn_lsyoi1sj1
Amount: $1615.89
Jul 13, 2026, 11:38 AM
extra in ledgerTransaction txn_ayejbu499 found in ledger but not in provider data

Ledger Entry

TX ID: txn_ayejbu499
Amount: $2678.82
Jul 11, 2026, 07:54 PM
extra in ledgerTransaction txn_zhms9hh84 found in ledger but not in provider data

Ledger Entry

TX ID: txn_zhms9hh84
Amount: $9344.51
Jul 13, 2026, 04:13 PM
extra in ledgerTransaction txn_chtguq0us found in ledger but not in provider data

Ledger Entry

TX ID: txn_chtguq0us
Amount: $2453.61
Jul 10, 2026, 05:54 AM
extra in ledgerTransaction txn_e9jylsv9i found in ledger but not in provider data

Ledger Entry

TX ID: txn_e9jylsv9i
Amount: $8081.25
Jul 10, 2026, 09:21 AM
extra in ledgerTransaction txn_zrs6ywe4p found in ledger but not in provider data

Ledger Entry

TX ID: txn_zrs6ywe4p
Amount: $7479.77
Jul 10, 2026, 06:12 PM
extra in ledgerTransaction txn_5wut11u7f found in ledger but not in provider data

Ledger Entry

TX ID: txn_5wut11u7f
Amount: $5227.81
Jul 16, 2026, 08:39 AM
extra in ledgerTransaction txn_sdc3aj7h6 found in ledger but not in provider data

Ledger Entry

TX ID: txn_sdc3aj7h6
Amount: $3429.73
Jul 15, 2026, 08:34 PM
extra in ledgerTransaction txn_7nw5bh82n found in ledger but not in provider data

Ledger Entry

TX ID: txn_7nw5bh82n
Amount: $6072.96
Jul 14, 2026, 12:50 PM
extra in ledgerTransaction txn_6jbe0p9pp found in ledger but not in provider data

Ledger Entry

TX ID: txn_6jbe0p9pp
Amount: $2672.67
Jul 10, 2026, 06:56 AM
extra in ledgerTransaction txn_rgd1zaeil found in ledger but not in provider data

Ledger Entry

TX ID: txn_rgd1zaeil
Amount: $9157.68
Jul 13, 2026, 03:09 PM

Reflections

The most useful design decision here was separating mismatch types rather than collapsing them into a single "error" state. In practice, a missing ledger entry, an amount discrepancy, and a currency mismatch each require a different remediation path — and surfacing them as distinct categories makes the tool actionable rather than just diagnostic.

A production version of this would replace the client-side mock data with a Postgres-backed event log, stream reconciliation results via Server-Sent Events as records are processed, and integrate with provider webhooks to trigger reconciliation runs automatically on settlement. The matching logic itself — the tolerance rules, the classification taxonomy — would remain largely the same.