Inspiration Freelancers do the work first and get paid later, and “later” keeps slipping. Bonsai’s data from more than 100,000 freelancers shows that 29% of invoices are paid late. Chasing those payments is unpaid, awkward work that most people put off. Meanwhile, their clients are used to paying by UPI in seconds, yet still receive PDF invoices with bank details to type in by hand. We wanted to remove every reason a client has to pay late.
What It Does Invoice in One Sentence: Type a simple command like, “Website redesign 40k, 2 revisions at 5k, 18% GST, due in 7 days,” and AI automatically turns it into a GST-ready invoice.
One-Tap Payment Page: Every invoice gets a hosted Razorpay checkout supporting cards, net banking, wallets, and UPI. The client does not need to create an account.
Verified Payments: Payments are confirmed on the server by checking Razorpay’s signature, then confirmed again by a signed webhook. Each invoice is marked paid exactly once.
AI Follow-Ups: The reminder tone escalates depending on how late the invoice is: friendly, then firm, then a final notice. Every email includes the amount, the invoice number, and the payment link.
Auto-Chase (Pro): A daily job drafts and sends reminders for overdue invoices automatically.
Client Risk Scores (Pro): Each client receives a 0–100 score based on their historical payment reliability.
Cash-Flow Dashboard: A unified view showing what’s outstanding, what’s overdue, collected revenue, average days to get paid, and expected revenue for the next 30 days.
How We Built It App Architecture: Next.js 15 (App Router, Server Components, Server Actions) utilizing TypeScript and Tailwind CSS v4.
Database & Authentication: Supabase Postgres and Auth. Row Level Security (RLS) on every table ensures each user can only ever see their own data.
AI Integration: Groq running openai/gpt-oss-120b in JSON mode. Every response is strictly validated with Zod before the application uses it.
Payments: Razorpay Orders, Checkout, and Webhooks, verified with HMAC-SHA256 and timing-safe comparison.
Hosting: Vercel, utilizing Vercel Cron for the daily auto-chase and plan expiry updates. The entire stack runs efficiently on free tiers.
Challenges We Ran Into Mid-Build AI Model Retirement: Groq retired Llama 3.3 while we were building. We swiftly migrated to gpt-oss-120b and re-tested the invoice parser on real-world inputs.
Payment Confirmation Race Conditions: The browser callback and the webhook can both arrive for the same payment. We made fulfillment idempotent so a payment can never be counted twice.
Securing Paid Features: We had to ensure paid features were tamper-proof. Database column permissions prevent users from upgrading their own plans from the browser. Plans change only after the server verifies a successful payment.
Accomplishments That We're Proud Of Deploying a complete, working business model that includes sign-ups, invoicing, real checkout, verified payments, subscriptions, usage limits, and platform fees—all live.
Building security directly into the database level (RLS) rather than adding it as an afterthought.
Integrating AI that is genuinely useful but cannot break the application, because every output is schema-checked and failed API calls automatically refund the user’s credit.
What We Learned Payment integrations are predominantly about handling the unhappy paths: closed tabs, duplicate events, and signatures that do not match.
Putting a strict schema around LLM output is the fundamental requirement for making AI safe to use in a production environment.
What's Next for Duely Razorpay Route Integration: Enabling split settlements so freelancers are paid out directly while Duely automatically retains its platform fee.
UPI AutoPay: Supporting seamless automated subscriptions.
WhatsApp Reminders: Expanding notification channels beyond email.
Advanced Invoicing: Generating downloadable PDF invoices complete with GSTIN.
Recurring Retainers: Automated billing cycles for ongoing client work.
Team Seats: Multi-user access and collaboration designed for agencies.
Built With
- groq
- nextjs
- postgresql
- razorpay
- react
- supabase
- tailwindcss
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.