Key fraud signals computable from Paystack data: 1) Velocity — more than N successful transactions from the same card or email in 1 hour. 2) BIN mismatch — card BIN (first 6 digits) country differs from customer's stated country (Paystack returns authorization.country_code). 3) Amount anomaly — large round amounts from first-time customers. 4) Email pattern — disposable email domains. 5) Time-of-day spike — unusual volume at 2-4am local time. These signals feed a risk score. Flag for human review at a threshold; do not auto-block. False positives cost real customers real money.
Paystack transaction data fields useful for fraud detection:
| Signal | Paystack Field | What to Compute | Risk Indicator |
|---|---|---|---|
| Velocity | customer.email, paid_at | Count transactions from same email in last 1 hour | > 3 attempts in 1 hour = high risk |
| BIN mismatch | authorization.bin, authorization.country_code, customer metadata | Compare card-issuing country to customer country | Mismatch on first-time customer = medium risk |
| Amount anomaly | amount, customer history | Compare amount to customer's average transaction | > 5× average from first-time customer = medium risk |
| Round amount | amount | Is amount divisible by 10,000 (kobo)? | Large round amounts from new customers = low-medium risk |
| Email pattern | customer.email | Check domain against disposable email list | Disposable domain = medium risk |
| Card reuse | authorization.signature | Count distinct customers using same card signature | > 2 customers on same card = high risk |
// Risk scorer — computes a score from Paystack transaction data
async function scoreTransaction(txn) {
var signals = [];
var score = 0;
// Velocity: count same email in last hour
var recentCount = await db.transactions.countByEmailInHour(txn.customer.email);
if (recentCount > 3) { signals.push('high_velocity'); score += 40; }
else if (recentCount > 1) { signals.push('moderate_velocity'); score += 15; }
// BIN mismatch: card country vs customer country
var cardCountry = txn.authorization?.country_code;
var customerCountry = txn.metadata?.customer_country;
if (cardCountry && customerCountry && cardCountry !== customerCountry) {
signals.push('bin_country_mismatch'); score += 20;
}
// Card reuse across multiple customers
var cardCustomers = await db.transactions.countCustomersByCardSignature(txn.authorization?.signature);
if (cardCustomers > 2) { signals.push('card_shared_across_customers'); score += 50; }
// Disposable email
var disposableDomains = ['mailinator.com', 'guerrillamail.com', 'temp-mail.org'];
if (disposableDomains.some(d => txn.customer.email.endsWith('@' + d))) {
signals.push('disposable_email'); score += 25;
}
return { score, signals, action: score >= 60 ? 'review' : score >= 30 ? 'monitor' : 'allow' };
}
See AI-assisted reconciliation for the broader AI in financial operations context.
KES 2,999
The definitive guide to building payment systems with Paystack — from your first transaction to production-grade payment infrastructure across Africa. 9 modules, 47 lessons. Free preview available.
Start Paystack Course