Inspiration

For freelancers, independent contractors, and small business owners, doing the client work is only half the battle. The other half is the administrative grind of getting paid: drafting itemized invoices, manually creating payment links, checking accounts for arrivals, and sending awkward reminder emails to clients who “forgot” to pay.

Freelancers routinely lose 15–20% of their unbillable time to this kind of bookkeeping. In financial operations, Days Sales Outstanding (DSO) captures how long it takes to collect payment after work is delivered:

$$DSO = \left(\frac{\text{Accounts Receivable}}{\text{Total Credit Sales}}\right) \times N$$

where $N$ is the number of days in the billing period. When the friction between finishing work and issuing a payment link is high, the lag compounds:

$$\text{Cash Flow Latency} = \Delta t_{\text{invoicing}} + \Delta t_{\text{client approval}} + \Delta t_{\text{settlement}}$$

What it does

FlowMind AI is a conversational payment operations assistant for freelancers and solopreneurs:

Conversational invoicing — “Create an invoice for Priya at [email protected] for $150 for logo design, due in 3 days” is parsed into a clean, numbered invoice record (INV-0001) with validated currency and deadline. PayPal sandbox link generation — one prompt creates a real PayPal Orders API v2 order and returns a clickable sandbox approval link. Capture & settlement — once the client approves checkout, FlowMind captures the order and flips the invoice to paid — reflected immediately on the live dashboard. Financial intelligence on demand — “What’s my financial summary?” or “Who’s overdue?” aggregates receivables, paid totals, and outstanding balances live.

How we built it

FlowMind AI is a single-process FastAPI backend paired with a lightweight vanilla-JS dashboard — deliberately avoiding a microservice architecture to remove deployment failure points and keep financial state deterministic.

User (freelancer) │ ▼ FlowMind Dashboard ──REST API──► FastAPI Backend (single-process orchestrator) (Chat + live stats) │ ▲ ├──► google-genai SDK → Gemini function calling │ ├──► SQLAlchemy ORM → SQLite (Client, Invoice, Payment, Reminder, AgentRun) └────────────────────────────────────┴──► PayPal Orders API v2 (Sandbox) flowmind-ai/ ├── backend/ │ ├── app/ │ │ ├── gemini_agent.py # Gemini function-calling loop (8 financial tools) │ │ ├── paypal_client.py # PayPal Orders API v2 (OAuth2, create, capture) │ │ ├── tools.py # Invoicing, capture, reminders & analytics logic │ │ ├── models.py # SQLAlchemy relational schemas │ │ └── main.py # FastAPI entrypoint & auto-capture return route │ └── requirements.txt ├── frontend/ │ └── index.html # Conversational UI & live settlement dashboard └── README.md Challenges we ran into

Preventing LLM hallucination of financial state. Generative models are probabilistic; accounting has to be deterministic. We enforced a strict tool-boundary principle: Gemini has zero write access to the database. An invoice can only move from draft to paid if PayPal’s API itself returns a COMPLETED status with a valid capture ID — the model can’t assert a payment happened, only report one that actually did.

Human-in-the-loop vs. conversational deadlocks. Initially we had Gemini always ask for confirmation before creating a payment. In practice, a plain “Yes” in reply would lose context. We refined the system prompt so an explicit, direct instruction (“create a payment link for INV-0001”) counts as authorization on its own, while still asking first when the request is ambiguous.

Accomplishments that we’re proud of Real PayPal sandbox settlement — FlowMind AI executes live Orders API v2 transactions, verified with real PayPal capture IDs (e.g. 4T551765BS024182F, 37S05585DD759282N). Instant auto-capture on return — when the buyer completes PayPal checkout, the /payment-complete endpoint captures the order in the background, updating the dashboard to paid without extra button clicks. Full AI transparency — an interactive execution-trace drawer displays raw tool calls, parameters, and timestamps for judges and users. 1-click demo reset — a reset utility wipes demo data back to a clean $0.00 state for repeatable recordings. Zero build-step architecture — the entire application runs from a single unified FastAPI process with no npm build complexity, deployed live on Render. What we learned

Function calling beats free-form prompting for anything touching money — constraining Gemini to explicit Python tool contracts turns an unpredictable text model into something closer to a reliable orchestrator.

PayPal’s Orders v2 authorize → capture flow is a genuinely good fit for AI agents: it lets the agent safely hold an order and only finalize it once real conditions are met, rather than needing to trust the agent’s own judgment about when money should move.

What’s next for FlowMind AI Recurring billing via PayPal Subscriptions and Vault, for retainer-style client relationships. Autonomous reminders over SMS/WhatsApp/email (Twilio, SendGrid) instead of in-app only. Automated quarterly tax estimation:

$$\text{Estimated Tax} = \sum_{j} (\text{Revenue}j - \text{Expenses}_j) \times r{\text{tax}}$$ Voice-activated mobile capture — “Hey FlowMind, bill Dave $400 for plumbing repair” — for contractors who want to invoice before they’ve even left the job site.

Built With

Share this project:

Updates

Submission history