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
ML System Design
Machine Learning Engineer
Amazon
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

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
Real-time features
Label delay
Cost-sensitive learning
Graph features
Counterfactual evaluation
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. 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 Problems
Sample 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...

Submit Your Answer
Markdown supported