Real-time fraud scoring at scale

DesignHard45 minStripe and PayPal style

Your task

Design a real-time fraud-scoring system for a payments processor handling 8,000 card authorizations/sec at peak. Each authorization must return an approve/decline/review decision within a 50ms p99 budget (the issuer network times out the auth at ~150ms total), and the score must reflect very recent signals, e.g. velocity of attempts on the same card or device in the last 60 seconds. The model is a gradient-boosted tree plus a few hundred features; some features are precomputed (account age, historical chargeback rate) and some must be computed on the hot path (counts/aggregations over the last seconds-to-minutes). False declines are expensive (lost legit revenue and customer anger) and false approves cause direct fraud loss, so the threshold is tunable per merchant segment.

It covers

  • Fraud scoring
  • Low latency
  • Feature freshness