AI in Commerce: Order Intelligence and Payment Security

Felipe Hlibco

When I worked at TaskRabbit, I sat next to the payments team during a fraud spike that cost us six figures in a single week. The pattern was clever—synthetic identities (fabricated personal details cobbled together from real data fragments) booking high-value tasks, paying with stolen cards, then disputing the charges. Our rule-based detection caught maybe 30% of the fraudulent transactions. The other 70% sailed through because the patterns didn’t match any rule we’d written.

That experience stuck with me. Rule-based fraud detection assumes you can anticipate the patterns. You can’t. Fraudsters adapt faster than rules can be written.

The Scale of the Problem #

Ecommerce fraud losses hit $41 billion globally in 2022. North America accounts for 42% of that—roughly $17 billion. And those numbers undercount the real damage because they don’t include the operational cost of chargebacks, manual review queues, customer friction from false positives, and the opportunity cost of turning away legitimate transactions.

The fraud landscape has gotten nastier over the past few years. Credit card fraud is still the biggest category, but synthetic identity fraud (where the “person” doesn’t exist; they’re a fabricated composite of real and fake information) is the fastest-growing segment. Account takeover attacks—where bad actors gain access to legitimate user accounts—jumped significantly in 2021 and 2022. And chargeback abuse (sometimes called “friendly fraud”), where legitimate buyers dispute valid charges, sits in a gray area that’s almost impossible to address with rules alone.

Why ML Beats Rules #

A rule-based fraud system works like a checklist. Transaction over $500 from a new account? Flag it. Shipping address different from billing address? Flag it. Three transactions within 10 minutes? Flag it.

The problem is obvious: every rule has a threshold, and sophisticated fraudsters know exactly where those thresholds are. Stay under $500. Use matching addresses. Space transactions 15 minutes apart. The rules catch unsophisticated fraud and miss everything else.

ML models work differently. Instead of explicit rules, they learn patterns from historical data—millions of transactions, both legitimate and fraudulent. The model identifies correlations no human would code as a rule: the relationship between device fingerprint, time of day, browsing behavior before purchase, typing cadence, the specific combination of product categories in a cart.

Stripe Radar is probably the best-known example in the developer ecosystem. It trains on data across Stripe’s entire network (billions of transactions), which gives it a massive advantage over any individual merchant’s fraud system. When a new fraud pattern emerges at one merchant, Radar’s model adapts across the entire network within hours.

The results are genuinely impressive. Stripe claims Radar blocks over 95% of fraudulent transactions while keeping false positive rates low enough that legitimate customers rarely get blocked. Those numbers wouldn’t be possible with rules.

Order Intelligence: The Other Side of the Coin #

Fraud detection gets the attention because the costs are visible and scary. But the “order intelligence” side of AI in commerce—demand forecasting, inventory optimization, fulfillment routing, dynamic pricing—has arguably a bigger impact on the bottom line.

Think about what a modern ecommerce operation needs to get right: predict how much of each product will sell in each region over the next 30 days; allocate inventory across warehouses to minimize shipping costs and delivery times; price dynamically based on demand signals and competitive positioning; route orders to the fulfillment center that optimizes for both speed and cost.

Each of those decisions used to involve human judgment, spreadsheets, and historical averages. Now ML models handle them at a speed and granularity humans can’t match.

A demand forecasting model doesn’t just look at “how many blue widgets did we sell last October.” It incorporates hundreds of signals: weather patterns, social media trends, competitor pricing, marketing campaign schedules, day-of-week effects, seasonal curves, and product lifecycle stage. The model surfaces demand shifts weeks before a human analyst would notice them.

The inventory allocation piece is where graph neural networks are starting to make an impact. The problem—“given current stock levels across N warehouses and predicted demand across M regions, what’s the optimal redistribution?”—is a combinatorial optimization problem. Traditional approaches used linear programming with simplified assumptions. ML models can handle the full complexity, including nonlinear shipping costs, capacity constraints, and stochastic demand uncertainty.

Where This Gets Interesting #

The convergence of fraud detection and order intelligence is where I think the next wave of innovation happens. Right now, most ecommerce companies treat these as separate systems. The fraud team runs their models. The supply chain team runs theirs. They don’t talk to each other.

But fraud patterns carry commerce intelligence signals, and commerce patterns carry fraud signals. A sudden spike in orders from a new geographic region could be organic growth (order intelligence) or a coordinated fraud attack (payment security). A shift in product mix could reflect changing consumer preferences or a new affiliate fraud scheme targeting high-value items.

Companies like Amazon have been integrating these signals for years—it’s one of their structural advantages. For everyone else, the tools exist (TensorFlow, PyTorch, managed ML services from every cloud provider) but the organizational integration lags behind the technology.

The Build-vs-Buy Decision #

If you’re running an ecommerce operation, should you build custom ML models or use off-the-shelf solutions?

For fraud detection: buy. Unless you’re processing hundreds of millions of transactions per year, you don’t have enough data to train a model that outperforms Stripe Radar, Amazon Fraud Detector, or Sift. The network effect of these platforms—training on data across thousands of merchants—gives them an advantage no individual company can replicate.

For order intelligence: it depends on your scale. If you’re managing a few hundred SKUs across a single warehouse, the decision-making is simple enough that sophisticated ML isn’t worth the investment. Rules and spreadsheets work fine. Once you cross the threshold into thousands of SKUs, multiple fulfillment centers, and meaningful geographic distribution—that’s when custom models start paying for themselves.

The key insight from my time at TaskRabbit (a marketplace with similar challenges): the data pipeline matters more than the model. I’ve seen teams spend months building a sophisticated fraud model only to discover their feature engineering was based on stale data with a 4-hour lag. By the time the model saw the fraud signal, the damage was done.

Real-time data pipelines feeding ML models with sub-second latency. That’s the infrastructure that makes all of this work. The model architecture is almost secondary.