Friendly Fraud Prevention for Developers: What to Log, Block and Automate
Friendly fraud, where a real customer disputes a legitimate charge, accounts for around 20 to 30% of fraudulent disputes per Visa and 75% of online fraud per Mastercard. Winning disputes requires logging IP address, device ID, account ID and shipping address at checkout and keeping them for at least 13 months. Visa's CE3.0 rules require two undisputed prior purchases on the same card from 120 to 365 days earlier sharing data points, while Mastercard's First-Party Trust needs device, delivery and identity factors and a lookup service responding within 2.5 seconds. The piece walks through Node.js code for checkout logging, risk scoring, a pre-fulfillment hold gate, pre-dispute order lookup endpoints, webhook-driven refunds and evidence automation, plus a comparison of building in-house versus using tools like Stripe Smart Disputes or Chargeflow.
