Design Real-Time Risk Scoring for Instant Debit Card Account Funding

Last updated: November 29, 2026

Quick Overview

Design an ML-backed system that decides in under 300 ms whether to allow, limit, or step-up verify a user's request to instantly fund their account from an external debit card, balancing fraud losses from stolen cards against friction for good users.

Onepay
ML System Design
Machine Learning Engineer
Onepay
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design an ML-backed system that decides in under 300 ms whether to allow, limit, or step-up verify a user's request to instantly fund their account from an external debit card, balancing fraud losses from stolen cards against friction for good users.

Instant funding from an external card is convenient for OnePay users but is a top fraud vector, because stolen card credentials get pushed into a fresh account and moved out via P2P before the chargeback lands. This round checks label design with delayed outcomes, online feature freshness, and how model scores turn into actions.

What the Interviewer Expects
  • Define labels using chargebacks and confirmed fraud with label delay handled
  • Design online features (velocity, device, card age, account tenure) with a feature store
  • Combine model score with rules and per-user limits rather than a single threshold
  • Choose thresholds from expected loss versus friction cost
  • Plan for feedback loops created by blocking transactions
  • Monitor drift and run shadow deployments
Key Topics to Cover
fraud detection
label delay
feature store
threshold selection
counterfactual evaluation
model monitoring
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
  • Blocked transactions never get a chargeback label. How do you avoid training only on approved traffic?
  • How would you detect a new fraud ring that the model has never seen?
  • Which features would you compute in streaming versus batch, and why?
  • How do you explain a decline to a customer support agent?
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

Input: funding request with user, card fingerprint, amount, device, and IP. Output: allow, allow with a lower limit or hold, step-up (3DS or ID check), or decline, within 300 ms p99. Goals: minimize f...

High-Level Design

Funding service calls a risk service. Risk service fetches online features from a low-latency feature store (Redis-like), runs hard rules (sanctioned BINs, card already on 3 accounts), scores a gradie...


Submit Your Answer
Markdown supported

Related Questions