Kitty: Autonomous Rotating Savings on PayPal
Tatenda Ephraim Chipwanya
PayPal AI Hackathon 2026 Submission
[email protected]
October 2026
Inspiration
Rotating Savings and Credit Associations (ROSCAs) are among humanity's oldest and most resilient financial mutual-aid structures. Known as mukando in Zimbabwe, stokvel in South Africa, susu in Ghana and the Caribbean, tanda in Mexico and Latin America, chama in Kenya, chit funds in India, and paluwagan in the Philippines, these circles enable community members to pool fixed periodic savings into a lump-sum pot awarded to one member each round:
$$ \text{Round Pot } (P) = \sum_{i=1}^{N} c_i = N \times c $$
where \( N \) represents the number of vetted circle members and \( c \) is the uniform periodic contribution (e.g., \( 6 \times \$100 = \$600 \)).
Verifiable Global Statistics and Scope
- 11.5+ Million Participants in South Africa Alone: According to official survey data from the National Stokvel Association of South Africa (NASASA) and the FinMark Trust FinScope Survey, over 11.5 million South African adults belong to more than 820,000 active stokvels, mobilizing an estimated R50 billion (\( \approx \$2.8 \) billion USD) annually outside traditional commercial banking rails (NASASA, 2024; FinMark Trust, 2024).
- Over 1 Billion People Globally: The World Bank Global Findex Database documents that informal community savings groups and ROSCAs serve over 1 billion individuals across emerging economies and migrant corridors, providing critical liquidity without predatory micro-lending interest rates (World Bank, 2023).
- The Global Diaspora Lifeline: According to the United Nations International Organization for Migration (IOM) World Migration Report, there are over 281 million international migrants worldwide, generating more than $656 billion USD in cross-border flows (KNOMAD / World Bank, 2024). Diaspora populations resident in the United Kingdom, United States, Canada, and Australia frequently rely on informal circles to overcome credit invisibility.
The Real-World Problem
In practice, informal circles depend on one exhausted, stressed human treasurer chasing late payments on WhatsApp, calculating arrears in spreadsheets, and mediating bitter conflicts when unexpected emergencies strike (e.g., boiler failures, urgent rent hikes, or family medical emergencies). If the organizer vanishes or mishandles funds, members lose their life savings. Kitty was built to replace the vulnerable human treasurer with accountable, multilingual autonomous AI agents and non-custodial PayPal peer-to-peer settlement, providing diaspora communities with institution-grade financial protection while preserving their cherished cultural traditions.
What it does
Kitty is an autonomous multi-party agentic financial platform that governs rotating savings circles through four key capabilities:
- Multilingual Constitution Drafter (English & Chishona): An organizer describes circle intentions in plain language (e.g., "Tiri vanhu 6 vanoshanda, tinobvisa $100 pamwedzi pa PayPal..."). Powered by Gemini 3.8 Flash, Kitty synthesizes the prompt into legal bylaws and deterministic machine-readable parameters (\( \text{rulesJson} \)) that every member cryptographically signs before joining.
- Autonomous Member Negotiation Agents (The Showpiece): When a member faces an urgent financial crisis (e.g., Chipo's unexpected home repair), she cannot wait for her assigned Slot 3. Her personal AI agent negotiates a slot swap with counterparty agents (like Nyasha's Slot 5 agent) strictly within signed mandate parameters:
$$ \text{Mandate: } \phi_{\text{swap}} \le \text{maxSwapFee} \quad \text{and} \quad \text{Incentive}_{\text{offered}} \ge \text{minIncentive} $$
The personal agents converse, counter-offer, and converge on an equitable $12 swap incentive fee. A two-tap human consent modal ensures no money moves without explicit human approval.
- Non-Custodial Direct Peer-to-Peer PayPal Settlement: Kitty holds $0 in custody (\( \mathcal{B}_{\text{platform}} \equiv 0 \)). When a round executes, contributions route directly from member to recipient via PayPal Orders v2 by binding
purchase_units[0].payee.email_addressto the round recipient's PayPal wallet. Kitty never touches the pot, eliminating money-transmitter risk. - The Guardian (Deterministic Policy Engine): Every proposed transaction must pass 7 ordered TypeScript guardrail checks before contacting PayPal: Known Payee, Constitution Match, Mandate Limits, Round State, Duplicate Cooldown, Velocity Cap, and Dual Consent.
- Culturally Supportive Treasurer & Natural Language Ledger Auditor: The Treasurer Agent issues compassionate, non-shaming payment reminders in the member's native language with a 5-day grace period. Members can query the circle's history in plain English ("Where did my $100 go?"), and the agent responds with audit citations grounded strictly in the immutable ledger.
How we built it
Kitty is built with a production-grade full-stack architecture pairing PayPal's modern APIs with Google's Gemini SDK:
- Payments & Vaulting: Node.js and Express server implementing PayPal Orders v2 (
/v2/checkout/orderswithintent: CAPTURE), PayPal Vault for recurring tokenization, and PayPal Invoicing v2 for late payment recovery. - Autonomous Commerce & Agent Toolkit: Integrated
@paypal/agent-toolkit(v1.11.0) exposing 47 official PayPal tools for agent-driven balance inquiries, invoice generation, and transaction tracking. - Artificial Intelligence Layer:
@google/genai(Gemini 3.8 Flash) for low-latency multi-agent negotiations, bilingual contract drafting, and context-grounded natural language audit reporting. - Frontend Application: React 19 SPA with Tailwind CSS, role-switching controls between 6 sandbox members, interactive ledger auditing, and live PayPal checkout modals.
- Real-Time Webhook Pipeline: Dedicated
/api/paypal/webhookendpoint with simulated event dispatching (simulate-event) forPAYMENT.CAPTURE.COMPLETED,CHECKOUT.ORDER.APPROVED, andINVOICING.INVOICE.PAID. - Idempotency Guard: Automatically injects deterministic
PayPal-Request-Idheaders generated from member and round hashes, mathematically guaranteeing that network retries never double-charge.
Challenges we ran into
- PayPal Orders v2 Payer Approval in Headless Flows: When creating orders server-side, attempting immediate capture returns HTTP
422 UNPROCESSABLE_ENTITYwithORDER_NOT_APPROVEDbecause a payer must approve the transaction. We resolved this by engineering a dual-path checkout architecture:- An interactive PayPal Sandbox Approval Popup (
checkoutnow?token=...) allowing users to log into their test account and approve. - An Instant 1-Click Sandbox Invoicing & Payment Settlement fallback that writes official completed transaction records (
INV2-...andEXTR-...) to the PayPal Sandbox Dashboard and triggers live webhooks.
- An interactive PayPal Sandbox Approval Popup (
- Preventing Agent Hallucinations in Financial Operations: LLMs can easily hallucinate arbitrary transfer amounts or fall prey to prompt injection attacks. We solved this by enforcing a strict Architectural Separation of Concerns: the AI negotiates terms, but the plain TypeScript Policy Engine evaluates the proposed transaction against hardcoded constitution constraints. If an agent attempts to move funds to an unrecognized wallet, the transaction is immediately blocked.
- Non-Custodial Multi-Party Payouts: Traditional platforms pool money in a central business account before distributing it. To keep Kitty non-custodial, we utilized the
payeeobject within Orders v2 purchase units, routing funds directly from contributor to recipient.
Accomplishments that we're proud of
- True Agent-to-Agent Commercial Negotiation: Personal AI agents successfully negotiate slot trades within pre-signed mandate boundaries, counter-offering and closing deals without human micromanagement.
- Zero-Custody Architecture: Kitty handles multi-party rotating capital without ever holding user funds (\( \mathcal{B}_{\text{platform}} \equiv 0 \)), preserving community trust and eliminating regulatory burdens.
- Bilingual Inclusivity: Flawless generation of legal constitutions and supportive treasurer communications in both English and Chishona, honoring the heritage of African diaspora savings clubs.
- Live Sandbox Verification: Real transaction records and registered webhook events (
3D545458LT116283N) verifiable inside the PayPal Developer Sandbox Dashboard.
What we learned
- Agentic Commerce Requires Deterministic Guardrails: Generative models are exceptional negotiators and synthesizers, but final financial execution must always belong to deterministic code and human consent. The paradigm "AI Proposes, Guardian Validates, Human Consents, PayPal Settles" is the ideal architecture for high-stakes agentic finance.
- Informal Finance is Ripe for Modern FinTech: Over a billion people use informal savings circles because of cultural intimacy, not lack of technology. By respecting the cultural roots of mukando and stokvel while layering on PayPal's global trust infrastructure, we can bring modern financial security to millions of underserved diaspora savers.
What's next for Kitty: Autonomous Rotating Savings on PayPal
- Cross-Border FX Settlement: Integrating PayPal's multi-currency conversion APIs so diaspora members earning in USD can settle directly into home-country mobile wallets or local currency accounts.
- Decentralized Member Credit Scoring: Transforming immutable on-time ROSCA payment histories into verifiable PayPal credit reputations, helping unbanked diaspora immigrants qualify for traditional credit.
- Emergency Micro-Insurance Pools: Enabling personal agents to automatically contribute $2-$5 per cycle into a shared emergency buffer pool, governed by multi-agent voting when catastrophic events occur.
Built With
- agentic-commerce
- autonomous-agents
- express.js
- financial-inclusion
- fintech
- gemini-flash
- idempotency
- mukando
- multi-agent-systems
- natural-language-processing
- node.js
- non-custodial
- paypal
- paypal-agent-toolkit
- paypal-orders-v2
- paypal-vault
- paypal-webhooks
- policy-engine
- react
- render
- rosca
- stokvel
- susu
- tailwindcss
- typescript
Log in or sign up for Devpost to join the conversation.