Inspiration

In Tanzania and across East Africa, michango (group contributions) pay for life's biggest moments: weddings, funerals, hospital bills, school fees. It all happens in WhatsApp groups. One trusted person collects money by hand, keeps a notebook, chases pledges one by one, and posts screenshots to prove where the money went. It's exhausting for the organiser, and when the numbers don't add up, friendships suffer. I wanted to keep the place people already gather, WhatsApp, and take away the notebook.

What it does

SarafuPay is an AI agent you chat with on WhatsApp, in Swahili or English.

  • Organisers create a collection by chatting. No forms, no app: "Nataka kuchangisha $500 kwa harusi ya dada yangu." The agent asks for anything missing and returns a share card to forward into the family group.
  • Friends contribute with PayPal. "Contribute NEEMA24" → "$40" → a PayPal checkout link. After capture, the friend gets a receipt and the organiser an alert.
  • Or chip in on the web. Every collection has a public page with one currency-aware amount field (live formatting, quick picks) that goes straight to PayPal checkout.
  • Pledges and reminders. "I'll pay $25 on Friday" is recorded; the organiser can send friendly reminders or a PayPal invoice with QR code (PayPal Agent Toolkit). Reminders reach people even outside WhatsApp's 24-hour window through an approved pledge_reminder template (English + Swahili) with a "Pay with PayPal" button; if a reminder still can't be delivered, the agent says so and hands the organiser that person's pay link to forward.
  • Answers from live data. "Who hasn't paid?", "How much do we have?", "Send me a report".
  • Payouts with a human in the loop. "Pay Mama Lishe $300 for catering" prepares a PayPal Payout, but money moves only when the organiser replies with a one-time CONFIRM code from their own number.
  • Radical transparency. Every payout is broadcast to all contributors and listed on a public collection page, next to a searchable, paginated supporters list (first names and messages only).
  • Treasurer dashboard. An AG Studio dashboard: KPI tiles (raised with a trend sparkline, % of target, balance, paid out, open pledges), a progress-to-target gauge, money-in by day, channel split, top contributors, and contribution and payout ledgers with status pills and totals. A custom Treasurer agent answers money questions from live data, drafts WhatsApp transparency updates for the group, can send pledge reminders when asked, and delegates chart building to Studio's built-in agents. It can never move money.
  • Pledge scoreboard. A custom AG Studio widget that shows pledges as a friendly scoreboard, not a debt list: promises kept, money still to come, who is past their date, and a "Send friendly nudges" button (with a confirm step) that sends each person a WhatsApp reminder with their own PayPal link. Clicking a person cross-filters the dashboard, and organisers can add it to any page from the widget menu.

How I built it

SarafuPay AI is a new build for this hackathon: the whole codebase was written during the submission period (first commit Oct 2, 2026).

  • Next.js 16 on Render, started from PayPal's AG Grid hackathon boilerplate. One Blueprint (render.yaml) defines four services: an always-on Web Service, Postgres, a private Key Value instance and a Cron Job.
  • PayPal Orders v2 through @paypal/paypal-server-sdk for collecting; PayPal Payouts (REST) for disbursing; PayPal Webhooks (signature-verified) to settle captures, payouts and invoices.
  • APIMatic: collecting runs on the APIMatic-generated PayPal Server SDK, and I used the APIMatic Context Plugin for PayPal in Claude Code to audit that code. It caught a hidden no-timeout default, retries that could never fire and an over-broad error catch around capture; all fixed (docs/APIMATIC_CONTEXT_PLUGIN.md).
  • PayPal Agent Toolkit tools (create/send invoice, reminders, QR code, get order) re-wrapped for Vercel AI SDK v7 and pinned to sandbox.
  • Google Gemini through the Vercel AI SDK with guarded domain tools and an automatic model fallback chain.
  • WhatsApp Cloud API with signed webhooks and message-ID de-duplication; a web simulator at /chat runs the same agent for judges without a phone. Each browser gets a private session (HttpOnly cookie, test numbers derived on the server), so many judges can test at once without seeing each other's chats.
  • Cost guard: per-sender and daily AI limits, kept in Render Key Value so they survive deploys, with an in-memory fallback if Key Value is unreachable.
  • Self-healing payments: a Render Cron Job runs every 15 minutes and re-checks pending PayPal orders. If a webhook was lost, it records the capture (or captures an approved order) through the same idempotent code as the webhook, finalises stuck payouts and prunes old de-dup rows.
  • AG Studio + Studio Agent Framework with a custom Gemini AgLlmAdapter, a custom widget (Pledge scoreboard, registered with createWidgets) and a custom grid cell renderer for status pills.
  • Drizzle ORM on Postgres (PGlite locally, so it runs with zero setup) and an end-to-end test that drives the full money flow with a scripted LLM and a stubbed PayPal API.

Challenges I ran into

  • Keeping an LLM away from money. I made payouts a deterministic path: the model can only prepare one; execution needs a single-use, time-limited code typed by the owner, with the balance re-checked and a PayPal idempotency key.
  • Toolkit compatibility. The Agent Toolkit targets an older AI SDK and defaults to production, so I wrapped its tools for v7 and forced sandbox mode.
  • Real WhatsApp, real constraints. Bots can't join normal groups, so I designed around forwardable share cards and wa.me links. Meta retries slow webhooks, which caused duplicate replies until I added de-duplication.
  • Language. Users switch between Swahili and English mid-conversation. The agent detects the language from their recent messages (and from which share card they tapped), and I made every receipt, alert and update bilingual, using WhatsApp's own formatting.
  • Webhooks can go missing. A payment that PayPal captured but whose webhook never arrived would leave a contributor without a receipt. The reconcile cron job closes that gap without ever double-counting.
  • Privacy on a public page. Showing supporters builds trust, but emails and amounts must stay private. The public list shows first names only, and email search matches only a full, exact address, so it can't be used to harvest emails.

Accomplishments that I'm proud of

  • A full sandbox money loop running live on a real WhatsApp number: chat → PayPal order → capture → receipt → payout by confirmation code → transparency broadcast.
  • An agent that feels local: Swahili-first for Tanzanian users, voice notes supported.
  • Safety that doesn't depend on the model behaving.
  • A demo that's ready for many judges at once: private simulator sessions, cost limits, and an end-to-end test suite covering the money flow, privacy and session isolation.

What I learned

Trust is the product. The AI makes collecting easier, but the feature that matters most is a clear, shared record of where the money went. I also learned how much careful engineering sits around an LLM when real payments are involved: idempotency, webhooks, retries and human confirmation.

What's next for SarafuPay

  • Mobile money (M-Pesa, Airtel Money) alongside PayPal for local contributors.
  • Recurring contributions for vikoba / chama savings groups, and multi-signer approvals for NGOs.

Try it

All payments run on the PayPal sandbox (test money). Sandbox buyer login is shown inside the simulator.

Built With

Share this project:

Updates

posted an update —

Screenshots: new treasurer dashboard and the AI Treasurer

The redesigned AG Studio dashboard (progress gauge, KPI tiles, top contributors, ledgers with status pills):

SarafuPay treasurer dashboard

The Treasurer agent drafting a WhatsApp transparency update from live data:

SarafuPay AI Treasurer

Log in or sign up for Devpost to join the conversation.

posted an update —

Meet the Treasurer: an AI assistant inside the dashboard

Every SarafuPay dashboard has a Treasurer agent built on AG Studio's Agent Framework, running on Google Gemini through our own LLM adapter. Organisers can ask it:

  • "Who hasn't paid?": it queries the live pledges and gives the outstanding total.
  • "Draft a transparency update": it writes a short WhatsApp message with target, raised, payouts and balance, ready to paste into the family group.
  • "Will we hit the target?": it compares the pace of contributions with the deadline.
  • "Add a chart of the top contributors": it delegates to Studio's built-in agents, which build the chart on the page.

It can also send pledge reminders, but only when the organiser asks. It can never move money: payouts still need a one-time CONFIRM code from the organiser's own WhatsApp number.

Log in or sign up for Devpost to join the conversation.

posted an update —

Treasurer dashboard redesign + reminders that always arrive

Two upgrades this week:

1. A richer AG Studio treasurer dashboard. KPI tiles for raised (with a trend sparkline), % of target, balance to pay out, paid out and open pledges; a progress-to-target gauge; top contributors; and ledgers with coloured status pills and grand totals. Everything stays editable in AG Studio, so organisers can rearrange it or ask the AI to build new charts.

2. Pledge reminders now reach people outside WhatsApp's 24-hour window. Our pledge_reminder template (English and Swahili) is approved by Meta. Each reminder carries the person's name, amount, collection and due date, plus a "Pay with PayPal" button that opens their own checkout.

Try it: https://sarafupay-ai.onrender.com/chat or WhatsApp +255 650 972 587, then ask the bot for your dashboard link.

Log in or sign up for Devpost to join the conversation.

posted an update —

SarafuPay now runs on four Render services

We upgraded the deployment so the money flow holds up even when things go wrong:

  • Web Service (always on): no cold starts, so the first WhatsApp reply is instant for every judge.
  • Postgres: the source of truth for collections, contributions, pledges and payouts.
  • Key Value (private network): the AI cost guard now keeps its counters here, so limits survive deploys. If Key Value is unreachable, the app falls back to in-memory limits within a second.
  • Cron Job (every 15 minutes): a safety net for lost webhooks. It re-checks pending PayPal orders, records captures that completed, finalises stuck payouts and prunes old de-dup rows. It reuses the same idempotent code as the webhooks, so a payment is never counted twice.

All four are defined in one Blueprint (render.yaml). The architecture diagram and design notes are in the README: https://github.com/ezekiellemana/sarafupay-ai#architecture-on-render

Log in or sign up for Devpost to join the conversation.

posted an update —

SarafuPay is now live on real WhatsApp

Meta approved our business (EPRIZE DIGITAL) and the SarafuPay app is now published. That means anyone can chat with the AI treasurer, not just test numbers.

Message +255 650 972 587 (https://wa.me/255650972587) and say "Hi". Start a collection, contribute with the PayPal sandbox, or ask "who has paid?"

We tested it end-to-end from several phones today: the bot recognises returning organisers and contributors, sends PayPal pay links, and delivers receipts automatically after capture.

Prefer not to use your phone? The web simulator still runs the same agent: https://sarafupay-ai.onrender.com/chat

Thanks to the PayPal, AG Grid and Devpost teams for the support so far!

Log in or sign up for Devpost to join the conversation.

Submission history