How to configure and use AI Fraud Detection in WooCommerce
The AI Fraud Detection module helps automatically detect and block fraudulent orders in your WooCommerce store.
This feature uses Google or OpenAI intelligence to evaluate every order, calculate a Fraud Risk Score, and decide whether to allow or block the order — based on your configured threshold.

In The Article
Configure AI Fraud Detection
Each setting in this section helps you control how your store connects with the AI provider and determines how orders are analyzed for fraud. Below is a breakdown of every option:
1. Apply AI Fraud Detection to
This option allows you to choose which types of WooCommerce orders will be analyzed using AI.
You can apply AI Fraud Detection to:
- All Orders – every order will be checked automatically
- Specific Payment Methods – e.g., apply only to Credit Card or PayPal transactions
- Specific Locations or User Roles – target high-risk regions or guest checkouts

Use this to focus AI analysis on areas where fraud is more likely, helping optimize your API usage and reduce costs.
2. LLM Provider
Choose your preferred AI engine for fraud detection.
Currently supported providers:
- Google – fast and reliable AI model with strong risk detection for eCommerce data
- OpenAI – advanced contextual understanding with higher accuracy in behavioral analysis

You can switch providers anytime based on performance or cost.
3. LLM Model Selection
Select which AI model from your chosen provider you’d like to use.
Examples:
- For OpenAI:
gpt-4o-miniorgpt-4o - For Google:
Gemini 1.5 ProorGemini Flash

Some models may process data faster, while others provide more accurate contextual risk evaluation. Choose based on your order volume and accuracy needs.
4. API Key
Enter your unique API Key to connect your store with the selected AI provider.
- This key authenticates your plugin with Google or OpenAI.
- You can find it in your provider’s developer console or account settings.
- The plugin will not send or analyze any data until the key is added.
⚠️ Keep your API key secure — do not share it publicly.
5. Test Connection
Use this button to verify that your API key and AI provider connection are working correctly.
Once clicked, the plugin will:
- Send a test request to your selected provider
- Display a success message if connected successfully
- Show an error message if the key or connection is invalid

Always test the connection before saving your final configuration.
6. AI Threshold to Block
Set the risk score limit (0–100) that determines when an order is considered fraudulent.
- Example: If the threshold is set to 70, any order with a risk score of 70 or above will be automatically blocked.
- Orders below the threshold will be allowed normally.

A lower threshold makes the system more strict (more blocks), while a higher threshold makes it more lenient (fewer blocks).
Example Configuration
| Setting | Example Value | Description |
|---|---|---|
| Apply AI Fraud Detection to | All Orders | Every order will be analyzed |
| LLM Provider | OpenAI | Uses OpenAI’s engine for fraud scoring |
| LLM Model Selection | gpt-4o-mini | Fast model optimized for real-time decisions |
| API Key | sk-xxxxxx | Secure key connecting to the provider |
| Test Connection | Clicked → Success | Verified integration |
| AI Threshold to Block | 70 | Orders scoring above 70% risk are blocked |
Expected Outcome
Once configured, your WooCommerce store will automatically detect and block fraudulent orders in real time.

You’ll see the AI decision (Allow or Block) and detailed risk analysis for every order, helping you run a safer, smarter online store.
