-
-
Get paid from abroad. Without chasing. Dueline turns a client chat into a PayPal invoice for Indian freelancers.
-
Home: what is owed, what is late and what was paid, in rupees. Every invoice is a line from sent to paid.
-
Every invoice with the rupees it brings, and what PayPal's fees and conversion really cost this year.
-
Drafted from a client chat. Every line quotes the chat, and the 50% upfront request becomes a deposit and a balance.
-
A paid deposit invoice: the rupees that reached the bank, from PayPal's own fee and the ECB rate.
-
A friendly heads-up before the due date, drafted by AI and sent only when you press a button.
-
Late payers get a firmer tone, in their own language, through PayPal's reminder or your own email.
-
Each client scored from their payment history: billed, owed and how many days they take to pay.
-
One client's full story: late on 3 of 3 invoices, so Dueline suggests an early-payment offer.
-
The monthly export register matches PayPal's FIRA and the bank's FIRC, with totals and CSV export (AG Grid).
-
A GST tax invoice with the LUT endorsement and RBI purpose code, ready to print or save as PDF.
-
PayPal moves the money, Dueline does the rest: invoicing, the real fee and verified webhooks.
Inspiration
India's gig workforce is projected to reach 23.5 million by 2029-30 (NITI Aayog), and many of these freelancers bill clients abroad through PayPal. In PayPal's own survey of Indian freelancers, 61% said a client had failed to pay them at least once, and many wait 2 to 4 weeks after invoicing (PayPal, via Business Standard).
We kept meeting the same freelancer. Call her Riya, a designer in Pune. The design work is the easy part. Then she types the invoice out of a WhatsApp chat, has no idea how many rupees a $900 invoice will really become, avoids chasing a client who is eight days late, and at year end her CA asks for FIRA, FIRC and purpose codes that live in five different places. Dueline is the tool we wanted to give her: from the client's chat to rupees in the bank to paperwork for the CA.
What it does
- Drafts the invoice from the chat. Paste a WhatsApp or email conversation. Gemini drafts every line, and each line quotes the words it came from. Checks in code verify the client, quantities, prices, currency, due date and purpose code before anything reaches PayPal. If the client asks for "half now, rest on delivery", Dueline offers a deposit and a balance.
- Sends it through PayPal. A real PayPal invoice (Invoicing v2) with the freelancer's GSTIN, LUT and SAC printed on it. A deposit goes out now; the balance waits as a PayPal draft and is sent on delivery.
- Shows the rupees before you send. On $1,000, PayPal's 4.40% plus a fixed fee and a 3.0% currency markup take about 7.3%. Dueline shows what reaches the bank before sending, then PayPal's real fee and net after payment.
- Chases late payers in the right tone. Each client gets a payment history and a risk level. Reminders are drafted in the client's language (seven languages), firmer for repeat late payers, with a friendly heads-up before the due date. When a client promises a date, reminders pause until then and come back firmer if it passes.
- Keeps export paperwork ready. A monthly register that matches PayPal's FIRA and the bank's FIRC, RBI purpose codes, GSTR-1 rows, a 44ADA year summary, and a printable GST tax invoice with the LUT endorsement.
- Forecasts cash for the next 30, 60 and 90 days, weighted by each client's history.
How we built it
PayPal is the core. Dueline makes 14 PayPal API calls: OAuth; Invoicing v2 to create, send, remind, cancel, record payments, read and update invoices; captures and Transaction Search for the real fee and net; and webhook signature verification. Every create and send carries a request id, so a double click or a retry never makes a second invoice. Webhooks are verified with PayPal before anything changes, then the invoice is re-read from PayPal.
AI proposes, code decides. The chat is masked first (emails and phone numbers never reach the model). Gemini, through the Vercel AI SDK, returns a draft that must match a Zod schema. Then plain code checks every quote against the chat, every number against the quotes, the due date against the stated terms, the currency against what the chat names, and flags prompt injection. Reminders go through the same pipeline: a model draft, a tone check, and template fallbacks in seven languages. We measured it on 27 test chats: client 100%, item lines 96%, prices 96%, due date rule 100%, purpose code 100%, warnings 100%, prompt injection flagged 100%, emails and phones kept from the model 100% (full results).
AG Grid powers the receivables table and the CA's export register: custom cell renderers, quick filter, keyboard navigation, a pinned totals row, the grid's own CSV export, and a theme built from our design tokens in light and dark.
Stack: Next.js 16 and React 19 in TypeScript, Tailwind 4, Neon Postgres, deployed on Vercel with a daily job at 06:00 India time that prepares reminders and reconciles payments. An offline mode runs the whole app with no keys.
Quality: 2,298 unit tests and 224 end-to-end tests, axe accessibility checks in both themes, CI with CodeQL and Dependabot, 25 written decision records and an architecture document with animated flow diagrams.
Challenges we ran into
- Trusting AI with money. A wrong price on an invoice is a real problem, so the model never has the last word. In one test it split a $700 moodboard into two lines; the checks caught it and warned instead of sending.
- PayPal's rules in India. Invoices from India cannot take partial payments, so a deposit is a separate invoice and the balance a PayPal draft that Dueline re-dates on the day it is sent. PayPal India also blocks payments between two Indian accounts, so the demo's paying client is a US sandbox buyer.
- The true cost of a payment. Fees and rates vary, so we read PayPal's real fee after payment instead of trusting our estimate.
- Speed. The first load after idle took about 7 seconds. A stored snapshot of PayPal invoices with background refresh brought screens to about a second.
Accomplishments that we're proud of
- The full loop works on the live demo: chat to invoice, sent through PayPal, paid by a sandbox buyer, the real fee and rupees shown, reminders and paperwork ready.
- AI that is checked, not trusted, with published accuracy figures.
- A calm, accessible interface in light and dark that works on a phone.
What we learned
PayPal's Invoicing v2 and webhooks cover far more than sending a bill; the hard part is everything around it. And the most useful AI feature is a small one with strong checks around it.
What's next for Dueline
Each freelancer connecting their own PayPal account (the multi-freelancer design is written up), a simple monthly price, automatic FIRA download, more client currencies, and a shared view for CAs who look after many freelancers.
Try it
Live demo: https://dueline-azure.vercel.app (judges: the password is in the testing instructions). The Tour the demo card on Home walks through every feature in two minutes. Anyone else can run the whole app locally in offline mode with the password offline (see Run It Yourself in the README).
Team
Rishi Bhaskar (engineering): PayPal integration, the AI drafting pipeline and its checks, data, the daily job, tests and CI. Nitin Mittal (product and design): research with freelancers, export rules (FIRA, FIRC, purpose codes, GST, LUT, 44ADA), product design and the demo story. Both of us shaped the scope, reviewed every change and tested the demo end to end on the PayPal sandbox.
Built With
- ag-grid
- axe-core
- base-ui
- gemini
- invoicing
- neon
- nextjs
- paypal
- paypal-server-sdk
- paypal-webhooks
- playwright
- postgresql
- postman
- react
- tailwindcss
- typescript
- vercel
- vercel-ai-sdk
- vitest
- zod