Inspiration

Freelancers don't lose money because they can't do the work. They lose it in the gaps around the work: typing out invoices, double-checking the maths, and awkwardly chasing late payers. Most invoicing tools still make you fill in a form field by field. We wanted to see if a freelancer could just paste the message a client sent ("Bill Priya at Bluepeak, 12 hours of landing page design at $40/hr, plus a $60 flat fee for logo files, due in 10 days") and have a real PayPal invoice ready to approve.

What it does

InvoicePilot is an AI invoicing agent built on the PayPal Invoicing API.

  1. Read with AI: paste a plain-English message. Gemini extracts the client, business, email, line items, currency and due date.
  2. Review and approve: the draft appears in an editable form. Nothing is sent to PayPal until you approve.
  3. PayPal sends it: InvoicePilot creates and sends a real invoice through the PayPal Invoicing v2 API, with PayPal's hosted payer link.
  4. Live dashboard: paid, outstanding and overdue totals come from PayPal's own invoice data.
  5. AI payment reminders: one click drafts a friendly or firm reminder, editable before it goes out through PayPal's remind endpoint.
  6. Ask your invoices: questions like "Who owes me the most?" are answered from pre-computed totals, so the model cannot invent numbers.

How we built it

  • Backend: Node.js and Express, with a small PayPal client (OAuth token caching, one automatic retry on auth failures) and a Gemini client that returns structured JSON.
  • PayPal: Invoicing v2 in the sandbox: generate invoice number, create, send, list, remind and record payment.
  • AI: Gemini 2.5 Flash with a response schema for extraction, reminder drafting and question answering.
  • Frontend: vanilla JavaScript, no framework, so it loads instantly.
  • Hosting: Vercel's free tier, deployed straight from GitHub. Total cost to run: zero.

Guardrails we added on purpose

AI that touches money needs limits, so the server does not trust the model:

  • Totals are recomputed on the server from quantity and price; the model's arithmetic is never used.
  • Emails and dates are validated, and missing information is flagged instead of guessed.
  • Due dates default to net-14 when a message doesn't give one.
  • Invoice totals above a cap are blocked.
  • A human approves every invoice before it is sent.
  • The Ask feature answers only from pre-computed facts about your invoices.

Challenges we ran into

  • PayPal permissions: the first calls failed with a 403 until the sandbox app had the Invoicing feature enabled. We added a retry and a scopes diagnostic so the failure is obvious next time.
  • Keeping the AI honest: the model could be asked about amounts it had no data for. Moving all arithmetic and totals to the server fixed that.
  • Free hosting for a persistent server: we moved the Express app onto Vercel's serverless model, which meant exporting the app instead of calling listen directly.

Accomplishments that we're proud of

  • A full loop from a pasted message to a sent PayPal invoice, then a reminder, then a paid invoice, all working on a live link.
  • Real guardrails around AI and money, not just a demo prompt.
  • Everything runs on free tiers.

What we learned

Structured output plus server-side validation makes an AI agent far more trustworthy than a clever prompt alone. And the Invoicing API suits agents well: every step (create, send, remind, record payment) is a clean, separate call.

What's next for InvoicePilot

  • Live PayPal accounts and webhooks, so invoices flip to paid automatically.
  • Recurring invoices and retainer clients.
  • Voice input, and WhatsApp or email forwarding, as ways to submit the client message.
  • Automatic reminder schedules, still with approval before sending.

Note for judges: the app runs against the PayPal sandbox, so no real money moves and sandbox invoices don't send real emails. Use Mark paid, or pay the invoice's payer link from a sandbox Personal account, to see an invoice flip to PAID.

Share this project:

Updates

posted an update —

InvoicePilot is live end-to-end. Paste a plain-English message like "Bill Priya at Bluepeak, 12 hrs of landing page design at $40/hr, due in 10 days" and watch it become a real PayPal sandbox invoice in seconds — Gemini extracts the details, you approve, and the PayPal Invoicing v2 API creates and sends it.

From there the agent keeps working: one click drafts a friendly or firm payment reminder and sends it through PayPal, you can ask plain-English questions like "Who owes me the most?" and get answers computed from real invoice totals (never guessed), and marking an invoice paid updates the dashboard instantly.

Every number you see is recomputed server-side — the model never gets to decide what you're owed. Nothing reaches PayPal without a human clicking approve first.

Deployed free on Vercel, running against the real PayPal Invoicing sandbox. New demo video up showing the full loop live, no cuts: https://youtu.be/utlNBZamSPw

Submission history