Inspiration## Inspiration

Freelancers and small businesses lose hours every month on billing: copying hours out of timesheets, doing the math, writing invoices, chasing late payers and reconciling payments. We wanted an AI agent that does the busywork while keeping the human in control of anything that touches money.

What it does

You chat with InvoicePilot in plain English, or paste a messy timesheet or client email.

  • AI invoice drafting: the agent extracts client, line items, hours × rate, tax and due date, and creates the invoice.
  • PayPal checkout: sending an invoice creates a PayPal order with full line items and a secure checkout link. The AI writes the client email.
  • Automatic capture: when the client pays on PayPal, they're redirected back and InvoicePilot captures the payment. The invoice flips to Paid.
  • Refunds: full or partial refunds through the PayPal Payments API, just by asking ("refund $20 of #1003").
  • AI insights: the dashboard analyses payment behaviour (days-to-pay per client, overdue and due-soon amounts, unsent drafts) and suggests next steps, each with a one-click ⚡ action that hands the task to the agent.
  • Human in the loop: sending, reminders, cancellations, payment records and refunds always need a Confirm click. The AI never moves money on its own.

How we built it

  • Backend: Python + FastAPI
  • AI: an LLM with function calling (OpenAI gpt-oss-120b served on Groq, via an OpenAI-compatible API) with 11 tools over the invoice store and PayPal. Money-moving tool calls are intercepted and returned to the UI as pending actions.
  • PayPal (Sandbox): OAuth2 client credentials, Orders v2 (create with line-item breakdown, get, capture via return URL), Payments v2 capture refunds.
  • Frontend: vanilla HTML/CSS/JS chat and dashboard.
  • Hosting: Render (sponsor tool).

Challenges we ran into

Our sandbox account didn't have Invoicing API access, so we rebuilt the invoice lifecycle on PayPal Orders and Payments instead. Mapping messy inputs (fractional hours, tax) to PayPal's strict order schema, where quantities must be whole numbers and totals must match the breakdown exactly, took careful work. We also had to handle model availability (retries and fallbacks) and keep the agent from creating duplicate invoices.

Accomplishments that we're proud of

A full billing lifecycle (draft → send → pay → capture → refund) driven entirely by conversation on real PayPal APIs, plus an insights panel that turns data into one-click actions, with a safe human-in-the-loop design throughout.

What we learned

How to design agent tools so the AI stays useful but can't take risky actions on its own, and how PayPal's Orders/capture flow works end to end.

What's next for InvoicePilot

PayPal webhooks for real-time updates, the Invoicing API where available, recurring invoices, receipt and timesheet upload, multi-language reminders, and Venmo / Pay Later on the checkout page.

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for InvoicePilot

Built With

Share this project:

Updates

Submission history