Inspiration: I'm Husseini, a freelancer and account officer in Nigeria. Since January 2026, Nigerians can receive PayPal payments, paid out through Paga. That opened the door for thousands of designers, developers and writers like me to bill clients in London, Berlin and Toronto.
But getting paid is still messy. Prices are agreed in WhatsApp threads, invoices live in PayPal, the "who still owes me?" list lives in a spreadsheet, and every amount has to be converted to naira in your head. Chasing a late client is awkward, so it often doesn't happen, and money slips through. I wanted one desk where every client payment is visible in naira, and where AI does the boring, awkward parts.
What it does: KudiDesk is a payments workspace built on PayPal Invoicing, with Gemini doing the heavy lifting:
- Paste a client chat, get an invoice. Paste a WhatsApp or email thread. Gemini extracts the client, email, line items, the final negotiated price, currency and due date ("we pay within 2 weeks" becomes a date). It pre-fills a PayPal invoice, highlights AI-filled fields and flags anything uncertain. You review, then send a real PayPal invoice.
- Ask your invoices in plain English. "Unpaid clients over ₦500k, biggest first" becomes real AG Grid filter and sort state. The column filters, sort arrows, pinned totals row and income chart all update, and you can inspect the exact AG Grid API calls the AI generated.
- A chase agent for late payers. Select overdue invoices and the agent reads each one's context: days late, previous reminders, the client's payment history and other open invoices. It picks a tone (heads-up, gentle, firm or final), explains why, and drafts a short, polite note. You edit or untick drafts, and only then does KudiDesk send each one through PayPal's invoice remind API.
- Payments land live. PayPal webhooks (
INVOICING.INVOICE.PAIDand friends) are signature-verified, de-duplicated and re-checked against the PayPal API, and the row turns green within seconds with a toast showing what you were paid in naira. Clients who pay by bank transfer or Paga can be recorded with Mark paid, which writes the payment to the PayPal invoice. - Income in naira. Received, Outstanding and Overdue totals plus a monthly income chart split by the currency clients paid in.
How we built it:
- Next.js 15 (App Router, TypeScript) and Tailwind CSS 4
- PayPal REST APIs (sandbox): OAuth2; Invoicing v2 (create, send, list, get, remind, record payment); Webhooks with signature verification
- Google Gemini (REST, JSON mode) for the three AI features, with every response validated by Zod before it touches the UI or PayPal
- AG Grid Community 36: AI-driven
setFilterModelandapplyColumnState, row selection feeding the agent, a pinned totals row recomputed from filtered rows,getRowIdfor live webhook updates, row-class rules for the "just paid" flash, custom renderers, date filters and CSV export - AG Charts Community for the income chart, which follows the grid's filters
- Render: deployed from a
render.yamlBlueprint (free web service, health checks, environment-variable secrets)
Challenges we ran into:
- Unreliable networks. I built and tested on a mobile hotspot, where AI calls could hang. KudiDesk now prefers IPv4, applies per-model timeouts and a 25-second budget per AI request, falls back across Gemini models, and finally uses an offline parser so the app never freezes.
- PayPal sandbox quirks. Invoicing has to be enabled per app, the invoice list omits payment dates, and sandbox checkout was unreliable for Nigerian test accounts. I filled the gaps from the full invoice API and added "Mark paid" for off-PayPal payments, which turned into a genuinely useful feature.
- Making AI safe to drive a UI. Turning free text into grid state needed a small validated query language, per-column checks, and a clear way to show users exactly what the AI did.
Accomplishments that we're proud of:
- A complete, working loop on real PayPal APIs: chat, invoice, AI reminder, payment, income chart.
- AI that acts, by driving a data grid and sending PayPal reminders, rather than just chatting, with a human approval step every time.
- It's built for the people who need it: naira-first, tolerant of patchy networks, and free to host.
What we learned:
Dependable AI is about the boring parts: strict output validation, graceful fallbacks and review steps. A well-designed grid API like AG Grid's filter model is what makes "natural language to real UI" possible.
What's next for KudiDesk:
- Live FX rates and Paga payout tracking, to show what actually lands in your Nigerian account
- Scheduled chasing: the agent proposes a weekly plan and you approve it once
- Sharing PayPal pay links over WhatsApp
- Multi-user accounts with persistent storage
Built With
- ag-grid
- gemini
- nextjs
- paypal
- react
- render
- tailwindcss
- typescript
- zod