How to Configure and Use AI Fraud Detection in WooCommerce
WooCommerce Fraud Prevention scores every order in your store and blocks or flags the risky ones before they turn into a chargeback.
The AI Fraud Detection module adds an AI layer on top of that. It sends order details to Google or OpenAI, gets back a confidence score, and blocks anything over your threshold — and it can now run alongside the plugin's manual fraud-detection engine, so orders don't go unchecked if the AI call fails.
For example, if your AI provider hits its API rate limit mid-checkout, the order isn't waved through unchecked. The plugin logs the AI as unavailable and falls back to your manual fraud rules instead.

In The Article
- Benefits
- How to Configure AI Fraud Detection
- Step 1: Enable AI Fraud Detection
- Step 2: Choose Where AI Fraud Detection Applies
- Step 3: Connect Your LLM Provider
- Step 4: Select and Refresh the LLM Model
- Step 5: Set the AI Threshold to Block
- Step 6: Add a Custom Block Message (Optional)
- Step 7: Check the AI Decision on an Order
- Example Use Cases
- Conclusion
- FAQs
Benefits
Configuring AI Fraud Detection can help you:
- Catch fraud patterns your rule-based scoring alone might miss, using AI's contextual read on each order
- Keep orders protected even when your AI provider is down or rate-limited, since manual rules can pick up the slack
- Show blocked customers a message you control, instead of a generic decline
How to Configure AI Fraud Detection
Step 1: Enable AI Fraud Detection
Toggle Enable AI Fraud Detection on. Nothing else on this screen does anything until it's switched on.
Step 2: Choose Where AI Fraud Detection Applies
Under Apply AI Fraud Detection to, pick one of three options:
| Option | What it does |
|---|---|
| Both AI and Manual Fraud Detection (Recommended) | Runs AI scoring and the plugin's rule-based engine together. If the AI call fails, manual rules still cover the order. |
| AI Fraud Detection Only | Only the AI provider evaluates orders. There's no rule-based backup if the AI call fails. |
| Rule-Based Fraud Detection | Skips AI entirely and uses only your manual fraud rules — no API key needed. |
Step 3: Connect Your LLM Provider
Choose your LLM Provider from the dropdown (Google or OpenAI, depending on your setup), then paste your API Key into the field below it. Click the eye icon to reveal the key and confirm it's correct. Use Test Connection to verify the plugin can reach your provider before you save.
Step 4: Select and Refresh the LLM Model
Pick a model from LLM Model Selection — the example here shows Gemini 3.5 Flash. Providers add and retire models over time, so click Refresh Models whenever you want to pull the current list instead of working off a stale dropdown.
Step 5: Set the AI Threshold to Block
Enter a number from 0–100 in AI Threshold to Block. This is the confidence score at which the plugin blocks an order. For example, a threshold of 70 blocks anything the AI scores at 70 or above and lets everything below it through.
Step 6: Add a Custom Block Message (Optional)
Type your own wording into Custom Block Message if you don't want blocked customers to see the plugin's default message with AI reasons. Leave it empty to keep the default.
Step 7: Check the AI Decision on an Order
Once configured, your WooCommerce store will automatically identify and block fraudulent orders in real time.
Now, open any WooCommerce order to see the AI Fraud Risk box in the sidebar. It shows the risk score, the threshold that was applied at the time, and the AI Decision.
If the AI call fails — for example, your provider returns a rate-limit error — the box shows AI Decision: AI Unavailable, along with the error details. If you picked Both AI and Manual Fraud Detection in Step 2, the order still gets checked by your manual rules, and the box tells you exactly that.
Example Use Cases
Running low on API credits: Pick Both AI and Manual Fraud Detection so a maxed-out quota or provider outage doesn't leave orders unchecked — your rule-based engine covers the gap automatically.
Testing AI before committing: Start with AI Fraud Detection Only to see how the AI's scores compare to your existing rules before switching to the combined mode.
No budget for API usage: Choose Rule-Based Fraud Detection and skip the API key setup entirely — you keep the plugin's original scoring engine with no AI costs.
Conclusion
AI Fraud Detection adds a live, AI-scored second opinion to your fraud rules — and it no longer leaves you exposed if the AI provider goes down.
Enable it, connect a provider, set your threshold, and choose how it should work alongside your manual rules. From there, every order's decision and reasoning shows up right on the order page.
FAQs
1. Where do I find the AI Fraud Detection settings?
They're in your WooCommerce Fraud Prevention plugin settings, under the AI Fraud Detection tab.
2. What happens if the AI provider fails or hits a rate limit?
The order's AI Decision shows as AI Unavailable, along with the API error returned by your provider. If you selected Both AI and Manual Fraud Detection, the order is still evaluated by your manual rules instead of passing through unchecked.
3. Do I need an API key if I only want rule-based fraud detection?
No. Selecting Rule-Based Fraud Detection under Apply AI Fraud Detection to skips AI entirely, so you can leave the LLM Provider and API Key fields alone.
4. Can I change the AI model later without reconnecting my API key?
Yes. Click Refresh Models to pull the latest list from your provider, then pick a different model from LLM Model Selection at any time — your existing API key stays connected.