Inspiration
Millions of freelancers bill clients in other countries. For many of them, billing is the worst part of the job: invoices in a second language, different currencies, and the awkward "just checking in…" email when a payment is late. Many simply don't chase late payments, and lose money because of it. We wanted a billing assistant you can talk to in your own language, which handles the client side in the client's language.
What it does
PayNudge is a chat-first billing assistant on top of PayPal Invoicing.
- Create: paste a client's email (or just describe the work, in any language) and PayNudge creates a PayPal draft invoice with the right client, items, currency and payment terms.
- Send: say "send it" and the invoice goes out through PayPal, with a secure PayPal payment link for the client.
- Track: a live dashboard (AG Grid) shows every invoice and its status, with outstanding, overdue and paid totals per currency. It picks up payments automatically.
- Ask: "Who hasn't paid?" gets a clear answer with amounts per currency.
- Nudge: one click writes a reminder in the client's language, with a tone that matches how late the payment is (friendly, firm, or final notice), and sends it through PayPal.
Human in the loop: PayNudge always creates a draft first, and nothing reaches a client (send, remind, cancel) without the user's explicit approval. It also catches mistakes, for example warning about a possible duplicate invoice before sending.
How we built it
- PayPal Invoicing v2 REST API (sandbox): OAuth client credentials, create draft invoices, send, remind, cancel, list and get invoices. Clients pay on PayPal's hosted invoice page.
- Claude (Anthropic API): a tool-using agent built with the TypeScript SDK tool runner. It has six tools (list_invoices, get_invoice, create_invoice_draft, send_invoice, send_reminder, cancel_invoice) that call the PayPal API directly, with Zod-validated inputs.
- Next.js (App Router) + React: chat panel and dashboard, with route handlers for the agent and for invoice data.
- AG Grid: the invoice table with status pills and one-click Send / Nudge actions that go through the agent.
Challenges we ran into
- Keeping the agent safe with real money flows: we designed the prompt and tools so that only drafts are created freely, and every client-facing action needs explicit approval in the conversation.
- Language handling: the user may write in Korean while the client needs English, German or Japanese, so the agent separates "what the user reads" from "what the client sees".
- PayPal edge cases, such as region rules (a Korean merchant cannot invoice a Korean PayPal payer), currency decimal rules, and payment term types.
Accomplishments that we're proud of
- A full loop on real PayPal sandbox data: request in natural language → draft → approval → sent invoice with pay link → reminder.
- Reminders that adapt their tone to how late the payment is.
- A simple experience: no forms, just a conversation and a clear dashboard.
What we learned
- PayPal Invoicing already covers most of what freelancers need. The missing piece was a friendly, multilingual interface.
- Tool-using agents work best with small, well-described tools and clear rules about when they may act.
What's next for PayNudge
- Scheduled automatic nudges based on due dates.
- Partial payments and installment plans.
- Recurring invoices for retainer clients.
- PayPal webhooks for instant payment updates.
Built With
- ag-grid
- anthropic
- claude
- next.js
- paypal
- react
- typescript