McTaba Labs logo
Software EngineeringThe WhiteboardProjectsEventsMasterclassesWebinarsLearn
Book Call

500+ developers already in the community

Get answers, find accountability partners, and stay ahead

Join Discord →
McTaba Labs logo

Educating 1 million students in tech by 2030.

Programs

  • HighSchool Graduates Launchpad
  • AI & Business Automation
  • Corporate Training
  • McTaba Story & Mission
  • Full-Stack Curriculum
  • Course Pricing & Plans
  • Frequently Asked Questions

Resources

  • Join Discord Community
  • Tech Events in Nairobi
  • Masterclasses
  • Free Resources
  • Learn
  • Campus
  • Africa Tech Talent Report
  • Partner With Us
  • Start a Project
  • Our Work

Contact Us

  • 124 Manyani East Road, Lavington, Nairobi
  • +254727795603
  • Book a Discovery Call

Office Hours:

Mon-Fri: 9am - 2pm EAT

Sat: 10am - 12pm EAT

© 2027 McTaba Labs - A product of Edtech Industries. All rights reserved.

Privacy PolicyTerms of ServiceRefund Policy
  1. Learn
  2. Paystack for African Developers
  3. Fraud Signals Available in Paystack Transaction Data
Bonaventure OgetoBy Bonaventure Ogeto|Updated July 22, 2026

Fraud Signals Available in Paystack Transaction Data

Key fraud signals in Paystack transaction data: (1) risk_action — Paystack's own risk score: "allow", "deny", or "review"; (2) ip_address — the customer's IP at charge time; (3) gateway_response — card network response messages like "Do Not Honor" or "Stolen Card"; (4) channel — card charges carry more fraud risk than bank transfers; (5) authorization.reusable — a card that suddenly becomes reusable without prior subscription setup is suspicious; (6) attempts — multiple failed attempts before success on the same reference indicate probing.

In this article

  1. 1. Key Fraud Signal Fields in Paystack Transaction Data
  2. 2. Building a Fraud Score From Paystack Data
  3. 3. Learn More

Key Fraud Signal Fields in Paystack Transaction Data

When you call GET /transaction/verify/:reference or receive a charge.success webhook, the transaction object contains several fraud-relevant fields:

FieldLocationWhat It Signals
risk_action Top-level Paystack's internal risk score: "allow", "deny", or "review". "review" means proceed with caution.
ip_address Top-level Customer's IP at time of charge. Velocity-check this against recent failed attempts.
gateway_response Top-level Raw card network response: "Approved", "Do Not Honor", "Stolen Card", "Lost Card", "Restricted Card".
channel Top-level Payment method: "card", "bank", "ussd", "mobile_money". Card has highest fraud surface.
authorization.bin Nested First 6 digits of card. Cross-reference against known fraud BINs from your history.
authorization.country_code Nested Card-issuing country. Mismatch with customer's IP country is a weak fraud signal.
authorization.reusable Nested If true and the customer has no subscription, the card may have been saved without consent.

Building a Fraud Score From Paystack Data

// fraud-score.js
var blockedIPs = new Set(); // Load from Redis or DB

function scoreFraud(transaction) {
  var score = 0;
  var flags = [];

  // Hard signals from Paystack risk engine
  if (transaction.risk_action === 'deny') {
    score += 100;
    flags.push('paystack_risk_deny');
  }
  if (transaction.risk_action === 'review') {
    score += 20;
    flags.push('paystack_risk_review');
  }

  // Gateway response signals
  var badResponses = ['Do Not Honor', 'Stolen Card', 'Lost Card', 'Restricted Card', 'Pick Up Card'];
  if (badResponses.some(r => transaction.gateway_response?.includes(r))) {
    score += 25;
    flags.push('bad_gateway_response:' + transaction.gateway_response);
  }

  // IP velocity signals
  if (blockedIPs.has(transaction.ip_address)) {
    score += 30;
    flags.push('blocked_ip');
  }

  // Channel signals — card on large amount
  if (transaction.channel === 'card' && transaction.amount > 5000000) { // NGN 50,000
    score += 10;
    flags.push('large_card_charge');
  }

  // Country mismatch
  var cardCountry = transaction.authorization?.country_code;
  var ipCountry = resolveIPCountry(transaction.ip_address); // your GeoIP lookup
  if (cardCountry && ipCountry && cardCountry !== ipCountry) {
    score += 15;
    flags.push('country_mismatch:' + cardCountry + '_vs_' + ipCountry);
  }

  return { score, flags, action: score >= 50 ? 'hold' : score >= 20 ? 'log' : 'pass' };
}

// Use in webhook handler
if (event.event === 'charge.success') {
  var fraud = scoreFraud(event.data);
  if (fraud.action === 'hold') {
    await db.orders.update({ id: orderId, status: 'fraud_hold', fraud_flags: fraud.flags });
    await alertTeam('Fraud hold on order ' + orderId + ' score ' + fraud.score);
    // Do NOT fulfill the order yet
  } else {
    await fulfillOrder(orderId);
  }
}

Get weekly developer tips

Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.

No spam. Unsubscribe anytime.

Learn More

This guide is part of the Paystack security guide.

Sign up for the McTaba newsletter

Key Takeaways

  • ✓Paystack includes a risk_action field on transaction data: "allow", "deny", or "review". Log this for every transaction.
  • ✓The ip_address field identifies the customer's IP. Cross-reference it against blocklists and velocity checks.
  • ✓gateway_response strings like "Do Not Honor", "Stolen Card", and "Lost Card" are hard fraud signals — escalate these immediately.
  • ✓Card channel transactions carry higher fraud risk than bank transfers. Apply extra scrutiny to card charges for high-value orders.
  • ✓A transaction with many prior failed attempts before succeeding suggests probing — flag these for manual review.
  • ✓Build a simple fraud score by summing risk points: blocked IP (+30), bad gateway_response (+25), risk_action=review (+20), card channel on large amount (+10).

Frequently Asked Questions

What does risk_action: "review" mean in practice?
It means Paystack's fraud engine flagged the transaction as potentially suspicious but did not block it outright. You should log these transactions, consider adding a manual review step before fulfilling high-value orders, and monitor whether "review" transactions have a higher chargeback rate in your data.
Can I access these fraud fields in the Paystack dashboard?
Some fields like gateway_response and channel are visible in the transaction detail view. risk_action and ip_address are in the API response. For systematic fraud analysis, pull transaction data via the API and store these fields in your own database for querying.
Should I block transactions with risk_action: "deny"?
Paystack already blocks deny-rated transactions before they succeed — a charge.success webhook will not fire for them. If you see risk_action: "deny" in a failed transaction notification, record it. If you proactively check via the API, treat deny as a hard stop.
What is the most reliable fraud signal in Paystack data?
gateway_response values like "Stolen Card" and "Lost Card" are the most reliable — these come directly from the card-issuing bank and are almost never false positives. risk_action from Paystack's engine is also reliable. IP velocity (same IP, many different emails, rapid succession) is highly predictive for card testing attacks.

Learn Paystack Integration

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

Not ready? Create Free Account

Keep reading

Paystack Security, Keys and PCI Compliance: Complete Guide

A complete security reference for Paystack integrations. Covers API key types and rotation, secure key storage, PCI DSS compliance scope, price tampering prevention, webhook replay attacks, rate limiting, fraud signals, and logging without exposing secrets.

Read more

Never Commit Your Paystack Key: Detection and Remediation

Committing a Paystack secret key to version control is one of the most common and most dangerous mistakes in payment integrations. This guide shows you how to detect committed keys, set up automated prevention with pre-commit hooks, and remediate the damage when a key does slip through.

Read more

Price Tampering Attacks on Paystack Checkouts

Price tampering is the most common attack on Paystack integrations. The attacker modifies the amount in the frontend checkout initialization, paying a fraction of the actual price. This guide shows how the attack works and how server-side amount validation stops it completely.

Read more

Logging Payments Without Logging Secrets

Good payment logging helps you debug failed charges and reconcile transactions. Bad payment logging leaks your Paystack secret key, card tokens, or customer data into log files that attackers can read. This guide draws a clear line between safe and dangerous payment log data.

Read more

Reading Paystack Gateway Response Codes

When a Paystack transaction fails, the gateway_response field contains the bank's reason. "Declined" is not helpful to a developer or a customer. This guide decodes every common response, explains the actual cause, and gives you the exact customer-facing message to show for each one.

Read more

Explore related topics

M-Pesa & African Stack

M-Pesa Daraja API tutorials, USSD development, and WhatsApp Business API guides. The African Stack that global bootcamps do not teach.

Learn to Code in Kenya

Everything a Kenyan needs to know before writing their first line of code. Career paths, real costs, hardware requirements, and honest answers about what it takes.

Learning to Code

Roadmaps, language guides, and practical advice for learning to code and launching a programming career.

Breaking Into Tech

Practical, no-nonsense guides for anyone looking to start or change their career in tech. From choosing your first language to acing interviews.

The African Stack: Skills for This Market

The skills that make Kenyan developers hard to replace: M-Pesa, USSD, WhatsApp, fintech, and building for the African market.

Bonaventure Ogeto

Bonaventure Ogeto

Founder, McTaba Labs

Bonaventure is the founder of McTaba Labs, a coding bootcamp in Nairobi, Kenya. He has spent years building products for the African market and mentoring the next generation of developers across the continent.