Courier Fraud Shield WordPress Plugin & Laravel API
Prevent Cash on Delivery (COD) losses by automatically checking customer return history across Steadfast, Pathao, RedX, Carrybee, and Paperfly directly inside WooCommerce and custom Laravel stores.
Use this Universal Speed Code in your Store
This Speed Code authenticates your store with Pixahunt. Copy-paste it into your WordPress plugin settings or your Laravel .env file.
PXF-U12-xxxxxxxxxxxxxxxx
WordPress Plugin Installation & Setup
Download Plugin Zip
Download the official zip file from Pixahunt and save it to your computer.
📥 Download Zip (245 KB)Upload & Activate
In WordPress Admin, navigate to Plugins > Add New > Upload Plugin. Install and click Activate.
Paste Speed Code
Go to Courier Fraud Shield > Settings & API. Enter your Speed Code and click Connect Store.
Live Protection Active
Checkout phone checks and Admin order fraud badges are now fully live and protecting your store.
Key WordPress Plugin Capabilities:
Laravel Full Integration Guide & Source Code
Integrate the exact same system into custom Laravel stores, Bagisto, Aimeos, or custom SaaS apps.
POST /api/v1/wordpress/courier-fraud/check
<?php
namespace App\Services;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
class CourierFraudService
{
protected string $baseUrl;
protected string $speedCode;
protected string $siteUrl;
public function __construct()
{
$this->baseUrl = rtrim(config('services.pixahunt.url', 'https://pixahunt.com'), '/');
$this->speedCode = config('services.pixahunt.speed_code', env('PIXAHUNT_SPEED_CODE', ''));
$this->siteUrl = config('app.url', 'https://myshop.com');
}
/**
* Check Customer Phone Number across Steadfast, Pathao, RedX, Carrybee & Paperfly
* Deducts 0.03125 credits per check from your universal Pixahunt balance.
*
* @param string $phone Customer 11-digit mobile number (e.g. 01712345678)
* @param bool $force Bypass cache if fresh check is desired
* @return array
*/
public function checkCustomer(string $phone, bool $force = false): array
{
try {
$response = Http::timeout(6)
->withHeaders([
'X-Speed-Code' => $this->speedCode,
'X-Site-Url' => $this->siteUrl,
'Accept' => 'application/json',
])
->post("{$this->baseUrl}/api/v1/wordpress/courier-fraud/check", [
'phone' => $phone,
'site_url' => $this->siteUrl,
'force' => $force,
]);
if ($response->successful()) {
return $response->json();
}
Log::warning('Pixahunt Courier Fraud Check Failed', [
'status' => $response->status(),
'message' => $response->body(),
]);
return [
'success' => false,
'message' => $response->json('message') ?? 'Failed to check customer record.',
];
} catch (\Throwable $e) {
Log::error('Pixahunt Fraud Service Exception: ' . $e->getMessage());
return [
'success' => false,
'message' => 'Courier fraud checking service temporarily unavailable.',
];
}
}
/**
* Check Remaining Credit Balance & Checks Left
*/
public function getCredits(): array
{
try {
$response = Http::timeout(4)
->withHeaders(['X-Speed-Code' => $this->speedCode])
->get("{$this->baseUrl}/api/v1/wordpress/courier-fraud/credits");
return $response->json() ?? ['success' => false];
} catch (\Throwable $e) {
return ['success' => false, 'error' => $e->getMessage()];
}
}
}
<?php
namespace App\Http\Controllers;
use App\Services\CourierFraudService;
use Illuminate\Http\Request;
class CheckoutController extends Controller
{
protected CourierFraudService $fraudService;
public function __construct(CourierFraudService $fraudService)
{
$this->fraudService = $fraudService;
}
/**
* Real-time AJAX endpoint called on Checkout when user finishes typing phone
*/
public function verifyCustomerPhone(Request $request)
{
$request->validate([
'phone' => 'required|string|min:11|max:14',
]);
$result = $this->fraudService->checkCustomer($request->input('phone'));
if (!$result['success']) {
return response()->json(['success' => false, 'message' => $result['message']], 422);
}
$summary = $result['summary'] ?? [];
$successRate = (float) ($summary['success_rate'] ?? 0);
$totalParcels = (int) ($summary['total_parcels'] ?? 0);
// Smart E-Commerce Decision Logic:
$requireAdvancePayment = ($totalParcels > 0 && $successRate < 60);
return response()->json([
'success' => true,
'summary' => $summary,
'couriers' => $result['couriers'] ?? [],
'require_advance_payment' => $requireAdvancePayment,
'advisory' => $requireAdvancePayment
? 'High return risk detected. Please take delivery fee in advance.'
: 'Safe for Cash on Delivery (COD).',
]);
}
}
# =========================================================================
# 1. Add to your Laravel .env file
# =========================================================================
PIXAHUNT_URL="https://pixahunt.com"
PIXAHUNT_SPEED_CODE="PXF-U12-xxxxxxxxxxxxxxxx"
# =========================================================================
# 2. Add to config/services.php inside the returned array:
# =========================================================================
'pixahunt' => [
'url' => env('PIXAHUNT_URL', 'https://pixahunt.com'),
'speed_code' => env('PIXAHUNT_SPEED_CODE'),
],
# Direct cURL Request Example:
curl -X POST https://pixahunt.com/api/v1/wordpress/courier-fraud/check \
-H "X-Speed-Code: PXF-U12-xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"phone": "01712345678",
"site_url": "https://myshop.com"
}'
# Native PHP cURL Snippet:
<?php
$ch = curl_init('https://pixahunt.com/api/v1/wordpress/courier-fraud/check');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-Speed-Code: PXF-U12-xxxxxxxxxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'phone' => '01712345678',
'site_url' => 'https://myshop.com',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data);
API Request & Response Format
📤 Request Specifications
| Parameter | Type | Location | Required |
|---|---|---|---|
| X-Speed-Code | string | Header | Yes |
| phone | string | Body (JSON) | Yes |
| site_url | string | Body (JSON) | Optional |
| force | boolean | Body (JSON) | Optional |
প্রতিবার চেক রিকোয়েস্টে আপনার একাউন্ট থেকে ০.০৩১Token (Credit) বিয়োগ হবে। ১ টাকায় পাবেন ৩২টি চেক। ৩ দিনের মধ্যে একই নম্বরে চেক করলে ক্যাশ থেকে রিটার্ন হবে, কোনো অতিরিক্ত ক্রেডিট কাটা হবে না।
📥 200 OK Response JSON Schema
200 OK{
"success": true,
"phone": "01712345678",
"summary": {
"total_parcels": 48,
"total_delivered": 43,
"total_returned": 5,
"success_rate": 89.58,
"return_rate": 10.42,
"risk_level": "low",
"recommendation": "Safe for Cash on Delivery"
},
"couriers": {
"steadfast": {
"total_parcels": 24,
"delivered": 22,
"returned": 2,
"success_rate": 91.67
},
"pathao": {
"total_parcels": 16,
"delivered": 14,
"returned": 2,
"success_rate": 87.5
},
"redx": {
"total_parcels": 8,
"delivered": 7,
"returned": 1,
"success_rate": 87.5
},
"carrybee": {
"total_parcels": 10,
"delivered": 9,
"returned": 1,
"success_rate": 90.0
},
"paperfly": {
"total_parcels": 6,
"delivered": 5,
"returned": 1,
"success_rate": 83.33
}
},
"user_credits": {
"balance": 99.96875,
"deducted": 0.03125,
"checks_remaining": 3199
}
}
Need Credits for Your Store?
No recurring subscriptions. Top up via bKash, Nagad, cards or direct WhatsApp order anytime.
Integration FAQs
১. ওয়ার্ডপ্রেস প্লাগইন ও লারাভেল অ্যাপ কি একই ক্রেডিট ব্যালেন্স শেয়ার করে? ✓
হ্যাঁ! আপনার Pixahunt একাউন্টে যে স্পিড কোড রয়েছে, সেটি আপনি ওয়ার্ডপ্রেস স্টোরেও দিতে পারেন আবার লারাভেল স্টোরেও দিতে পারেন। উভয় স্টোরে আলাদা কোনো ফি লাগবে না, একই ক্রেডিট ওয়ালেট থেকে স্বয়ংক্রিয়ভাবে ০.০৩১Token করে কাটবে।
২. একটি স্পিড কোড দিয়ে কি একাধিক স্টোরে কানেক্ট করা যাবে? ✓
হ্যাঁ, আপনি একই স্পিড কোড দিয়ে যত খুশি ওয়েবসাইট বা মোবাইল অ্যাপে কানেক্ট করতে পারেন।
৩. গ্রাহক যদি বারবার রিফ্রেশ দেয় বা একই নম্বরে বারবার সার্চ করে, তবে কি প্রতিবার ক্রেডিট কাটবে? ✓
না! আমাদের সিস্টেমে ৩ দিনের স্মার্ট ক্যাশিং রয়েছে। কোনো নম্বর একবার চেক হওয়ার পর আগামী ৩ দিন সেই নম্বরের ডাটা ক্যাশ থেকে পরিবেশন করা হবে এবং কোনো ক্রেডিট কাটা হবে না।