The Infrastructure For Credible Commerce In Africa
Powered by Squad's API stack, Benchmark solves the ₦5.2 billion e-commerce fraud problem by verifying vendors before they receive a single payment.
const Benchmark = require('squadbenchjs');
const benchmark = new Benchmark({
apiKey: process.env.BENCHMARK_API_KEY
});
// Create escrow with Squad VA
const escrow = await benchmark.escrow.create({
vendor_id: 'vendor_abc123',
amount: 45000,
item_description: 'Smartphone',
buyer_phone: '+2348012345678'
});
console.log(escrow.checkout_url);
// → https://checkout.squadco.com/pay/...Total Escrow Protected
₦285,420
Escrow funded via Squad VA
POST /escrow/create
Vendor verification passed
Every day, Nigerians send money to vendors they cannot verify — and receive nothing.
Payment processing works. Squad, Paystack, and Flutterwave handle the transaction flawlessly. But none of them tell you if the vendor is real. That's the infrastructure gap Benchmark closes.
Lost to e-commerce fraud in Nigeria (2023, NITDA)
of online shoppers report being defrauded at least once
Informal social commerce vendors with no verification layer
Identity. Escrow. Trust Score.
1. Identity Verification
AI-powered liveness detection + government ID comparison. A vendor proves they are a real person before receiving any payment. Computer vision ensures no deepfakes or static images.
2. Escrow on Squad
Every payment is held in a dedicated Squad virtual account. The vendor never touches the money until the buyer confirms delivery or 72 hours pass. No delivery, no fraud pathway.
3. Live Trust Score
Every completed transaction, dispute, and on-time delivery updates a vendor's portable trust score. Buyers see it. Platforms use it. Vendors earn it.
How Squad Powers Benchmark
Squad is not a decorative integration. Remove Squad and Benchmark does not function. Here's exactly how:
Virtual AccountsEvery escrow gets a dedicated Squad VA. Buyer pays in, money sits until delivery confirmation.
Payment InitiationCheckout URLs generated by Squad's transaction initiate endpoint. Benchmark wraps and delivers in one API call.
Webhooks`charge_successful` webhook triggers the entire AI anomaly detection pipeline. Without it, no analysis runs.
Transfer APIOn delivery confirmation, Squad's payout endpoint releases funds to vendor bank account automatically.
Refund APIWhen an AI-classified dispute is upheld (85%+ confidence), Squad refund fires without human decision.
Account LookupValidates vendor payout accounts during onboarding to prevent misdirected funds.
Three Production AI Models
- Face Liveness + Document Verification — Computer vision compares live webcam feed against NIN slip. Detects blinks, head turns, deepfake variance.
- Behavioral Anomaly Detection (Isolation Forest) — Runs on every incoming payment webhook. Flags unusual velocity, amounts, or hours. Freezes vendor score and triggers review.
- NLP Dispute Classifier (distilBERT) — Classifies buyer dispute text into categories (non-delivery, counterfeit). Above 85% confidence, resolution and refund are automatic via Squad API.
from sklearn.ensemble import IsolationForest
import numpy as np
# Real-time anomaly detection on Squad webhook payload
def detect_anomaly(transaction_history, new_event):
model = IsolationForest(contamination=0.1, random_state=42)
features = extract_features(transaction_history)
model.fit(features)
prediction = model.predict([new_event])
return "anomaly" if prediction[0] == -1 else "normal"`npm install squadbenchjs`
The official JavaScript SDK. Any marketplace, logistics platform, or cooperative can integrate the entire trust and escrow infrastructure in an afternoon.
const Benchmark = require('squadbenchjs');
const benchmark = new Benchmark({
apiKey: process.env.BENCHMARK_API_KEY,
});
// Create an escrow transaction on behalf of a verified vendor
const escrow = await benchmark.b2b.createEscrow({
vendor_id: 'vendor-uuid',
amount: 45000,
item_description: 'Samsung Galaxy A54',
buyer_phone: '+2348099999999',
});
console.log(escrow.checkout_url);
// Returns Squad checkout URL, wrapped in Benchmark's trust layer