Skip to content
JMJahanzeb Mohsin
All work

Case study Nº 01

Web app

CarryPay

An AI agent that pays a family's hospital and university bills abroad, within their country's rules.

Type
Web app
Stack
Next.js · TypeScript · DeepSeek · OpenAI · MCP · WebAuthn
Origin
Built for the 2026 Shenzhen International FinTech Competition

The live demo runs on simulated hospitals, universities and banks with real, cited regulations. Each visitor gets a private sandbox, and no real money moves.

The demo stage: the hospital's email, the family's approval sheet and the agent's log, with the deposit waiting for approval
Fig. 1 · The demo stage: the hospital's email, the family's approval sheet and the agent's log, with the deposit waiting for approval

CarryPay handles a cross-border bill from start to finish. It emails the institution, reads the invoice, checks the home country's foreign-exchange rules, compares every way to pay, prepares the regulatory forms and asks the family to approve. Then it tracks the money, fixes returned transfers, checks the final bill line by line and claims refunds.

1

What it does

A family opens a case for a bill abroad. The agent emails the institution's verified address for the estimate and bank details, verifies the account, compares a bank transfer with a card on total cost and timing, fills in the forms the home country requires, and asks the family to approve the payment.

Four scenarios cover Pakistan and China, two countries with capital controls: heart treatment in Bangkok, tuition in London above a yearly quota, and two fake university offers sold through agents, where the right outcome is to pay nothing and help the family report it. A family can also upload their own bill.

2

Safety in code, not in the prompt

Every one of the agent's 15 tools goes through a gateway. Reading and drafting are automatic, emails only go to verified addresses, and money only moves after the family approves with a passkey that signs the exact payment. Bank details are compared with a verified registry, and a rules engine enforces limits, required forms and anti-splitting rules, whatever the model says.

A privacy firewall replaces names, hospital and student numbers, card and passport numbers and medical details with placeholders before anything reaches the model. Emails and documents are marked untrusted, and every action goes into a SHA-256 hash-chained log whose head is anchored on a public testnet.

3

Measured, including the attacks

45 live end-to-end runs on the real model were scored by code, and 43 passed every check. The cost of a case ranged from $0.05 to $0.23. Runs that stopped because the model provider was down are kept and labelled, not hidden.

A red team of 20 attacks hit the live agent: look-alike domains, hidden instructions, forged invoices, refund redirection and quota splitting. CarryPay's agent tried none of them. A naive assistant prompt tried two, and the gateway still blocked both.

4

Open to other agents

CarryPay is also an MCP server with 12 tools, so another AI assistant can work on a sandbox case. It goes through the same gateway and privacy firewall, sees only masked data, and can only propose a payment for the family to approve.

□

Plates

Attack lab: a fake bank-change email with hidden instructions. The agent refuses, and when it is forced to try, the safety layer blocks the payment
Fig. 2 · Attack lab: a fake bank-change email with hidden instructions. The agent refuses, and when it is forced to try, the safety layer blocks the payment
The bank officer's view: the transfer as a package with the rules checked, the documents and a draft SWIFT message
Fig. 3 · The bank officer's view: the transfer as a package with the rules checked, the documents and a draft SWIFT message
Landing page with the live evaluation and red-team numbers
Fig. 4 · Landing page with the live evaluation and red-team numbers