Commerce & finance / Reference project

Ledgerlink

A reconciliation desk for orders, invoices and refunds.

Reconciliation queue with sample records
Project notes

Behind the workflow.

Challenge

Order retries and partial refunds could produce records with matching amounts but different histories.

Approach

Match source events by order ID and refund ID, replay duplicate deliveries and compare the destination ledger to the source fixture.

Solution

A ledger writer stores an event key before applying each posting and sends incomplete mappings into review.

Worked example

Follow one record.

Sample input

Order O-3147 · paid · the same posting key arrives twice

Resolve a repeated event
  1. Look up the source posting key.
  2. Find the invoice created by the first delivery.
  3. Record the repeated delivery against that invoice.

A refund receives its own event key and can be posted against the original order.

Reference results

Duplicate postings in fixture

12Baseline
0Proposed workflow

Replay 12 already-posted event IDs. The naive writer adds 12 rows, while the keyed model rejects each duplicate. These numbers describe the sample scenario.

Technology stack

Node.jsREST APIsPostgreSQL

Interface gallery

Next project

Marginbook

Explore Marginbook

A margin workspace that follows the money to the line item.