Inspiration

Every freelancer we know has the same story: the work is done, the invoice is sent, and then nothing happens. Late payment is the top cash-flow problem for sole traders and micro-businesses, and in the UK small businesses are owed billions in late payments at any one time. The money usually does come eventually. The real cost is the chasing: writing awkward emails, worrying about annoying a good client, and putting it off until it's a real problem.

Accounting tools can send reminders, but they're fixed templates on a fixed schedule. A human bookkeeper knows that one client always pays the day after a nudge, that another only pays after a final notice, and that a small charity might need to pay in instalments. We wanted to give every freelancer that kind of bookkeeper, built on the payment rails they already use.

What it does

ChaseBot is an AI accounts-receivable agent for freelancers, built on PayPal Invoicing and Claude.

  • Plain words → PayPal invoice. Type something like "6h logo work for Sam at Acme, £40/h, plus £15 fonts, 14 days", or attach a screenshot of a timesheet. Claude extracts structured line items (hours, quantities, flat fees), matches an existing client, and lists anything it assumed (e.g. "No VAT added. Please check"). One click creates and sends a real PayPal invoice with a Pay Now link.
  • A chase agent that knows your clients. For each overdue invoice, a Claude agent looks up that client's payment history (how late they paid before, and which reminders worked), then picks one action:
    • a friendly nudge → firm reminder → final notice, delivered through PayPal's reminder API
    • a payment plan: it cancels the invoice and replaces it with 2–4 PayPal instalment invoices when a client looks stretched rather than forgetful
    • escalation to you, when emails have stopped working and it's time to pick up the phone

It explains every decision in plain English, e.g. "Jordan paid the last two invoices 24 and 31 days late, so I've skipped the friendly nudge."

  • You stay in control. With Autopilot off, anything going to a client lands in an Agent inbox where you can edit the message, then approve or dismiss it. With Autopilot on, it acts by itself.
  • It stops the moment you're paid. Verified PayPal webhooks (plus a polling fallback) mark the invoice Paid and end the chase automatically.
  • Demo clock. Jump forward in time so a whole month of chasing plays out in a few minutes.

How we built it

  • PayPal Developer Platform (sandbox)
    • OAuth 2.0 client credentials
    • Invoicing v2: generate-next-invoice-number, create, send, remind, cancel, payments, get
    • Webhooks (INVOICING.INVOICE.PAID, CANCELLED, UPDATED, REFUNDED) with verify-webhook-signature
  • Claude Opus 5.5 via the Anthropic SDK
    • Extraction uses structured outputs with a Zod schema, plus vision, so free text or an image becomes a typed invoice draft
    • Chase agent is a tool-use loop with five strict-schema tools: get_client_history, send_reminder, offer_payment_plan, schedule_next_check and escalate_to_owner
    • Guardrails enforced in code, not just the prompt: at most one client-facing action per run, an owner-approval queue unless Autopilot is on, and server-side refusal fallbacks
  • Node.js + Express backend, a vanilla JS/HTML/CSS dashboard (responsive, light and dark mode), JSON-file storage, and rate limiting on the public demo
  • Deployed on Render from a render.yaml blueprint
  • Claude Code was used as a pair programmer throughout the build
Browser dashboard ──► Express API ──► Claude (extraction + chase agent)
                           │                  │ tools
                           └──────────► PayPal Invoicing v2 (sandbox)
                           ◄────────── PayPal webhooks (signature-verified)

Challenges we ran into

  • Making an agent trustworthy with real money and real relationships. Prompt instructions alone weren't enough, so the important rules are enforced in code: the one-action-per-run limit, the approval queue and the escalation path.
  • Payment plans on top of invoices. A PayPal invoice is for a single amount, so a plan means cancelling the original with a clear explanation, then issuing linked instalment invoices whose totals add up to the penny.
  • Demoing something that happens over weeks. We added a demo clock so overdue behaviour can be shown in a three-minute video without faking any PayPal data.

Accomplishments that we're proud of

  • Every action the agent takes is a real PayPal API call: invoices, reminders, cancellations, instalments and payment records. The full loop (invoice → overdue → reminder → buyer pays → webhook → chase stops) works on the live sandbox deployment.
  • The agent's reasoning is specific and sensible. It treats a reliable client, a habitual late payer and a cash-strapped charity very differently, using only their payment history.
  • It's a complete product, not a script: AI drafting, an approval inbox, a per-invoice timeline and a hosted demo.

What we learned

  • Agents become useful when their tools are narrow and their actions can be reversed or approved. Five small tools beat one "do anything" tool.
  • PayPal's Invoicing API is a strong base for agentic finance tools: it already handles hosted payment pages, emails, reminders and status, so the AI can focus on judgement.

What's next for ChaseBot

  • PayPal partner onboarding, so freelancers can connect their own PayPal business accounts
  • Cash-flow forecasts that predict when each invoice will actually be paid
  • Reading and answering client replies ("can I pay next Friday?") and rescheduling automatically
  • SMS and WhatsApp reminders as well as PayPal email

Try it

Built With

Share this project:

Updates

Submission history