π Privacy First: Customer phone numbers are protected using SHA-256 one-way encryption, so even we cannot read them. Other stores can only see whether a delivered order exists for that phone numberβnothing else.
Overview
Integrating FraudHawkAI with your WooCommerce store allows you to detect and prevent COD fraud in real-time. When a customer places an order, we analyze the order data and provide you with a risk score so you can make informed decisions before dispatching.
How it works
- Customer places an order
- WooCommerce creates the order
- A webhook is triggered
- FraudHawkAI analyzes the order
- A risk score is generated
- You take action
Prerequisites
Before you begin, make sure you have:
- A FraudHawkAI account β sign up here
- Your API key β found in Dashboard β API Key
- Your webhook token β found in Dashboard β Webhooks
- A WooCommerce store on version 5.0 or higher
Step-by-step setup
Step 1: Get your webhook URL
- Log in to your FraudHawkAI dashboard
- Navigate to Dashboard β Webhooks
- Copy your webhook URL
Your webhook URL will look like this:
https://www.fraudhawkai.com/api/webhooks/woocommerce?token=frgk_your_webhook_token
Note: This URL contains your unique token. Keep it secure and never share it publicly.
Step 2: Open WooCommerce webhook settings
- Log in to your WooCommerce admin dashboard
- Go to WooCommerce β Settings
- Click the Advanced tab
- Click Webhooks
Step 3: Create the "Order created" webhook
- Click Add webhook
- Configure the webhook using the values below
- Click Save webhook
| Setting | Value |
|---|---|
| Name | FraudHawkAI - Order Created |
| Status | Active |
| Topic | Order created |
| Delivery URL | https://www.fraudhawkai.com/api/webhooks/woocommerce?token=frgk_your_token |
| API Version | wp_api_v2 |
Step 4: Create the "Order updated" webhook
- Click Add webhook
- Configure the webhook using the values below
- Click Save webhook
| Setting | Value |
|---|---|
| Name | FraudHawkAI - Order Updated |
| Status | Active |
| Topic | Order updated |
| Delivery URL | https://www.fraudhawkai.com/api/webhooks/woocommerce?token=frgk_your_token |
| API Version | wp_api_v2 |
Important: Create separate webhooks for both "Order created" and "Order updated" events to capture all order activity.
Step 5: Test your integration
- Place a test order in your WooCommerce store
- Check the delivery status under WooCommerce β Settings β Advanced β Webhooks
- Confirm the webhook shows a successful delivery (
200status) - Log in to your FraudHawkAI dashboard to see the order appear
Webhook delivery URL format
Your webhook URL follows this format:
https://www.fraudhawkai.com/api/webhooks/woocommerce?token={your-webhook-token}
| Component | Description |
|---|---|
{https://www.fraudhawkai.com} | Our web server domain |
/api/webhooks/woocommerce | The WooCommerce webhook endpoint |
?token={your-token} | Your unique webhook token, used for authentication |
What data we receive
When an order is placed, WooCommerce sends a payload similar to the one below:
{
"id": 1234,
"order_number": "1001",
"status": "processing",
"currency": "PKR",
"total": "15000.00",
"billing": {
"first_name": "Ahmed",
"last_name": "Raza",
"email": "ahmed@example.com",
"phone": "03001234567",
"address_1": "House #123, Street 5",
"city": "Karachi",
"state": "Sindh",
"postcode": "75500",
"country": "PK"
},
"shipping": {
"first_name": "Ahmed",
"last_name": "Raza",
"address_1": "House #123, Street 5",
"city": "Karachi",
"state": "Sindh",
"postcode": "75500",
"country": "PK"
},
"line_items": [
{
"name": "Product Name",
"quantity": 2,
"price": "5000.00",
"total": "10000.00"
}
],
"payment_method": "cod"
}
Contact support for any questions or concerns. Get Help