Inspiration

Late payments are one of the most common problems freelancers face. Bonsai analyzed three years of invoicing data from its 100,000+ freelancer users and found 29% of invoices were paid late; 42% of freelancers have missed personal bills because a client paid late (Clockify), and 65–70% of late payments are resolved by the first reminder. Most late invoices aren't disputes: the client simply forgot, and a timely reminder fixes it. Freelancers hate chasing because it's awkward and time-consuming. We wanted an agent that does that work, politely and on time, while the human stays in control of anything involving money. "Kaasu" means money in Tamil.

What it does

  • Chat to invoice: "Bill Priya [email protected] $450 for logo design, due Friday" becomes a real PayPal invoice draft. One click on Approve, and PayPal sends it.
  • Proactive payment chaser: an agent scan finds overdue and soon-due invoices, picks the tone (friendly, firm, or final) from days overdue, reminders sent, and client history, and drafts the reminder with Gemini. The user can edit it, then approve, and PayPal's remind API sends it.
  • Explainable late-payment risk score for every open invoice, based on the client's payment history, days overdue, invoice size, and ignored reminders.
  • Automatic revenue split: add "split 30% with ana@…" and, the moment the client pays, Kaasu proposes a PayPal Payout for the collaborator's share.
  • Cash-flow insights: outstanding, overdue, paid last 30 days, a risk-weighted 30-day forecast, and three actionable insights written by Gemini.
  • AG Grid dashboard with search, sorting, filters, status, and risk bars.
  • Human in the loop: every action that emails a client or moves money is an approval card. Payouts are only allowed from paid invoices and can never exceed the invoice total.

How we built it

  • PayPal (sandbox): OAuth 2.0; Invoicing v2 (create draft, send, remind, record payment, get, list); Payouts v1; Webhooks with signature verification. The collaborator split rule is stored in the invoice's private memo, so PayPal remains the source of truth, and Kaasu rebuilds its state from PayPal on startup.
  • AI: Google Gemini (gemini-2.5-flash, free tier) with function calling. The agent has 8 tools (create_invoice, list_invoices, find_invoice, sync_with_paypal, propose_reminder, propose_payout, propose_mark_paid, get_cashflow_insights) and runs a multi-step tool loop. Gemini also writes tone-aware reminders and cash-flow insights. If the AI is rate-limited, Kaasu falls back to a rule-based parser so it never breaks.
  • Backend: Node.js + Express, with a tiny JSON store for reminders, payouts, and approvals.
  • Frontend: plain HTML/CSS/JavaScript + AG Grid Community.
  • Hosting: Render free web service.

Challenges we ran into

  • Designing agent autonomy that's useful but safe: the agent can propose anything, but only a human click executes money or email actions.
  • Keeping state reliable on a free host with no persistent disk. We solved it by treating PayPal as the source of truth and re-syncing on startup.
  • Making the reminder tone feel human and match the situation, not robotic.

Accomplishments that we're proud of

  • A complete end-to-end flow on real PayPal sandbox APIs: chat → invoice → client pays → automatic split payout.
  • An explainable risk score instead of a black box.
  • It degrades gracefully: it works even with no AI key or no PayPal keys (mock mode), so anyone can try it.

What we learned

PayPal's Invoicing and Payouts APIs combine very naturally with LLM function calling. The hardest part of agentic commerce isn't the AI. It's designing trust: approvals, limits, and transparency.

What's next for Kaasu

  • Smart payment plans for high-risk invoices via PayPal Subscriptions
  • PayPal Agent Toolkit / MCP server integration
  • WhatsApp and email intake ("forward a client email, get an invoice")
  • Multi-currency forecasting with FX

Built With

Share this project:

Updates

Submission history