Design Real-Time Payment Fraud Scoring for Marketplace Checkout
Last updated: November 29, 2026
Quick Overview
Design an ML system that scores every checkout for fraud risk in real time and decides whether to accept, send for step-up verification, or hold the order for review.
Amazon
November 29, 20260
0
0 solved
Design an ML system that scores every checkout for fraud risk in real time and decides whether to accept, send for step-up verification, or hold the order for review.
Fraud prevention on Amazon's checkout must catch stolen-card and account-takeover attacks without blocking good customers at enormous volume. Interviewers check label delay handling, real-time feature computation, cost-based decisioning, and adversarial adaptation.
What the Interviewer Expects
- Low-latency scoring inside the checkout path
- Real-time velocity features plus historical features
- Labels from chargebacks that arrive weeks later
- Cost-sensitive decision thresholds with multiple actions
- Monitoring and fast reaction to new attack patterns
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you train when chargeback labels arrive 60 days later?
- How do you evaluate a model when held orders never get a true label?
- How would you use graph features linking accounts, devices, and addresses?
- How would you roll out a new model safely?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Functional: score each checkout, return accept / step-up (for example card verification) / hold for manual review; let investigators label outcomes; support rules alongside the model. **Non-functi...
High-Level Design
- Checkout calls a Risk Scoring Service with order, account, payment instrument, device, and address ids.
- Online Feature Store: low-latency key-value store with precomputed and streaming...