Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Real-Time Card Fraud Detection

HardSystem Design00:00
Practice interviewer
In session
5 left
00:00

Your question is Real-Time Card Fraud Detection. 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

Product Context

PayShield is a global card issuer and payment processor. Every card authorization request must be scored for fraud in real time before the bank decides to approve, decline, or step up with additional verification.

Scale

SignalValue
Active cardholders45M
Merchants8M
Peak authorization QPS120K txns/sec
Average daily transactions3.2B
Historical labeled transactions18 months, ~1.4T rows
End-to-end decision latency budget150ms p99
ML scoring budget within decision flow35ms p99
Chargeback / fraud label delay7-45 days

Task

Design an end-to-end ML system for real-time fraud detection on credit card transactions. Your design should address:

  1. How you would define the prediction target, business objective, and decision policy (approve / decline / review / step-up authentication)
  2. The serving architecture for low-latency scoring at 120K QPS, including online features, batch features, and fallback behavior
  3. A multi-stage decision pipeline, such as lightweight rules or retrieval for known bad entities, followed by ML ranking/scoring and optional re-decision logic
  4. Model choices for each stage and how you would handle delayed labels, class imbalance, concept drift, and cold-start merchants/cards/devices
  5. Offline evaluation, online rollout, threshold tuning, and monitoring for model quality, calibration, and operational health
  6. Key failure modes, including feature drift, training-serving skew, outages, adversarial adaptation, and false-positive spikes

Constraints

  • False positives are expensive: unnecessary declines hurt customer trust and interchange revenue
  • False negatives are also expensive: fraud losses and chargeback costs are material
  • The system must support region-specific compliance requirements; some raw PII cannot be stored in the online feature store
  • Features must be explainable enough to support analyst review and adverse-action workflows
  • Fraud patterns shift quickly during attacks, so some signals must update within seconds to minutes
  • The authorization path cannot depend on a GPU-only service or any single regional dependency