Inspiration
Freelancers lose hours and money chasing invoices: writing them, reminding politely, guessing who will pay and when. At the same time, their clients increasingly work with AI assistants that could settle a bill if anything let them, safely. We wanted an agent that gets a freelancer paid through PayPal, and invoices that a client's own AI agent can pay within limits the client sets.
What it does
CollectPilot is one freelancer's own receivables agent, connected to their own PayPal. The money goes straight to the freelancer; CollectPilot never holds it.
- Voice note or text to invoice. Speak or type the job, in English or Arabic. The AI drafts a PayPal invoice and checks it against the agreed quote and the client's messages before anything is sent.
- A live receivables dashboard. Built with AG Studio, it shows risk and an expected pay date for every invoice, plus cash tiles. An AI assistant panel answers questions like "which clients are at risk?". PayPal webhooks keep it current, live.
- Reminders that chase politely. The reminder agent drafts each reminder for you to approve, edit or cancel. On the Pro plan ($12 a month, billed with PayPal Subscriptions) it runs on autopilot.
- Invoices an AI agent can pay. The client connects their own AI agent once: a PayPal approval, a spend limit and an agent key they can revoke. Over MCP, the agent asks "what do I owe?" and pays. Each payment is a PayPal order captured with the client's vaulted PayPal token, through the PayPal Server SDK.
- Payment schedules. A job is split into milestones or chunks, dated upfront.
- The client approves the schedule once and can turn on auto-pay.
- "Not done yet" holds a part until the freelancer proposes a new date and the client approves it.
- Retainers. A repeat client becomes a monthly PayPal Subscription.
- A payback digest. It shows what the agent collected, against the cost of the plan.
How we built it
- PayPal:
- Invoicing v2: create, send, remind, record payment.
- Subscriptions: the Pro plan and retainers.
- Vault: setup tokens and payment tokens.
- Orders v2, through the official PayPal Server SDK (generated by APIMatic): agent payments and auto-pay.
- Webhooks, each signature verified with PayPal.
- AI: Claude drafts and reviews invoices, writes reminders, and powers the dashboard's AI assistant (AG Studio agents on Claude). The client's own AI agent pays through our MCP server.
- AG Studio (AG Grid) for the receivables dashboard and its AI panel.
- APIMatic Context Plugin for PayPal in Claude Code, which grounded the Server SDK integration: client setup, auth, error handling and the test transport.
- Stack: Next.js on Render, Postgres, and Server-Sent Events for the live dashboard. Voice notes use the browser's speech recognition.
Challenges we ran into
- Letting an AI agent pay, safely.
- Every client gets a spend limit and a one-time agent key they can revoke.
- A held milestone can't be paid, even by an agent.
- A failed or over-limit charge is shown to both sides and never retried blindly.
- PayPal details that matter.
- PayPal rejects a reused invoice_id on a second order (DUPLICATE_INVOICE_ID), so later parts of a schedule get a suffix.
- An invoice can be PAID or MARKED_AS_PAID, and both count as paid.
- Dates across time zones. A due date stored as a plain date shifted by a day in UTC+3, until we stored it differently.
Accomplishments that we're proud of
Every invoice, reminder, subscription and agent payment in the demo is a real PayPal sandbox call. A client's AI agent found what it owed and paid it over MCP, within the limit the client set, and the freelancer's dashboard updated live from PayPal's own webhook.
What we learned
Agentic payments need the same boring guardrails as people do, and more: limits, keys you can revoke, clear holds, and no silent retries. PayPal's Vault plus Orders give those guardrails a real payment underneath.
What's next
- Many freelancers, each with their own PayPal, through PayPal partner onboarding (multiparty).
- A disputes helper and a cash forecast.
- More languages for voice notes.
Built With
- ag-grid
- ag-studio
- anthropic
- apimatic
- claude
- mcp
- next.js
- paypal
- paypal-invoicing-api
- paypal-orders-api
- paypal-server-sdk
- paypal-subscriptions
- paypal-vault
- postgresql
- react
- render
- server-sent-events
- typescript
Log in or sign up for Devpost to join the conversation.