Inspiration

Every invoicing tool — and every other invoicing entry we found in this hackathon — works for the business: it drafts, sends and chases. Nobody gives the other side of the invoice anything. But the person who owes the money is usually not refusing to pay; they are short this month, embarrassed, and dealing with it at 11 pm. What they need is someone to talk to who can actually change the terms. PayPal's Invoicing API already has the rails for that (partial payments, a minimum amount due, editable due dates); what was missing was a careful agent on the payer's side, and a hard guardrail so the agent can never give away more than the merchant allows.

What it does

NudgePay — the invoice that talks back. A billing studio for freelancers on top of the PayPal Invoicing API, plus an AI Concierge for the client.

  1. The Concierge (the new idea). Every invoice NudgePay sends carries a link to a private, client-facing page. The client can ask what a charge is for (answered only from the invoice), pay with PayPal (button + PayPal's own QR code), or say "this month is tight, can I split it up?" The concierge offers a payment plan or a short extension in plain words. One tap accepts it and the deal is written into the real PayPal invoice: partial payments switched on, the first installment set as PayPal's minimum amount due, the due date moved, the plan in the invoice note — and PayPal emails the updated invoice.
  2. Sealed house rules, enforced by code. The merchant sets the limits: most installments, smallest first payment, longest plan, smallest installment, longest extension, days between payments. The server computes every offer the rules allow before the model speaks; the model only chooses one and finds the words. Every plan is re-checked on accept, and only a plan the concierge actually offered can be accepted. The AI talks; the rules decide.
  3. One sentence → invoice. Describe the work ("Invoice Sarah Chen $1,850 for the logo redesign, due in 14 days"); the AI drafts customer, line items, due date and terms; you check it and it is created and sent through PayPal.
  4. Live ledger (AG Grid). Every invoice straight from PayPal: status, plan progress, KPIs, quick filter, pinned totals. Open a row to see the client's whole conversation and every rule check the offer passed, record a bank transfer (installments advance the plan and re-sync PayPal's minimum due), draft a reminder, or cancel.
  5. A collections agent with manners. One pass over every open invoice: waits on what isn't due, respects every agreed plan (chases only the next installment, never the whole balance), picks friendly, firm or final by how late it is, never nags twice in 72 hours, sends through PayPal's remind endpoint — and explains every decision. Dry-run mode drafts without sending.
  6. AI cash briefing: who owes what and the one next action, in three sentences.

Live demo status (Nov 12, 2026): the demo at https://nudgepay.sites.tab.bot still reads and shows the real PayPal sandbox invoices, but its AI features (concierge replies, drafting, reminders, briefing) currently return an error: the model credential behind the hosted copy expired after an infrastructure move, and redeploying needs our PayPal sandbox app keys, which we could not recover before the deadline. The demo video shows the full flow on the working deployment, recorded in October; the code and the test report are in the repo.

How we built it

  • PayPal Invoicing API v2 (sandbox): OAuth2 · create (Prefer: return=representation) · send · list + get · PUT with configuration.partial_payment (allow + minimum_amount_due) and a new payment_term.due_date, send_to_recipient=true for accepted plans · remind · payments (record external payments; partial payments move the invoice to PARTIALLY_PAID) · cancel · generate-qr-code.
  • Guardrail: plain JavaScript computes every allowed plan to the cent (extension, 2- and 3-payment variants) and validates 8 rules (count, sums exactly to the amount due, dates, installment floor, first-payment %, first payment within 7 days, spacing, plan length). The model returns an offer id, never amounts.
  • AI: any OpenAI-compatible chat model; the demo uses xAI Grok in JSON mode with small, strict prompts (draft, concierge, reminder, briefing).
  • AG Grid Community 34 (Theming API, custom cell renderers, pinned totals row, quick filter).
  • One Cloudflare Worker for the static front end and /api/*, with a small D1 key-value table for plans, conversations, house rules, the desk log and reminder history. PayPal stays the system of record. Keys never reach the browser.
  • Design system from scratch: Instrument Serif + Inter, ivory / navy / brass, no framework; checked at desktop and 390 px phone width.

Challenges we ran into

  • Letting a language model negotiate money safely. The answer was to take money decisions away from it entirely: code lists the offers, the model picks and phrases, code re-validates on accept.
  • Making the PayPal invoice itself carry the deal: the right combination of partial payment settings, minimum due and due date, and re-syncing them after each installment.
  • Dates and money in model output ("USD 1230.00", wrong due dates): fixed by giving the model pre-formatted facts and strict wording rules, then testing every flow end to end.

Accomplishments that we're proud of

A full loop on the real PayPal sandbox — a client negotiates a plan in plain words, one tap rewrites the PayPal invoice, installments advance the plan, and the collections agent chases only what's actually due. 29 of 29 desktop flows and 15 of 15 phone checks passed against the live demo on Oct 12, 2026 (test report in the repo).

What we learned

PayPal's Invoicing API is quietly a complete payment-plan engine (partial payments + minimum due + editable terms). The hard part is trust: an agent that talks to someone's clients has to be provably unable to overstep.

What's next for NudgePay

Webhooks (INVOICING.INVOICE.PAID) to advance plans automatically, scheduled agent passes, multi-currency house rules, and letting the concierge hand off to the merchant with a summary when a client asks for something the rules don't allow.

Project history / AI disclosure

Built during the hackathon window (October 2026). David J directed the product and reviewed the output; Tab, an LLM-based AI assistant, wrote most of the code, copy and the demo video under his direction. The app calls an LLM at runtime as described above; the demo narration is text-to-speech. Sandbox only: the clients are fictional and no real money or production credentials are involved.

Built With

Share this project:

Updates

Submission history