Fraud Detection Pipeline
A payment fraud detection pipeline is a real-time decision system that evaluates every incoming transaction against a set of rules and machine learning signals to produce a risk score, then routes the transaction to an appropriate action: approve, challenge, or decline.
A payment fraud detection pipeline is a real-time decision system that evaluates every incoming transaction against a set of rules and machine learning signals to produce a risk score, then routes the transaction to an appropriate action: approve, challenge, or decline.
The pipeline is triggered synchronously during the payment authorization flow — it must complete in milliseconds to avoid adding perceptible latency to checkout. The first stage is data enrichment: raw transaction attributes (amount, merchant category, card BIN, IP address) are combined with cardholder history from a fast-access data store (typically Redis or a feature store). Computed features might include: average transaction amount in the past 30 days, number of declined transactions in the past hour, whether the billing address matches the card's registered country, and whether the device has been seen before.
Enriched features are passed to a rule engine first. Hard rules — block cards on hotlists, block transactions above a threshold from high-risk merchant categories, block if IP is on a proxy list — are applied before invoking the more expensive ML model. If a rule triggers, the transaction is immediately declined or flagged without further evaluation.
Transactions that pass the rule engine are scored by an ML model (typically gradient-boosted trees or neural net) trained on historical fraud and legitimate transaction data. The model outputs a probability score (0.0 to 1.0). Scores below a lower threshold are auto-approved. Scores above an upper threshold are auto-declined. Scores in the middle range trigger a 3D Secure challenge (see 3D Secure Authentication) or are held for manual review depending on the merchant's risk tolerance.
The decision — along with the score and triggered rules — is logged to the fraud event store for model retraining and auditing. All disputed transactions ultimately generate chargebacks; see Chargeback Handling for how those are resolved.