Inspiration

Freelancers do the work, send an invoice, and then wait. Chasing a late payment feels awkward, so people put it off, and cash flow suffers. Existing invoicing tools send reminders on a fixed timer (day 3, day 7) and never adapt. We wanted an agent that behaves like a polite, persistent assistant: it knows when to wait, when to nudge, and when to hand the problem back to the human.

What it does

ChasePay takes the whole invoice-to-payment loop off a freelancer's plate:

  1. Paste a brief. Any messy email or chat note, e.g. "Bill Studio Kiln, 3 landing pages at $550 each plus $100 for copy edits, due in 7 days."
  2. AI extracts the invoice. Client, email, line items, quantities, prices and due date come out as structured data.
  3. A real PayPal invoice is created and sent through the PayPal Invoicing API (sandbox).
  4. Payment is detected through PayPal webhooks (INVOICING.INVOICE.PAID, signature-verified) with a status-sync fallback, and the invoice flips to PAID.
  5. The collections agent runs. For every unpaid invoice it receives the full situation (days overdue, reminders already sent, tone preference) and must choose exactly one action: wait, send_reminder (friendly or firm), or escalate_to_human.
  6. Every decision is explained. The Agent timeline shows what the agent did and why, so the freelancer stays in control.

A demo clock lets you time-travel (+7 / +14 / +30 days) to see the agent's behaviour without waiting real days.

How we built it

  • Backend: FastAPI + SQLAlchemy + SQLite.
  • PayPal: Invoicing API v2 (create, send, remind, get status, record payment) with OAuth, plus Webhooks verified through PayPal's verify-webhook-signature endpoint.
  • AI: an LLM with tool calling (Llama 3.3 70B on Groq through an OpenAI-compatible API; the provider layer also supports Gemini and Claude and is switched by one environment variable). The model never "just writes text": it must call a tool, which makes its output structured and auditable.
  • Guardrails: hard rules sit outside the model so a bad completion can never spam a client: at least 3 days between reminders, a maximum of 3 reminders, and escalation only when 14+ days overdue or after 3 reminders. When a guardrail overrides the model, the timeline says so.
  • Frontend: React + TypeScript + Vite dashboard with the brief box, invoice list and decision timeline.
  • Tests: 19 automated tests cover the escalation ladder, webhooks, guardrails and the AI provider handling.

Challenges we ran into

  • The model misread a real brief. In live testing, Llama turned "3 landing pages at $550 each plus $100" into 5 pages and a $2,850 invoice. Sending a wrong amount to a client is the worst failure for this product, so we added a verification step: every quantity and price the model extracts must be traceable to the original message. If not, the model is asked to re-read once, and if it is still wrong the invoice is refused with a clear message instead of being sent.
  • Sandbox emails do not reach real inboxes, so we verified invoices through the PayPal invoice page and sandbox accounts.
  • Time-dependent behaviour is hard to demo, which led to the simulated clock.

Accomplishments we're proud of

  • A real end-to-end loop on the PayPal sandbox: brief to invoice to payment to automated follow-up.
  • An agent whose decisions are explainable and bounded, not a black box that emails clients.

What we learned

Reliable agents need structure around the model: tool calling for actions, deterministic guardrails for safety, and verification of any number that touches money.

What's next

Email and WhatsApp reminder channels, per-client payment history so tone adapts to habits, PayPal live-mode onboarding, and a weekly cash-flow summary for the freelancer.

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for ChasePay

Built With

Share this project:

Updates

Submission history