Challenge
Order retries and partial refunds could produce records with matching amounts but different histories.
A reconciliation desk for orders, invoices and refunds.
Order retries and partial refunds could produce records with matching amounts but different histories.
Match source events by order ID and refund ID, replay duplicate deliveries and compare the destination ledger to the source fixture.
A ledger writer stores an event key before applying each posting and sends incomplete mappings into review.
A refund receives its own event key and can be posted against the original order.
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.
A margin workspace that follows the money to the line item.