This post is part of my entry to Kiroween 2026, the Kiro hackathon on Devpost (Frankenstein category).
The problem
In many Lagos shops, the person at the counter is not the person who owns the bank account. The owner is at another stall, out buying stock, or asleep, and the sales staff cannot open the owner's bank app. When a customer shows a credit alert SMS or a transfer screenshot, they have seconds to decide. Fake alerts are easy to make. Some are edited SMS messages. Some are real-looking receipts that say "Transfer Request Successful", which is a request, not money received. Some are genuine receipts reused at a second shop.
What Ghost Credit does
Whoever is selling, the owner or a staff member, forwards the alert or screenshot to the shop's WhatsApp number and gets one of four verdicts. Staff never need the owner's bank login to run a check.
- ALIVE: the shop's own Paystack account confirms the money.
- GHOST: Paystack has no such payment, or the same payment was already used.
- SUSPICIOUS: the document has red flags (request wording, money sent to another account, amount mismatch, a session ID whose embedded time disagrees with the printed time, a link).
- UNVERIFIED: no red flags, but nothing could confirm the money.
Every reply lists the red flags and ends with "Check your own bank app before releasing goods". A screenshot alone is never ALIVE. For a plain bank transfer, the bank app still has the final word today. That gap is what I am working on next.
Architecture
- AWS Lambda behind a Function URL, Python.
- WhatsApp Cloud API webhook with signature verification.
- Amazon Nova Pro on Bedrock reads screenshots into strict JSON. Images stay in memory.
- A routing step decides if Paystack can see the payment at all. Only Paystack-shaped references or the merchant's own Paystack account go to Paystack. Ordinary bank transfers are judged as documents, so they are never wrongly called GHOST.
- A rule engine picks the verdict. Fixed sentences write the reply. The AI reads; it never decides.
- DynamoDB keeps a sanitised check log for The Lab dashboard and a used-payment ledger keyed by an HMAC hash, both expiring after 30 days.
How I used Kiro
I started every component as a Kiro spec: EARS requirements, a design and a task list. Nine specs in total. Four steering docs carried the Nigerian payment rules and safety lines, so every task inherited them. Kiro wrote property-based tests with Hypothesis; the suite ended at over 700 tests. Some of my favourite properties: "a screenshot alone never gives ALIVE", "a reference that is not Paystack-shaped never gives GHOST unless the ledger matched", and "a session ID exactly one hour behind never flags". Before building the screenshot reader, Kiro used an MCP fetch server to read the WhatsApp media, Bedrock Converse and Paystack docs. Two shell-command agent hooks run the tests and a secret scan whenever Kiro saves a source file, and a third, manual hook asks the agent to bring the README back in line with the specs.
The hooks taught me the difference between Kiro's chat modes. On 3 Dec both on-save hooks were enabled but never fired. To find out why, I switched the chat from Spec mode to Default mode and asked Kiro for a small source edit. Both hooks fired on that one edit. The cause: in Spec mode Kiro has no file edit tool, so it had been changing files through PowerShell commands, which never raise a File Saved event. The lesson: plan in Spec mode, and let Kiro make code edits in Default mode, where every save runs the tests and the secret check.
What real receipts taught me
My synthetic tests passed. Real receipts still found the bugs that mattered:
- An amount written "N3,300,000.00" was read as 3,300.
- A receipt paid to someone else's Paystack account came back GHOST, because the first version asked Paystack about every reference. Paystack cannot see a transfer between two bank accounts, so the honest answer is a document check, not GHOST.
- Session IDs on genuine receipts follow a 30-digit pattern with an embedded timestamp, but two banks embed UTC, one hour behind Lagos, and two others use different formats. The rule now only checks 30-digit IDs and allows the offset, which passes all eight genuine receipts I tested.
- Nova Lite read 16 June as 26 June (a Friday, which then triggered a weekend warning) and added a digit to a session ID. Nova Pro reads them correctly, at about NGN 3 a screenshot. I also stopped treating a possible misread as evidence: an amount the code cannot parse from a screenshot is left blank, not flagged.
On 14 real fake receipts, none came back ALIVE, and the amount was read correctly on 12. The full table, misses included, is in docs/receipt-benchmark.md.
What's next
Paystack can only see money that moved through Paystack, and most shops take plain bank transfers. The next step is matching each receipt against the shop's own bank credit-alert emails, accepted only when the bank's DKIM signature checks out, so the person at the counter can be told "your bank never received this" without ever seeing the owner's account. Before building it, I am asking shop owners at Computer Village, Ikeja, who takes payment when they are not in the shop and how that person knows the money has landed.
Try it
- Video: https://youtu.be/XaL02UFLUmk
- The Lab: https://z2p67lk3rrxlhbbsdll3hvli5i0filxu.lambda-url.us-east-1.on.aws/lab
- Code (MIT): https://github.com/legendonthisone/ghost-credit
Built by Ayobami Ajetunmobi, LGND Studio Services, Lagos.