Design Fraud Detection for In-App Purchases on Google Play
Last updated: November 29, 2026
Quick Overview
Design an ML system that scores Google Play in-app purchases in real time for fraud (stolen cards, account takeover, refund abuse) and decides whether to allow, challenge, or block.
0
0
0 solved
Design an ML system that scores Google Play in-app purchases in real time for fraud (stolen cards, account takeover, refund abuse) and decides whether to allow, challenge, or block.
Payments fraud on Play mixes tight latency, heavy class imbalance, delayed and noisy labels (chargebacks), and adversaries. Interviewers check feature design (velocity, graph), label handling, decision policy, and feedback loops.
What the Interviewer Expects
- Define actions and costs: block, step-up challenge, allow
- Design real-time features including velocity and graph features
- Handle delayed chargeback labels and selection bias from blocked transactions
- Set policy thresholds by cost and challenge friction
- Cover latency, monitoring, and adversarial adaptation
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 do you get labels for transactions you blocked?
- How would you detect a coordinated fraud ring?
- What changes for a new user with no history?
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
Score each purchase in under 50 ms at peak tens of thousands of QPS. Actions: allow, challenge (re-authenticate, 3DS), block. Minimize total cost: fraud loss plus lost good revenue plus challenge fric...
High-Level Design
Purchase request goes to a scoring service that fetches features from an online feature store (Bigtable-like), runs a GBDT or small neural model, then a policy engine maps score plus context to an act...