Inspiration
At Indiquer we build software for small and mid-sized businesses, and the same complaint comes up constantly: getting paid takes more effort than doing the work. Owners write invoices by hand, keep a mental list of who's late, put off awkward reminder emails, and then match payments to invoices one by one. We wanted an agent that owns that whole loop, on payment rails businesses already trust: PayPal.
What it does
You tell PayPilot who to bill in one sentence:
Bill Northwind Traders $4,000 for the October retainer, net 15, [email protected], and chase them if they're late.
PayPilot creates and sends a real PayPal invoice, then takes over:
- Chases late payers on its own. Every invoice gets a follow-up policy. When the due date passes, PayPilot sends reminders through PayPal's remind API, written by the AI for that client, that amount and that level of lateness. The tone escalates from friendly to firm to final, and after the last one it flags the invoice for a phone call.
- Reconciles payments as they land. A PayPal webhook arrives, PayPilot verifies its signature, fetches the invoice from PayPal, and matches each transaction: full, partial, overpaid or currency mismatch. Reminders stop the moment an invoice is paid.
- Knows how each client pays. It learns each client's average lateness, warns you when you bill a slow payer ("Northwind usually pays about 12 days late"), and forecasts the next four weeks of cash-in from expected pay dates, not due dates.
Every action the agent takes shows up as a card in the chat and in the activity feed, and any invoice can be reminded, synced or cancelled by hand.

How we built it
- PayPal Invoicing API v2 (sandbox): OAuth client credentials, invoice number generation, create, send, remind, get and cancel.
- PayPal webhooks (
INVOICING.INVOICE.*) with signature verification through/v1/notifications/verify-webhook-signature. Polling every 60 seconds is the fallback. - AI agent: an OpenAI-compatible model (
openai/gpt-oss-120bon Groq) running a tool-calling loop over eight tools:create_invoice,send_invoice,send_reminder,set_followup,cancel_invoice,get_invoice,list_invoicesandcash_insights. A separate JSON-mode writer drafts each reminder. A rule-based parser keeps the app usable if no model is available. - Forecast: each open invoice's expected pay date is its due date shifted by that client's average lateness, \( \hat{t}{pay} = t{due} + \bar{d}_{client} \), falling back to the overall average for new clients.
- App: TypeScript and Express backend with a follow-up scheduler and a reconciliation service. React (Vite) frontend with AG Grid, styled as a PayPal-style business dashboard that works on phones and in dark mode.
- Hosting: pm2 on our own Ubuntu server, published through a Cloudflare Tunnel, with a login in front of the app. Only the webhook and health check are open.
- Demo clock: the scheduler runs on a clock you can move forward, so a three-week collection cycle can be shown in a minute. Everything sent to PayPal still uses real dates.

Challenges we ran into
- Trust boundaries for money. A webhook is only a trigger. Amounts and statuses always come from PayPal's API, never from the webhook body, so a forged or replayed event can't mark anything paid.
- Keeping the agent from guessing. PayPal needs a real recipient email, so the agent is told, and structured, to ask for one rather than invent it.
- Moving to a reasoning model. Switching to
gpt-oss-120bbroke two things quietly. The model spent its whole token budget thinking before writing a reminder, so every reminder fell back to a template. It also sentnullfor optional tool fields, which Groq's strict schema check rejects. We raised the writer's budget, let optional fields be null and strip them before running a tool, and collapse the rare reply the model repeats twice. Each reminder in the app is labelled "written by AI" or "template", which is how we caught the first problem. - Making time visible in a demo. Collections play out over weeks, so we built the demo clock without faking anything sent to PayPal.
Accomplishments that we're proud of
One sentence produces a real, sent PayPal invoice, and from there the agent chases and reconciles it without another click. Every step is visible, reversible and backed by PayPal's own records.
What we learned
Most of the value in an "AI finance agent" isn't the chat. It's owning the boring follow-through reliably, with every action visible to the person whose money it is.
What's next for PayPilot
- Multi-tenant accounts and a real database.
- PayPal Orders and payment links for one-off charges.
- Payment plans for partial payers.
- WhatsApp and SMS reminders.
- Reading client payment terms from contracts.
- Bringing PayPilot into Indiquer's FinDesk product.
Built With
- ag-grid
- ai-agents
- cloudflare-tunnel
- express.js
- gpt-oss
- groq
- llm
- node.js
- paypal
- paypal-invoicing-api
- paypal-webhooks
- pm2
- react
- tool-calling
- typescript
- vite