skills/security-compliance/fraud-detection/SKILL.md
Protect your store from fraudulent orders using risk scoring, 3D Secure challenges, velocity checks, and manual review queues for suspicious orders
npx skillsauth add finsilabs/awesome-ecommerce-skills fraud-detectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Payment fraud costs e-commerce merchants 2–3% of revenue through chargebacks, lost goods, and dispute fees. Effective fraud detection layers platform-native risk scoring, 3D Secure authentication, velocity checks, and manual review queues for suspicious orders. The right approach depends on your platform — Shopify includes a built-in fraud analysis tool, while WooCommerce and BigCommerce require a dedicated fraud prevention service or payment processor's fraud tools.
| Platform | Built-in Fraud Analysis | Recommended Fraud Service | |----------|------------------------|--------------------------| | Shopify | Shopify Fraud Analysis (included free); basic risk scoring on orders | Enable Stripe Radar or Signifyd (Shopify App Store) for advanced ML scoring | | WooCommerce | None built in | Use Stripe (with Radar) or Braintree as payment processor; or install Kount or NoFraud plugin | | BigCommerce | Payment processor fraud tools (varies by processor) | Signifyd integrates natively with BigCommerce; NoFraud also supports BigCommerce | | All platforms | — | Stripe Radar (if using Stripe) provides ML-based fraud scoring on every charge at no extra cost |
Shopify includes a Fraud analysis indicator on every order based on signals like IP/billing address mismatch, card verification failure, and known fraud patterns.
Reviewing fraud indicators:
Configuring fraud response rules:
Signifyd (Shopify App Store — Guaranteed Fraud Protection): Signifyd provides chargeback guarantees — if they approve an order and it results in a chargeback, they reimburse you. This is the most comprehensive solution for Shopify.
WooCommerce does not include fraud detection. You need either a payment processor with built-in fraud tools or a dedicated plugin.
Option A: Stripe Radar (recommended if using Stripe for WooCommerce)
If using the WooCommerce Stripe Payment Gateway:
# Block orders over $500 from high-fraud-rate IP countries
Block if :order_amount: > 50000 and :ip_country: in ('NG', 'RO')
# Review first-time customers placing large orders
Review if :order_amount: > 20000 and :customer_account_age: < 7
# Block cards used more than 3 times in the last hour
Block if :card_velocity_hour: > 3
Option B: WooCommerce Anti-Fraud plugin (free)
Option C: Kount or NoFraud (enterprise) For high-volume WooCommerce stores, enterprise fraud prevention platforms offer:
Signifyd for BigCommerce:
Payment processor fraud tools:
For custom storefronts using Stripe, leverage Stripe Radar for ML scoring and add application-layer velocity checks for business-specific patterns.
Retrieve Stripe's fraud score after payment attempt:
const paymentIntent = await stripe.paymentIntents.retrieve(paymentIntentId, {
expand: ['latest_charge'],
});
const riskScore = paymentIntent.latest_charge.outcome?.risk_score; // 0–100
const riskLevel = paymentIntent.latest_charge.outcome?.risk_level; // 'normal', 'elevated', 'highest'
Request 3D Secure for high-risk transactions (shifts chargeback liability to card issuer):
const paymentIntent = await stripe.paymentIntents.create({
amount: order.totalCents,
currency: 'usd',
payment_method_options: {
card: {
// 'automatic' = Stripe decides; 'challenge' = always require 3DS for high-risk
request_three_d_secure: riskScore > 70 ? 'challenge' : 'automatic',
},
},
});
Application-layer velocity checks:
import Redis from 'ioredis';
const redis = new Redis(process.env.REDIS_URL!);
async function checkVelocity(params: { email: string; ip: string; cardFingerprint: string; amountCents: number }) {
const { email, ip, cardFingerprint, amountCents } = params;
// IP: max 10 orders per hour
const ipCount = await redis.incr(`vel:ip:${ip}`);
if (ipCount === 1) await redis.expire(`vel:ip:${ip}`, 3600);
if (ipCount > 10) return { allowed: false, reason: 'ip_velocity' };
// Email: max 5 orders per 24 hours
const emailCount = await redis.incr(`vel:email:${email.toLowerCase()}`);
if (emailCount === 1) await redis.expire(`vel:email:${email.toLowerCase()}`, 86400);
if (emailCount > 5) return { allowed: false, reason: 'email_velocity' };
// Card: max $500 per day
const spendKey = `vel:spend:${cardFingerprint}`;
const currentSpend = parseInt(await redis.get(spendKey) ?? '0');
if (currentSpend + amountCents > 50000) return { allowed: false, reason: 'daily_spend_limit' };
return { allowed: true };
}
Manual review queue:
async function flagForManualReview(orderId: string, riskScore: number, signals: Record<string, unknown>) {
// Hold the order — do NOT fulfill; do NOT capture payment (authorize only)
await db.orders.update(orderId, {
status: 'pending_fraud_review',
fraud_risk_score: riskScore,
fraud_signals: signals,
review_requested_at: new Date(),
});
// Notify fraud review team
await sendSlackAlert('#fraud-review', {
text: `Order ${orderId} flagged for review. Risk score: ${riskScore}/100`,
actions: [
{ text: 'Approve', url: `${ADMIN_URL}/fraud-review/${orderId}/approve` },
{ text: Reject', url: `${ADMIN_URL}/fraud-review/${orderId}/reject` },
],
});
}
// Auto-cancel unreviewed orders after 48 hours
async function expireUnreviewedOrders() {
const expired = await db.orders.findExpiredReviews(48);
for (const order of expired) {
await stripe.paymentIntents.cancel(order.payment_intent_id);
await db.orders.update(order.id, { status: 'fraud_review_expired' });
await sendOrderCancellationEmail(order);
}
}
| Problem | Solution |
|---------|----------|
| 3DS causing checkout abandonment | Use automatic 3DS mode — Stripe decides when a challenge is needed; this frictionlessly authenticates low-risk transactions |
| Velocity rules blocking legitimate bulk buyers | Whitelist B2B customers or high-LTV customer segments from velocity rules; use tiered limits based on account history |
| Manual review queue growing unboundedly | Set SLA targets (4-hour review window); implement auto-cancellation for orders not reviewed within 48 hours |
| Chargeback filed despite 3DS authentication | Verify your processor submits 3DS authentication data (eci, cavv, xid) correctly; without these fields the liability shift does not apply |
| Redis velocity keys never expiring | Always call EXPIRE when setting a new key; use SET key value EX seconds NX for atomic set-if-not-exists with expiry |
tools
Let shoppers save products to a wishlist, share it with friends, and get notified when saved items come back in stock or drop in price
development
Build a themeable storefront with design tokens and CSS custom properties that supports white-labeling, multi-brand variants, and dark mode
development
Speed up product discovery with instant search suggestions, fuzzy typo matching, and category-aware results powered by Algolia or Elasticsearch
development
Build a mobile-first storefront with thumb-friendly navigation, sticky add-to-cart buttons, and touch-optimized components for high mobile conversion