Design Fraud Detection for App Store Purchases and Refund Abuse
Last updated: November 29, 2026
Quick Overview
Design an ML system that scores App Store and in-app purchases for fraud (stolen cards, account takeover) and flags customers abusing refunds, deciding in real time whether to approve, challenge or block.
Apple
November 29, 20260
0
0 solved
Design an ML system that scores App Store and in-app purchases for fraud (stolen cards, account takeover) and flags customers abusing refunds, deciding in real time whether to approve, challenge or block.
Apple processes very large volumes of small digital purchases where a blocked legitimate customer is costly and fraudsters adapt quickly. The interviewer checks real-time feature design, delayed and noisy labels, cost-sensitive decisions and the feedback loop with human review.
What the Interviewer Expects
- Separates purchase-time fraud scoring from post-purchase refund abuse detection
- Designs low-latency features including velocity counters and device/account graph signals
- Handles delayed labels from chargebacks and selection bias from blocked transactions
- Chooses thresholds by expected cost, with a challenge step for the gray zone
- Plans monitoring for drift 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 train on transactions you blocked, whose true label you never learn?
- How would graph features catch a ring of accounts sharing devices?
- What would you do differently for a family sharing group?
- How do you protect developers from refund abuse without denying fair refunds?
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 every purchase within about 50 ms in the payment path. Decisions: approve, step-up challenge (re-authenticate with Face ID or password, verify the card), or block. Separately, score refund reque...
High-Level Design
Purchase event goes to a scoring service that pulls features from an online store (Redis-like) and runs a gradient-boosted model, then a rules layer for hard policies (sanctioned regions, known bad ca...