Inspiration

Filipinos working abroad sent home a record $35.63 billion in cash in 2025. Once that cash lands, the sender can't see where it goes.

A BCG survey of 1,337 overseas Filipino workers found that fewer than half consistently monitor how the money is used, and only 8% always ask for receipts. Family conflict over financial support and children's education each rose 11% after migration.

Loop Remit is for that worker and that family. The worker wants the money to reach its purpose. The family wants the bills paid without having to justify every peso.

What it does

Loop Remit turns a remittance into a closed loop with two sides.

The sender abroad links a PayPal wallet once, then signs a plan on their own device: who can be paid, a monthly budget, a cap for each category, and the amount above which they want to decide personally.

The family at home photographs a bill and uploads it. No cash changes hands.

An AI agent reads the bill and prepares the payment. A gateway with no AI in it checks that payment against the signed plan, and only then does PayPal move the money: dollars from the sender's saved wallet, pesos directly to the school or utility. The sender sees every peso, with the bill photo, the exchange rate, PayPal's confirmation, a signed receipt and every check the gateway ran.

The demo video shows five real cases:

  • Tuition: read, checked and paid automatically.
  • A power bill up 62% on last October: flagged, but within its cap, so it's paid and the sender sees the warning.
  • A doctored hospital bill from an unapproved clinic: the AI model reports the tampering, and the gateway refuses the payee.
  • A notice telling any AI to pay a new account: the model reports the attempt, and the bill waits until the sender declines it.
  • Rent above the sender's limit: it waits for the sender's signature on that exact payment, then it's paid.

How it's built

PayPal (sandbox). Payment Method Tokens v3 vault the sender's wallet with one approval. Orders v2 charges that wallet in USD while the sender is absent, using vault_id and stored_credential. Payouts delivers PHP to the payee, and delivery is confirmed by polling the payout. Refunds reverse the charge if a payout fails. Every POST carries a PayPal-Request-Id derived from the payment, so a retry can't charge twice.

AI. A vision model reads bill photos into a strict JSON schema and reports tampering signals and any instructions aimed at an AI. It has no tools and no say over payments. Bad, refused or incomplete output sends the bill to a person, never into a payment. Plain code then checks the reading: payee registry, account match, line-item sum, seasonal anomaly and duplicate hash.

Signed rules (AP2 v0.2). The plan is an open Payment Mandate, an SD-JWT signed in the browser by a non-extractable WebCrypto P-256 key. For each bill, the agent signs a closed mandate that reveals only the one payee and cap it needs. I implemented SD-JWT and JOSE from scratch, and added three custom constraints: category caps, required evidence and step-up approval.

Deterministic gateway. It verifies signatures, disclosure digests, key binding and every constraint, then reserves the budget in an atomic SQLite ledger and blocks replays. Unknown constraints fail closed. Every outcome returns a gateway-signed receipt and a step-by-step trace.

What makes it different

The AI reads the bills, but it never decides whether money moves. A fooled model can't add a payee, because the payee list is signed by a key the server never holds. Warnings can only bring in a person. They can never remove a check.

That makes this agentic payment you can audit: the sender's authority is a signed document, and each payment proves it stayed inside it.

Challenges

  • Assuming the model can be fooled. The prompt-injection defense couldn't depend on the model behaving, so the red team also tests a model that obeys the attack. The gateway still refuses a payee outside the signed list.
  • A bug only a real model exposed. The injection notice has no itemized charges. The model read that correctly, but the gateway treated an empty list as a sum of zero and rejected the bill. Such bills now wait for the sender, and the gateway adds that warning itself, so an empty list can't be used to skip the check.
  • Settlement timing. In the sandbox, captured funds weren't immediately available for payouts, so the platform account ran out during testing. The app refunded the charge as designed, and it showed that a live service would need a funded float.
  • Where vaulting works. Vaulting isn't available in the Philippines, which fits, because the sender is the one abroad.

Accomplishments

  • The full flow works on the real PayPal sandbox with a real AI model: wallet approval, USD charge, PHP payout, delivery check and refund.
  • 55 automated tests pass on a fresh clone.
  • scripts/redteam.py runs 12 attacks, including tampering, replay, forged keys and prompt injection, and blocks all 12 at the expected step. These run on the mock PayPal.

What I learned

Agent safety is easier to reason about as a question of authority than of model quality. Once the model's output is treated as untrusted data, a wrong reading is bounded by the sender's signed rules.

What's next

  • Passkeys (WebAuthn) for the device key.
  • A dispute evidence pack built from the mandate chain, using PayPal's Disputes API.
  • Paying from PayPal Invoices as structured evidence.
  • A biller aggregator so real Philippine utilities can be paid.
  • PayPal's multiparty model or a licensed partner, because a live service is money transmission.

Honest limits

This is a single-household demo with no login, CSRF protection or rate limiting. Keys are local files, and production would need separate services and HSM-backed keys. The gateway can prove who authorized a payment and that it fits the signed rules, but it can't prove the AI read a bill correctly. The rules limit the damage if it doesn't. A payout that fails after being accepted has only been tested on the mock.

Loop Remit is a new project for this hackathon: the repository and its first commit date from November 3, 2026, inside the submission period.

Sources

Built With

Share this project:

Updates

Submission history