πŸ”’ 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

  1. Customer places an order
  2. Shopify creates the order
  3. A webhook is triggered
  4. FraudHawkAI analyzes the order
  5. A risk score is generated
  6. You take action

Prerequisites

Before you begin, make sure you have:


Step-by-step setup

Step 1: Get your webhook URL

  1. Log in to your FraudHawkAI dashboard
  2. Navigate to Dashboard β†’ Webhooks
  3. 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

  1. Log in to your Shopify admin dashboard
  2. Go to Settings β†’ Notifications
  3. Scroll down to the Webhooks section
  4. Click Create webhook

Step 3: Create the "Order creation" webhook

  1. Click Create webhook
  2. Configure the webhook using the values below
  3. Click Save webhook
SettingValue
EventOrder creation
FormatJSON
URLhttps://www.fraudhawkai.com/api/webhooks/shopify?token=frgk_your_token
Webhook API versionLatest

Step 4: Create the "Order update" webhook

  1. Click Create webhook
  2. Configure the webhook using the values below
  3. Click Save webhook
SettingValue
EventOrder update
FormatJSON
URLhttps://www.fraudhawkai.com/api/webhooks/shopify?token=frgk_your_token
Webhook API versionLatest

Important: Create separate webhooks for both "Order creation" and "Order update" events to capture all order activity.

Step 5: Test your integration

  1. Place a test order in your Shopify store
  2. Check the delivery status under Settings β†’ Notifications β†’ Webhooks
  3. Confirm the webhook shows a successful delivery
  4. 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}
ComponentDescription
{https://www.fraudhawkai.com}Our web server domain
/api/webhooks/shopifyThe 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)"
}