Preparing your design workspace

Loading the problem and your latest saved attempt…

Real-Time Payment Fraud Detection

Design a low-latency fraud-decision platform for payment attempts with online features, rules and model scoring, review, and auditability.

Problem statement

For this exercise, assume a payment processor asks the fraud platform for an APPROVE, DECLINE, or REVIEW decision before authorizing a card payment or bank transfer. The decision combines versioned rules, model scores, recent account and device behavior, and hard safety policies.

Retries for one payment attempt must return one stable decision, every decision must be explainable and auditable, and unavailable optional features may degrade according to explicit policy without bypassing hard controls. Analysts can review queued cases and feed confirmed outcomes into offline evaluation.

Design the online decision path, streaming features, rules and model lifecycle, case workflow, and failure recovery. Exclude payment settlement, chargeback operations, and training a specific model architecture.

What to build

  1. The processor can idempotently request one bounded-latency fraud decision with reason codes and version evidence.
  2. The platform ingests account, device, payment, and confirmed-outcome events into online and offline feature views.
  3. Analysts can resolve review cases, audit past decisions, and evaluate or promote versioned rule and model packages.

At scale

  • Assume 100 million payment attempts per day and 20,000 decision requests per second at peak.
  • Return a decision within 150 ms at p99, including feature retrieval, rules, model scoring, and policy combination.
  • Hard blocklists and velocity controls may be at most five seconds stale; optional enrichment may be missing under a declared degraded policy.
  • Retain immutable decision evidence for seven years and support replaying historical events against a candidate rule or model version.