Skip to content

Fraud Detection API

Monitor and manage fraud detection for your store. Track suspicious transactions, review flagged orders, and configure fraud prevention settings.

Get Fraud Statistics

Get dashboard statistics for fraud detection activity.

http
GET /api/external/v1/fraud/dashboard

Example Request

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/fraud/dashboard" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

Response

json
{
  "success": true,
  "data": {
    "stats": {
      "today": {
        "blocked": 3,
        "flagged": 7,
        "allowed": 156
      },
      "this_week": {
        "blocked": 12,
        "flagged": 28
      },
      "this_month": {
        "blocked": 45,
        "flagged": 89
      },
      "pending_review": 15,
      "high_risk_today": 5
    }
  }
}

List Fraud Checks

Get a paginated list of fraud checks for your store.

http
GET /api/external/v1/fraud/checks

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
risk_levelstringFilter by risk: low, medium, high, critical
action_takenstringFilter by action: allowed, flagged, blocked, verification_required
is_reviewedbooleanFilter by review status
start_datestringStart date (YYYY-MM-DD)
end_datestringEnd date (YYYY-MM-DD)

Example Request

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/fraud/checks?risk_level=high&is_reviewed=false" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

Response

json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "order_id": 123,
      "customer_id": 45,
      "ip_address": "192.168.1.1",
      "risk_score": 75,
      "risk_level": "high",
      "action_taken": "flagged",
      "detected_country": "US",
      "billing_country": "GB",
      "detected_city": "New York",
      "is_vpn": true,
      "is_proxy": false,
      "is_datacenter": false,
      "is_tor": false,
      "is_sanctioned_country": false,
      "has_geo_mismatch": true,
      "has_velocity_violation": false,
      "is_disposable_email": false,
      "is_reviewed": false,
      "reviewed_by": null,
      "reviewed_at": null,
      "review_outcome": null,
      "created_at": "2025-01-20T14:30:00Z",
      "order": {
        "id": 123,
        "order_number": "ORD-2025-001"
      },
      "customer": {
        "id": 45,
        "name": "John Doe"
      }
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 20,
    "total": 98
  }
}

Get Single Fraud Check

Get detailed information about a specific fraud check.

http
GET /api/external/v1/fraud/checks/{id}

Example Request

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/fraud/checks/1" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

Response

json
{
  "success": true,
  "data": {
    "check": {
      "id": 1,
      "order_id": 123,
      "customer_id": 45,
      "ip_address": "192.168.1.1",
      "email": "customer@example.com",
      "user_agent": "Mozilla/5.0...",
      "risk_score": 75,
      "risk_level": "high",
      "action_taken": "flagged",
      "signals": {
        "vpn": 30,
        "geo_mismatch": 25,
        "header_anomalies": 20
      },
      "detected_country": "US",
      "billing_country": "GB",
      "detected_city": "New York",
      "asn_name": "Example ISP",
      "asn_number": 12345,
      "is_vpn": true,
      "is_proxy": false,
      "is_datacenter": false,
      "is_tor": false,
      "is_sanctioned_country": false,
      "has_geo_mismatch": true,
      "has_velocity_violation": false,
      "is_disposable_email": false,
      "is_reviewed": false,
      "reviewed_by": null,
      "reviewed_at": null,
      "review_outcome": null,
      "review_notes": null,
      "created_at": "2025-01-20T14:30:00Z",
      "order": {
        "id": 123,
        "order_number": "ORD-2025-001",
        "status": "completed",
        "total": "29.99"
      },
      "customer": {
        "id": 45,
        "name": "John Doe",
        "email": "customer@example.com"
      }
    },
    "detected_signals": ["VPN", "Geo Mismatch"],
    "risk_badge": {
      "label": "High",
      "color": "orange"
    },
    "action_badge": {
      "label": "Flagged",
      "color": "yellow"
    }
  }
}

Review Fraud Check

Mark a fraud check as reviewed with an outcome.

http
POST /api/external/v1/fraud/checks/{id}/review

Request Body

ParameterTypeRequiredDescription
outcomestringYesReview outcome: legitimate, fraud, inconclusive
notesstringNoReview notes (max 1000 characters)

Example Request

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/fraud/checks/1/review" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "outcome": "legitimate",
    "notes": "Customer confirmed via support ticket - using VPN for privacy"
  }'

Response

json
{
  "success": true,
  "message": "Fraud check marked as reviewed",
  "data": {
    "id": 1,
    "is_reviewed": true,
    "reviewed_by": 12,
    "reviewed_at": "2025-01-20T15:45:00Z",
    "review_outcome": "legitimate",
    "review_notes": "Customer confirmed via support ticket - using VPN for privacy"
  }
}

Get Fraud Settings

Get current fraud detection configuration for your store.

http
GET /api/external/v1/fraud/settings

Example Request

bash
curl -X GET "https://yourstore.pixlpay.net/api/external/v1/fraud/settings" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

Response

json
{
  "success": true,
  "data": {
    "settings": {
      "fraud_detection_enabled": true,
      "fraud_sensitivity_level": "medium",
      "fraud_action": "flag",
      "fraud_block_vpn": true,
      "fraud_block_proxy": true,
      "fraud_block_datacenter": false,
      "fraud_block_tor": true,
      "fraud_block_sanctioned_countries": true,
      "fraud_check_geo_mismatch": true,
      "fraud_check_velocity": true,
      "fraud_check_disposable_email": true,
      "fraud_velocity_limit_orders_per_ip": 5,
      "fraud_velocity_limit_orders_per_email": 3,
      "fraud_velocity_window_minutes": 60,
      "fraud_custom_blocked_countries": ["KP", "IR"],
      "fraud_whitelisted_ips_count": 12,
      "fraud_whitelisted_emails_count": 5
    },
    "sanctioned_countries": ["KP", "IR", "SY", "CU"],
    "high_risk_countries": ["NG", "RU", "UA", "BY"]
  }
}

Update Fraud Settings

Update fraud detection configuration for your store.

http
PUT /api/external/v1/fraud/settings

Request Body

ParameterTypeDescription
fraud_detection_enabledbooleanEnable/disable fraud detection
fraud_sensitivity_levelstringSensitivity: low, medium, high
fraud_actionstringDefault action: block, flag, verify
fraud_block_vpnbooleanBlock VPN connections
fraud_block_proxybooleanBlock proxy connections
fraud_block_datacenterbooleanBlock datacenter IPs
fraud_block_torbooleanBlock Tor exit nodes
fraud_block_sanctioned_countriesbooleanBlock sanctioned countries
fraud_check_geo_mismatchbooleanCheck for geo/billing mismatch
fraud_check_velocitybooleanEnable velocity checks
fraud_check_disposable_emailbooleanCheck for disposable emails
fraud_velocity_limit_orders_per_ipintegerMax orders per IP (1-100)
fraud_velocity_limit_orders_per_emailintegerMax orders per email (1-50)
fraud_velocity_window_minutesintegerVelocity window in minutes (15-1440)
fraud_custom_blocked_countriesarrayArray of ISO country codes to block
fraud_whitelisted_ipsarrayArray of whitelisted IP addresses
fraud_whitelisted_emailsarrayArray of whitelisted email addresses

Example Request

bash
curl -X PUT "https://yourstore.pixlpay.net/api/external/v1/fraud/settings" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fraud_detection_enabled": true,
    "fraud_sensitivity_level": "high",
    "fraud_block_vpn": true,
    "fraud_velocity_limit_orders_per_ip": 3,
    "fraud_velocity_window_minutes": 30
  }'

Response

json
{
  "success": true,
  "message": "Fraud settings updated successfully",
  "data": {
    "fraud_detection_enabled": true,
    "fraud_sensitivity_level": "high",
    "fraud_block_vpn": true,
    "fraud_velocity_limit_orders_per_ip": 3,
    "fraud_velocity_window_minutes": 30
  }
}

Whitelist Management

Add IP to Whitelist

http
POST /api/external/v1/fraud/whitelist/ip

Request Body

ParameterTypeRequiredDescription
ipstringYesValid IP address to whitelist

Example Request

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/fraud/whitelist/ip" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ip": "192.168.1.100"}'

Response

json
{
  "success": true,
  "message": "IP added to whitelist",
  "data": {
    "whitelisted_ips": ["192.168.1.100", "10.0.0.50"]
  }
}

Remove IP from Whitelist

http
DELETE /api/external/v1/fraud/whitelist/ip

Request Body

ParameterTypeRequiredDescription
ipstringYesIP address to remove

Example Request

bash
curl -X DELETE "https://yourstore.pixlpay.net/api/external/v1/fraud/whitelist/ip" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ip": "192.168.1.100"}'

Add Email to Whitelist

http
POST /api/external/v1/fraud/whitelist/email

Request Body

ParameterTypeRequiredDescription
emailstringYesValid email address to whitelist

Example Request

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/fraud/whitelist/email" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email": "trusted@example.com"}'

Remove Email from Whitelist

http
DELETE /api/external/v1/fraud/whitelist/email

Request Body

ParameterTypeRequiredDescription
emailstringYesEmail address to remove

Blocked Countries Management

Add Country to Block List

http
POST /api/external/v1/fraud/blocked-countries

Request Body

ParameterTypeRequiredDescription
country_codestringYesISO 3166-1 alpha-2 country code (e.g., "RU")

Example Request

bash
curl -X POST "https://yourstore.pixlpay.net/api/external/v1/fraud/blocked-countries" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"country_code": "RU"}'

Response

json
{
  "success": true,
  "message": "Country added to blocked list",
  "data": {
    "blocked_countries": ["KP", "IR", "RU"]
  }
}

Remove Country from Block List

http
DELETE /api/external/v1/fraud/blocked-countries

Request Body

ParameterTypeRequiredDescription
country_codestringYesISO 3166-1 alpha-2 country code

Example Request

bash
curl -X DELETE "https://yourstore.pixlpay.net/api/external/v1/fraud/blocked-countries" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"country_code": "RU"}'

Fraud Check Object

FieldTypeDescription
idintegerUnique identifier
order_idintegerAssociated order ID
customer_idintegerAssociated customer ID
ip_addressstringIP address of the transaction
emailstringCustomer email (detailed view only)
user_agentstringBrowser user agent
risk_scoreintegerRisk score (0-100)
risk_levelstringlow, medium, high, critical
action_takenstringallowed, flagged, blocked, verification_required
signalsobjectDetected fraud signals with scores
detected_countrystringCountry code from IP geolocation
billing_countrystringCountry code from billing address
detected_citystringCity from IP geolocation
asn_namestringISP/ASN name
asn_numberintegerASN number
is_vpnbooleanVPN detected
is_proxybooleanProxy detected
is_datacenterbooleanDatacenter IP detected
is_torbooleanTor exit node detected
is_sanctioned_countrybooleanSanctioned country detected
has_geo_mismatchbooleanGeographic mismatch between IP and billing
has_velocity_violationbooleanOrder velocity limit exceeded
is_disposable_emailbooleanDisposable email detected
is_reviewedbooleanWhether check has been reviewed
reviewed_byintegerUser ID who reviewed
reviewed_atstringISO 8601 review timestamp
review_outcomestringlegitimate, fraud, inconclusive
review_notesstringReview notes
created_atstringISO 8601 creation timestamp

Risk Levels

LevelScore RangeDescription
low0-39Transaction appears safe
medium40-59Minor risk signals detected
high60-79Significant risk signals detected
critical80-100High probability of fraud

Action Types

ActionDescription
allowedTransaction was allowed to proceed
flaggedTransaction flagged for review but allowed
blockedTransaction was blocked
verification_requiredAdditional verification required

Sensitivity Levels

LevelDescription
lowOnly block obvious fraud (score >= 80)
mediumBalanced protection (score >= 60 to block)
highAggressive protection (score >= 40 to block)

Errors

StatusErrorDescription
401UnauthorizedInvalid or missing token
403ForbiddenToken lacks fraud:read or fraud:write scope
404Not FoundFraud check doesn't exist
422Validation ErrorInvalid request parameters

Built for game developers, by game developers.