π 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 Shopify 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
- Shopify 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
- Admin access to your Shopify store
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/shopify?token=frgk_your_webhook_token
Note: This URL contains your unique token. Keep it secure and never share it publicly.
Step 2: Open Shopify webhook settings
- Log in to your Shopify admin dashboard
- Go to Settings β Notifications
- Scroll down to the Webhooks section
- Click Create webhook
Step 3: Create the "Order creation" webhook
- Click Create webhook
- Configure the webhook using the values below
- Click Save webhook
| Setting | Value |
|---|---|
| Event | Order creation |
| Format | JSON |
| URL | https://www.fraudhawkai.com/api/webhooks/shopify?token=frgk_your_token |
| Webhook API version | Latest |
Step 4: Create the "Order update" webhook
- Click Create webhook
- Configure the webhook using the values below
- Click Save webhook
| Setting | Value |
|---|---|
| Event | Order update |
| Format | JSON |
| URL | https://www.fraudhawkai.com/api/webhooks/shopify?token=frgk_your_token |
| Webhook API version | Latest |
Important: Create separate webhooks for both "Order creation" and "Order update" events to capture all order activity.
Step 5: Test your integration
- Place a test order in your Shopify store
- Check the delivery status under Settings β Notifications β Webhooks
- Confirm the webhook shows a successful delivery
- 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/shopify?token={your-webhook-token}
| Component | Description |
|---|---|
{https://www.fraudhawkai.com} | Our web server domain |
/api/webhooks/shopify | The Shopify webhook endpoint |
?token={your-token} | Your unique webhook token, used for authentication |
What data we receive
When an order is placed, Shopify sends a payload similar to the one below:
{
"id": 1234567890,
"order_number": 1001,
"financial_status": "pending",
"currency": "PKR",
"total_price": "15000.00",
"billing_address": {
"first_name": "Ahmed",
"last_name": "Raza",
"phone": "03001234567",
"address1": "House #123, Street 5",
"city": "Karachi",
"province": "Sindh",
"zip": "75500",
"country": "Pakistan"
},
"shipping_address": {
"first_name": "Ahmed",
"last_name": "Raza",
"address1": "House #123, Street 5",
"city": "Karachi",
"province": "Sindh",
"zip": "75500",
"country": "Pakistan"
},
"customer": {
"first_name": "Ahmed",
"last_name": "Raza",
"email": "ahmed@example.com"
},
"line_items": [
{
"name": "Product Name",
"quantity": 2,
"price": "5000.00"
}
],
"gateway": "Cash on Delivery (COD)"
}