Little Wallet ✨

Putting on-device AI behind the wheel of PayPal—from splitting a bill in one sentence to real-time Venmo/PayPal checkout, live webhooks, and Penny's human-approved PayPal Invoices, Refunds, and Payouts.

Speak an expense ("Trader Joe's 84 dollars split three ways with Sam and Alex") or snap a receipt. Little Wallet parses the math locally on your iPhone, mints private split links (/s/:token) backed by PayPal Orders v2 and Venmo, and flips your screen to Paid the instant PayPal Webhooks fire. When someone forgets or needs a refund or roommate payout, Penny prepares the exact PayPal action for your one-tap approval.

The PayPal + AI + Render workflow
🎙️ AI Parses Spend & Split → ✂️ Exact Cent Math → ☁️ Render Mints & Persists PayPal Links → 💳 Friends Pay via PayPal / Venmo in Safari → ⚡ Render Webhook & SSE Sync → 🤖 Ask Penny (Invoices · Refunds · Payouts)

Built for the PayPal AI Hackathon 2026.


The PayPal + AI Workflow: End-to-End Walkthrough

These captures trace the PayPal + AI pipeline from voice capture to live settlement and Penny's automated PayPal actions (using sample data and the PayPal Sandbox; additional general app screenshots remain in the Image Gallery above).

1. AI parses spend & split 2. Split to the cent & send links
On-device voice AI parsing Trader Joe's 84 dollars split three ways with Sam and Alex Split the bill evenly or by item across friends down to the integer cent
Speak a purchase; on-device AI parses the split. Split evenly or by item, then tap Send links.
3. Shareable payment links 4. Zero-app PayPal & Venmo checkout
Payment links sheet with per-friend status and iMessage or Venmo actions Friend mobile Safari checkout page with Pay with Venmo and Pay with PayPal buttons
Private split links sent via iMessage or Venmo. Friends pay in Safari via Venmo or PayPal.
5. Live PayPal Webhook sync 6. PayPal & Venmo activity hub
Payment links screen updated live via webhook showing Anna Haro Paid via Venmo PayPal and Venmo Sandbox hub displaying balance and quick PayPal actions
Webhooks stream live updates to flip badges Paid. Synced Sandbox balance and quick PayPal actions.
7. Ask Penny spending Q&A 8. Penny drafts PayPal Invoices
Ask Penny answering how much was spent on groceries this month from verified local payments Penny PayPal Sandbox invoice sent to Alex Kim with invoice number and QR code
Ask questions grounded in your verified payments. Send an official PayPal Invoice with QR code.
9. Penny prepares PayPal Refunds 10. Human-approved Batch Payouts
Penny prepares a PayPal Sandbox refund confirmation card via Refunds API v2 Penny human-in-the-loop PayPal Sandbox batch payout confirmation card
Match a capture and stage a 1-tap PayPal Refund. Preview every recipient before sending a Payout.

💡 Inspiration

Splitting dinner, sharing groceries with roommates, keeping track of who paid for what… it shouldn't feel like a second job.

Someone puts down their card and everyone says: "Awesome, just request me on Venmo so I don't forget!" Now you're stuck searching usernames, checking profile photos, and typing out amounts. Or a friend swears they'll pay later, genuinely forgets, and two days later you're staring at your phone drafting an awkward text trying not to sound petty over twenty bucks.

We asked: What happens when you put AI behind the wheel of PayPal?
Instead of treating payments as an afterthought, Little Wallet connects private on-device Apple AI directly to PayPal's developer platform—turning spoken words and receipts into tamper-proof PayPal checkouts, instant webhook updates, and polite, user-approved financial actions.


🔄 How PayPal & AI Work Together (From Input to Settlement)

Little Wallet is designed in four progressive layers—moving from effortless human input on the iPhone down to cryptographically verified money movement on PayPal:

Layer 1 — On-Device AI Input & Fair-Share Math (Privacy First)

  • Voice AI (VoiceListener.swift, VoiceAgent.swift): Built on Apple's Speech, AVFoundation, and FoundationModels frameworks. Spoken phrases like "Trader Joe's 84 dollars split three ways with Sam and Alex" are parsed locally into merchant, dollar amount, category, and split participants with zero cloud audio roundtrips.
  • Vision OCR (ReceiptReader.swift, ReceiptScanSheet.swift): Vision and VisionKit decompose physical receipts into itemized rows, subtotal, tax, and tip.
  • Integer-Cent Split Engine (Wallet.swift, SplitSheet.swift, backend/server/split.js): Shared items, proportional tax, and tip are allocated using largest-remainder integer-cent rounding so friend shares always sum to 100% of the receipt with zero stray pennies.

Layer 2 — Render Cloud Engine: Payment Links & Server-Enforced PayPal Checkout (/s/:token)

  • Declarative Deployment on Render (render.yaml): Our zero-dependency Node.js 22 backend (rootDir: backend, plan: starter) runs on Render at https://little-wallet.onrender.com with automated /api/config health checks, zero-downtime deploys, and managed secret isolation for all PayPal Sandbox keys.
  • Persistent Split Link Generation (POST /api/splits): When you tap Send links in iOS, Render generates unguessable, per-friend payment links (https://little-wallet.onrender.com/s/:token) and stores split shares, line items, and PayPal state on a 1 GB Render Persistent Disk (split-data at /var/data) so friends' payment links survive deploys and restarts.
  • Zero-App Safari Checkout: Friends open their Render-hosted link in mobile Safari—no app install required—and tap PayPal or Venmo via the PayPal JS SDK (enable-funding=venmo). Calling POST /api/shares/:token/order creates a POST /v2/checkout/orders (intent: CAPTURE) order using totals enforced strictly by the Render server—clients can never tamper with amounts.

Layer 3 — Always-On Render Webhooks & Real-Time SSE Loop

  • TLS-Terminated Webhook Listener (POST /webhooks/paypal): Render provides a permanent, public HTTPS endpoint for PayPal webhooks—replacing fragile local tunnels—and verifies PayPal's asymmetric cryptographic signatures through /v1/notifications/verify-webhook-signature.
  • Instant Mobile Sync (LiveUpdates.swift → GET /api/events): Verified events (PAYMENT.CAPTURE.COMPLETED and INVOICING.INVOICE.PAID) are persisted to Render's /var/data disk and pushed immediately over long-lived Server-Sent Events (SSE) so the organizer's iPhone flips the friend's badge from waiting to Paid live on screen.

Layer 4 — Penny: Grounded AI Copilot + Human-in-the-Loop PayPal Actions

  • Zero-Hallucination Financial Q&A (AskAgent.swift): Ask Penny spending or unpaid-split questions in plain English. Answers are computed deterministically from verified local records and synced PayPal Transaction Search v1 (GET /v1/reporting/transactions) activity.
  • Actionable PayPal Orchestration (PennyActions.swift, PayPalActions.swift, backend/server/actions.js): Whenever money gets socially awkward, Penny routes confirmed requests through the Render backend (SPLIT_APP_KEY authenticated) to PayPal REST APIs:
    1. Forgot to pay? → PayPal Invoicing API v2 (POST /v2/invoicing/invoices & send) emails an official invoice with a shareable payment link and CoreImage QR code.
    2. Overcharged someone? → PayPal Refunds API v2 (POST /v2/payments/captures/{id}/refund) prepares an instant capture refund.
    3. Paying back roommates? → PayPal Payouts API v1 (POST /v1/payments/payouts) queues multi-recipient disbursements.
  • Explicit Human Guardrail: Every Penny action surfaces recipient, email/handle, and exact dollar totals upfront—nothing moves without the user tapping Confirm.

☁️ Why Render Matters in Little Wallet

In a peer-to-peer payment app, payment links and webhook receivers cannot live on a sleeping laptop. Render turns Little Wallet from a local iOS prototype into an always-on payment platform:

  • Durable Share Links: A friend might open a /s/:token link hours or days after dinner. Render's 1 GB persistent disk (/var/data) ensures every split and capture record stays intact across deploys.
  • Reliable Webhook Delivery: PayPal delivers asynchronous PAYMENT.CAPTURE.COMPLETED and INVOICING.INVOICE.PAID events to https://little-wallet.onrender.com/webhooks/paypal, where Render keeps the Node.js 22 SSE hub online to update the iPhone instantaneously.
  • Zero-Config Infrastructure (render.yaml): Everything—runtime (NODE_VERSION: 22), health check (/api/config), disk mount, and encrypted PayPal credentials—is reproducible in one 45-line Render Blueprint.

🏗️ Architecture at a glance

Little Wallet architecture: iOS app with on-device Apple AI connects over authenticated endpoints and SSE to the zero-dependency Node.js 22 Render backend and PayPal Sandbox APIs On-device Apple AI keeps voice, receipts, and personal spending private on iPhone, while the Render backend generates payment links, enforces PayPal order amounts, verifies webhook signatures, and streams live status over SSE.

Platform Layer Stack & Verified Implementation
iOS App SwiftUI (iOS 17+), FoundationModels, Speech, VisionKit, AppIntents (Apple Pay Shortcuts), Contacts, MessageUI, CoreImage QR codes, and LiveUpdates SSE client. 76 passing XCTest unit tests in 0.43s. Source: JiawenZhu/little-wallet.
Render Cloud Backend Zero-dependency Node.js 22 ES-module service deployed via render.yaml at little-wallet.onrender.com with a 1 GB persistent disk (/var/data), SPLIT_APP_KEY auth, an interactive web bill splitter, and /s/:token payment link rendering. 17 passing Node.js tests in 0.13s. Source: JiawenZhu/little-wallet-server.
PayPal APIs Sandbox integrations across Orders v2 (Capture + Venmo), Webhooks (asymmetric signature verification), Invoicing v2, Refunds v2, Payouts v1, and Transaction Search v1.

🧗 Challenges We Ran Into

  1. Integer-Cent Split & Tax Guarantees: Floating-point splits across shared grocery items and proportional tax drop or add pennies. Implementing identical largest-remainder integer-cent rounding in Swift (Wallet.swift) and Node.js (split.js) ensures shares always sum cleanly to 100% of the receipt.
  2. Server-Enforced Checkout Integrity: Preventing client-side tampering on zero-login web checkout links required driving PayPal Orders v2 creation exclusively from backend split state (POST /api/shares/:token/order) with custom_id matching on capture.
  3. End-to-End Webhook Verification & Live UI Push: Validating PayPal webhook asymmetric signatures on Render and piping those state transitions straight into an open iOS SSE stream (/api/events) without polling.

🚀 What's Next for Little Wallet

  • App Store Release: Complete privacy policy updates and distribute Version 1.0 (Build 12 uploaded to TestFlight).
  • Live Activities & Dynamic Island: Surface real-time PayPal webhook settlement progress directly on the iOS lock screen.
  • Multi-Currency Travel Splits: Automatic FX handling for international trips with friends.

🌐 Try It Out: iOS TestFlight, Live Render Splitter & Repositories

Install Little Wallet via Apple TestFlight, open our Render cloud service to split bills and test real PayPal Sandbox checkouts directly in your browser, or inspect both source repositories (matching the order of the "Try it out" buttons underneath):

Apple TestFlight (iOS Public Beta)

  • 📲 Join the Public Beta on TestFlight (testflight.apple.com link below): https://testflight.apple.com/join/UnAQWW3t — Version 1.0 (Build 12) for iPhone & iPad (iOS 17+). Public invite link unlocks installs automatically as soon as Apple's TestFlight Beta App Review completes.

Live Render Interactive Bill Splitter & Payment Links (PayPal Sandbox)

Source Repositories

  • 📱 iOS App (1st "GitHub Repo" link below): github.com/JiawenZhu/little-wallet — Native SwiftUI client, on-device AI (FoundationModels, Speech, VisionKit), Apple Pay Shortcuts, and 76 XCTest unit tests.
  • ☁️ Backend Server (2nd "GitHub Repo" link below): github.com/JiawenZhu/little-wallet-server — Zero-dependency Node.js 22 interactive bill splitter, payment link generator, PayPal Orders v2 & Webhook server (render.yaml & backend/), and 17 Node.js tests.

Built With

Share this project:

Updates

Submission history