Inspiration
I built PayGuard because I was scammed myself.
When it happened, I had a message in front of me and a decision to make, and no simple tool that could tell me "this looks like a scam." I had to guess, and I guessed wrong. Afterwards I realised how many people in Nigeria are in that same position every day: a "brand new PS5" from an Instagram vendor who wants payment as "friends and family", a fake bank alert asking for a BVN or PIN, a job that needs a "registration fee".
My first answer was ScamShield, a tool where you paste a suspicious SMS or email and get a verdict with plain-language reasons, in English and Nigerian Pidgin. It worked, but it only judged a single message, and by then the buyer is often one tap away from sending money. PayGuard is the next step: check the whole seller chat before the payment leaves, back it with a shared memory of known scammers in IBM Db2, and stop the payment at checkout. This is not a theory project for me. It comes from a loss I couldn't prevent, and I'm building it so the next person has the check I didn't have.
What it does
PayGuard is an AI payment firewall. A buyer shares a screenshot of the seller chat (or pastes the text) and gets a plain-language verdict in seconds: safe, careful, or don't pay, with the reasons.
- Scam check: screenshot or text in, verdict out, in English and Nigerian Pidgin.
- Protected checkout for platforms: when a buyer taps Pay, a marketplace sends the chat and seller details to the PayGuard API. A scam seller is stopped before PayPal opens; a genuine seller goes straight through to PayPal checkout.
- Shopping agent: an AI agent that refuses to pay a seller demanding friends-and-family payment and prepares a safe PayPal order for a legitimate one.
- Community reports: victims report a scammer's account number, phone number or email. Three reports put the contact on the blocklist automatically.
- Fraud dashboard: analysts ask questions in plain English and PayGuard turns them into safe, read-only Db2 queries.
How we built it with IBM Db2
IBM Db2 is the core of PayGuard, not an add-on:
- Entity blocklist: account numbers, phone numbers and emails in Db2, with automatic escalation after repeated reports.
- Vector search: 25 scam playbooks (global and Nigerian) stored with
VECTOR(768)embeddings in Db2. The chat is compared against them and against reports from other buyers. - Reports and audit trail: every report and verdict is stored in Db2, so checks get stronger as more people use it.
- Text-to-SQL analytics: natural-language questions become read-only Db2 queries for the dashboard.
Around Db2: a FastAPI backend, rule-based red-flag signals (friends-and-family, OTP/BVN requests, gift cards, upfront fees, fake alerts, look-alike domains such as paypa1), a Gemini investigator agent, and PayPal checkout. As in ScamShield, every warning is tied to a concrete rule or Db2 record, so the explanation is honest and never a vague "this looks suspicious". The AI can only raise a risk score, never lower it, so a persuasive scammer cannot talk the system into a safe verdict. Db2 runs in Docker (IBM Db2 Community Edition) and the app starts with one script.
Challenges
Making the AI useful without making it a loophole: the investigator can only add evidence, and the rule and Db2 signals always apply. Public datasets barely contain Nigerian scam patterns, so the playbooks and examples had to be hand-written from real local scams. We also made results readable for ordinary buyers: every verdict is a few short reasons, not a score.
What we learned
Small, well-chosen local data plus transparent rules can beat a bigger generic model for a local problem, and explaining a verdict matters as much as the verdict itself. Enterprise databases are a strong fit for fraud: blocklists, vector similarity and community reports all live in one place and can be queried together.
What's next
Check at the moment of transfer, a "Truecaller for account numbers" for banking and fintech apps, offered to banks and marketplaces as a pay-per-check API; a WhatsApp bot for forwarded messages and voice notes; more Nigerian languages (Yoruba, Hausa, Igbo); and a browser extension for fake PayPal and bank pages.