Inspiration
Freelancers do the work, then wait for the money. A designer in Pune, a tutor in Lagos, a home baker taking custom cake orders: they all agree on work over WhatsApp or email, start working on trust, and then have to chase payment.
- 56% of US small businesses have unpaid invoices, owed $17,500 on average
- ~13% of freelance income is lost to late or missing payments
- ~102 hours a year go into chasing payments
Tools that fix this cost $29 to $109 a month and work in only a handful of countries. We wanted something with no subscription, built on PayPal, that starts where the deal actually happens: in the chat.
What it does
- Paste the chat. WhatsApp, email or a DM, in English, Hindi or Hinglish.
- AI drafts the deal. It pulls out deliverables, price, deposit, deadline and plain-language terms, and flags what was never agreed, like "revisions weren't discussed". Every field stays editable.
- Send one link. The client opens a phone-first deal page, types their name to agree, and pays the deposit with PayPal Checkout. No account needed.
- Get paid in full. When the freelancer marks the work delivered, UpFront sends a PayPal invoice for the balance. The deal closes once PayPal confirms it's paid.
Around that flow: a dashboard of what's still owed, insights with instant answers like "Who owes me money?", a sortable deal ledger with CSV export, and automations that draft follow-ups for the freelancer to review.
How we built it
- Next.js (App Router) + TypeScript, Tailwind CSS, with GSAP for motion
- SQLite via Drizzle ORM (libSQL, so it can move to a hosted database)
- AI drafting with the Vercel AI SDK and Anthropic models. Output is forced into a Zod schema, then normalised and validated before anyone sees it
- PayPal Orders v2 + JavaScript SDK for the deposit: the server creates the order from the stored amount, captures it after approval, and checks amount, currency and order before moving the deal forward
- PayPal Invoicing v2 for the balance: create, send, then read the invoice status to close the deal
- AG Grid for the deal ledger
- A deal state machine (Drafted → Sent → Agreed → Deposit paid → Delivered → Invoiced → Paid in full), so no deal can skip a step
Money is stored as integer minor units and never trusted from the browser:
$$\text{balance}{\text{minor}} = \text{total}{\text{minor}} - \text{deposit}_{\text{minor}}$$
PayPal speaks decimal strings ("90.00"), so every amount is converted both ways without floating point.
Principles
- The AI never moves money. It drafts. A person clicks to send or charge.
- Client chat is untrusted input. It is fenced off as data for the model, and every output is schema-checked. We test against a prompt-injection sample chat.
- Every payment step is idempotent. Each PayPal write carries a
PayPal-Request-Id, and every database update is conditional on the deal's current status, so a double click can't record money twice.
Challenges we ran into
- A blank PayPal popup. Our first orders carried a
payment_source.experience_contextblock. That puts an order intoPAYER_ACTION_REQUIRED, which is meant for redirect checkout, so the JS SDK popup had nothing to show. Moving those settings toapplication_contextgave a normalCREATEDorder and the popup worked. - Messy, multilingual chats. Hinglish prices like "6k per month" or "50% advance" have to become exact amounts, and missing terms have to be flagged rather than guessed.
- Retries and races. A capture or invoice request can arrive twice. We made each one safe to repeat, both on PayPal's side and in our database.
- One sandbox business account. In the demo, every freelancer is paid into the same PayPal sandbox account. Real per-freelancer payouts would need PayPal's partner onboarding.
What we learned
- How PayPal's Orders and Invoicing APIs fit together across a deal's lifecycle, and how much careful order state matters
- Structured output plus server-side validation makes AI safe to put next to money
- Designing for the person on the other side: the client never needs an account, and the page works on a phone
What's next
- PayPal webhooks so deals move to "Paid in full" automatically, without a status check
- Scope Guard: catching "can you also just…" requests and turning them into paid add-ons
- WhatsApp integration, more currencies, and a downloadable agreement PDF
Built With
- ag-grid
- anthropic
- drizzle-orm
- gsap
- libsql
- next.js
- node.js
- paypal
- paypal-checkout
- paypal-invoicing-api
- paypal-javascript-sdk
- paypal-orders-api
- react
- sqlite
- tailwindcss
- typescript
- vercel-ai-sdk
- vitest
- zod