Inspiration
Freelancers do the creative work, then lose hours to the boring part: filling in invoice forms, double-checking amounts, and chasing late payments. We asked a simple question: what if billing felt like sending a message?
That led to AI Invoice Agent. You say what you did and who to bill, and the agent handles the paperwork, with you always keeping the final say.
What it does
Type something like:
Invoice Rahul $50 for logo design, due in 7 days
- Gemini parses the sentence into structured data: client, line items, amounts in USD, and due days.
- You review a confirmation card. Nothing is sent until you approve it.
- PayPal's Invoicing API creates and sends the real invoice.
- You track it from the same screen. When the client pays, the status changes from
SENTtoPAID.
How we built it
- Streamlit for the interface: a request box, a confirmation card, and a live invoice list.
- Google Gemini API to turn free-form text into clean JSON. The parser retries and falls back across several models, so a busy model doesn't break the app.
- PayPal Invoicing REST API (sandbox) to authenticate, create the invoice, send it, and check its status.
- A small Python backend that connects the three, with keys kept in environment variables and out of the repo.
Challenges we faced
- PayPal accepts only fixed payment terms (Net 10, 15, 30, and so on). A request like "due in 7 days" can't be sent as-is, so the app rounds it up to the nearest standard term.
- Permissions and setup. The API returned
NOT_AUTHORIZEDuntil we enabled the Invoicing feature on the sandbox app. - Unreliable model availability. Gemini models were sometimes unavailable or overloaded (
404and503errors). Adding retries and model fallback made the parsing step dependable.
What we learned
- Asking an LLM for structured JSON is far more useful than asking for free text, because the output can go straight into an API call.
- When an AI agent touches money, a human confirmation step is a feature, not a limitation. It makes the system safer and easier to trust.
- Payment APIs have real-world rules (regions, currencies, fixed terms) that the AI layer has to respect.
What's next
- AI-drafted payment reminders that adapt their tone to how overdue an invoice is
- Support for more currencies and regions
- Saved clients and recurring invoices