Inspiration
Freelancers who work for clients abroad often wait weeks for payment, then lose a chunk to fees and currency conversion without knowing the exact rupee amount that reaches their bank. Chasing late payers is awkward, and replying to clients by hand takes time. We wanted one place to send invoices, read client messages, and see the real money at the end.
What it does
ClearPaid is a web app for freelancers and small teams:
- Invoices through PayPal: create an invoice from a bill, photo, PDF, or pasted text, check the fields it reads, and send it to the client through PayPal.
- Proof of invoice: a signed QR code and public page show the invoice status without exposing contact details.
- AI replies: it classifies client messages and drafts replies. Nothing goes out until the freelancer approves it. Voice dictation is supported.
- Shared projects: one client project can be split between several freelancers, each invoiced for their share.
- Payment reminders: overdue invoices get reminders, sent only after approval.
- Money view: shows what reaches the bank in rupees after fees and conversion, and exports a monthly ledger CSV for the accountant.
Design rules: money never passes through ClearPaid, nothing is sent without approval, and "paid" is only accepted after PayPal confirms it.
How we built it
- A Node.js server with no web framework, using only Node's built-in HTTP module plus the pg driver for Postgres.
- Plain HTML, CSS, and JavaScript front ends: a landing page, a mobile app that can be installed, and a desktop site with one page per feature.
- PayPal REST APIs for invoicing, sandbox sign-in, webhooks ("invoice paid" and "cancelled" events, with signature and freshness checks), and transaction search for real fees.
- AI through a free-provider waterfall: Groq, then Gemini, then OpenRouter, then a rule-based fallback. Groq's hosted Whisper handles voice notes.
- Storage: a local JSON file for development, Postgres when DATABASE_URL is set.
- Security: access token on every API call, per-address rate limits, security headers, and secrets kept in environment variables.
- Tests with Node's built-in test runner.
Challenges we ran into
- Keeping the AI honest. Client messages are treated as data, off-topic requests are refused before any model is called, and "paid" is never assumed from a model's reading.
- Free AI tiers have per-project limits, so we built automatic fallback between providers.
- PayPal's invoice, webhook, and sign-in flows follow its documentation, but we are still confirming them against a live sandbox account.
- Making the same features work on phones and laptops, in English and Hindi.
Accomplishments that we're proud of
- A full path from bill to PayPal invoice to proof link, with the AI reply step gated behind human approval.
- Automated tests pass, including the webhook signature checks, per-user data separation, and the ledger export.
- Working Postgres storage, tested against a real Postgres server.
What we learned
- Money flows are safest when the software only reports what the payment provider confirms.
- Keeping AI as advice, with a person approving each outbound message, makes it far easier to trust.
- Free tiers and sandboxes shape the design as much as the features do.
What's next for ClearPaid
- Run the PayPal invoice, webhook, and sign-in flows end to end against a live sandbox.
- Add the reminders screen to the app and check the shared-projects screen in a browser.
- Move sessions and rate limits out of memory so they survive restarts.
- Deploy to a public HTTPS address and register the live webhook.
- Use Transaction Search fees across all invoices, not just estimates.
Built With
- javascript
- json
- node.js
- paypalinvoicingapi
- restapi

