TRICKYwalkthrough

Reconciliation and Settlement

8 of 8
3 related
At the end of each day (T+1), the card networks send a settlement file: a batch report listing every authorized and captured transaction with amounts and statuses. Our reconciliation job compares this file against our ledger_entries table, line by line.
This is how we catch double charges, missing captures, and ambiguous timeout resolutions. The reconciliation runs as a batch job processing 432M transactions against the settlement file.
Any mismatch (we say 'captured 50,thenetworksaysauthorized50', the network says 'authorized 50') triggers an alert for manual review.
At 900 bytes per comparison (our record + network record), the job processes 432M×900B=389 GB432M \times 900B = 389\text{ GB} of data per run. We partition the reconciliation by merchant_id and run it in parallel across 50 workers, completing in under 2 hours. Settlement is the actual movement of money.
Card networks batch-settle once per day: they transfer the net amount (captures minus refunds) from the issuing bank to the acquirer, who then distributes to merchants. Settlement takes T+2 to T+3 business days.
Why not real-time settlement? Because card networks batch for efficiency and to allow time for disputes and chargebacks.
Trade-off: merchants do not receive funds for 2-3 days after a charge. Stripe and other modern processors offer 'instant payouts' by fronting the money and absorbing the settlement risk.
Why it matters in interviews
Reconciliation is the safety net of the entire payment system. Interviewers want to hear that you do not blindly trust your own records. Explaining the T+1 batch comparison against the card network's settlement file shows you understand that two independent systems must agree on every transaction.
Related concepts