# System Design Interview: Payment Settlement Batch Processing Page: https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520/system-design-interview-payment-settlement-batch-processing Text version: https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520/system-design-interview-payment-settlement-batch-processing.md Podcast: [Software Engineer Interview Prep Podcast](https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520) Published: 2026-05-17T11:45:50+00:00 Episode link: https://podcasters.spotify.com/pod/show/prabuddha-ganegoda/episodes/System-Design-Interview-Payment-Settlement-Batch-Processing-e3jg0dr Audio file: https://anchor.fm/s/10f2c0f8c/podcast/play/120110971/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2026-4-17%2F424314545-44100-2-580e05915292d.mp3 Processing state: not_requested JSON: https://stenobird.com/v1/public/podcasts/software-engineer-interview-prep-podcast-7756520/episodes/system-design-interview-payment-settlement-batch-processing Duration seconds: 571 ## Resource Design a batch processing system for end-of-day payment settlement at a payments company that processes 50 million transactions per day . The system must net merchant positions, calculate fees, and initiate fund transfers to merchant bank accounts within a strict bank cutoff window. Walk me through your design, covering reliability, scalability, and how you'd handle failures. Key Takeaways The outbox pattern is the canonical solution to the dual-write problem. Know it cold. Partition keys define ordering and parallelism — choose with intention, usually around the natural aggregation boundary (here, merchant ID). Throttling must be distributed when you have multiple workers — Redis-backed buckets or a sidecar. Idempotency is non-negotiable in payments. Design for at-least-once and dedupe. Retries are tiered : in-process for transient, delay-queue for slower-resolving, DLQ for terminal. Backpressure beats dropping — use Kafka lag as your buffer when downstream is slow. Reconciliation closes the loop — you don't know it worked until ground truth confirms. Corrections are new events — never rewrite history in a financial system. ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/software-engineer-interview-prep-podcast-7756520/episodes/system-design-interview-payment-settlement-batch-processing/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520/system-design-interview-payment-settlement-batch-processing.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.