Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Design Idempotent Payment Event Pipeline

HardPipelines00:00
Practice interviewer
In session
5 left
00:00

Your question is Design Idempotent Payment Event Pipeline. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Scenario

You are redesigning the payment processing pipeline for a digital banking platform after an audit found duplicate captures and inconsistent downstream ledger records during retries, consumer restarts, and backfills. The platform is moving from synchronous request-driven writes to an event-driven architecture so payment authorization, capture, settlement, and reconciliation can be processed independently. The main pain point is that the same business operation may be delivered multiple times by API clients, brokers, and batch replay jobs, but it must produce exactly one financial effect. You need a design that keeps operational systems and analytical stores consistent without blocking throughput.

Current State

ComponentStatus / Technology
Payment APIJava 17 / Spring Boot, client retries with 5s timeout
Event BusApache Kafka 3.x, at-least-once delivery
Stream ProcessingApache Flink 1.18 for payment state transitions
Operational StorePostgreSQL 14 for payment and idempotency records
Data Lake / WarehouseS3-compatible object storage + Greenplum
OrchestrationApache Airflow 2.x for replay and reconciliation jobs
Scale: 25K payment requests/sec peak, 3K avg, 1.2B payment events/day, P99 API latency target under 300 ms, settlement and ledger views under 2 minutes fresh, replay windows up to 30 days.

Question

How would you design an idempotency framework across the API, streaming pipeline, storage layers, and replay workflows so duplicate requests and duplicate events never create duplicate financial side effects, while still supporting retries, late events, and backfills at this scale?