Real-time payment fraud detection
On a platform delivering digital goods within seconds, a stolen card meant losing the product and paying a chargeback fee. Fraud could be reported up to three months after purchase. The existing hand-written rules engine failed to catch most fraudulent orders.
Score every order at checkout, before and after payment, on extremely imbalanced data whose true label can arrive up to 3 months later. Keep manual reviews within capacity without reducing conversion.
Five years of iteration in production: nearly 200 real-time features (rolling fraud rates, behavioral time windows, circular statistics); models that evolved from a random forest to an MLP, then to XGBoost with dual-model serving; automated retraining with quality gates, including a cap on manual-review volume before deployment; and model hot-swapping via pub/sub.