Inspiration
Every app I've built eventually needs invoices. A SaaS charges a customer—needs an invoice. A freelancer tool tracks payments—needs an invoice. An e-commerce platform processes an order—needs an invoice.
More than once, I'd find myself deep in PDF libraries, fighting with fonts, calculating tax, formatting currencies. It's the same problem over and over.
I wanted invoicing to be as simple as any other API call in my workflow. fetch() some data, get a result. That's it. Hence the name: FetchInvoices.
What it does
FetchInvoices is an API endpoint for generating professional invoice PDFs. You POST JSON with your invoice data, you GET back a PDF URL in ~500ms.
curl -X POST https://api.fetchinvoices.com/api/v1/invoices \ -H "Authorization: Bearer inv_your_key" \ -d '{"to":{"name":"Acme Corp"},"items":[{"description":"Pro Plan","quantity":1,"unitPrice":99}]}'
Response: {"id":"inv_abc123","pdfUrl":"https://...","total":99}
It handles everything: three professional templates, multi-currency formatting (USD, EUR, GBP, 10+ more), tax calculations, discounts, custom logos, and optional email delivery. All from a single endpoint.
How I built it
- Next.js 14 with App Router for the API and dashboard
- React-PDF for server-side PDF generation
- Prisma + PostgreSQL (Supabase) for data storage
- Stripe for subscription billing
- AWS SES for email delivery
- Supabase Storage for logo management
- Vercel for deployment with separate domains:
- api.fetchinvoices.com for the API
- www.fetchinvoices.com for the dashboard
The entire API is stateless. You can call it from a cron job, a webhook handler, a serverless function—anywhere you can make an HTTP request.
Challenges I ran into
Email deliverability. Started with three different email providers before landing on AWS SES. Getting out of sandbox mode and setting up proper DKIM/SPF took longer than expected.
Accomplishments that I'm proud of
- End-to-end in one call. From JSON to PDF URL in a single request. No multi-step process, no polling.
- Developer experience. The API is obvious. No SDK required. If you can write a fetch() call, you can generate invoices.
- Production-ready billing. Full Stripe integration with upgrades, downgrades, and subscription management. Not just a demo.
- Three templates that actually look good. Modern, Classic, and Minimal. All professionally designed, all work out of the box.
What I learned
Keep the API surface small. One endpoint that does one thing well beats ten endpoints that do ten things poorly. Developers don't want to learn your API—they want to solve their problem and move on.
Emails are harder than they look. Between deliverability, formatting across clients, and authentication (SPF, DKIM, DMARC), email is its own infrastructure challenge.
Pricing matters early. Building the billing integration alongside the product forced me to think about value from day one. What's worth paying for? What should be free?
What's next for Fetch Invoices
- More templates — Industry-specific designs (legal, consulting, freelance)
- Recurring invoices — Schedule automatic generation on a billing cycle
- Webhooks — Notify your app when invoices are viewed or paid
- Localization — Invoice copy in multiple languages
- White-label — Remove FetchInvoices branding entirely for enterprise customers
The goal is to be the invoicing primitive for automated workflows. If your code needs to generate an invoice, FetchInvoices should be the obvious choice.
Built With
- amazon-ses
- next.js
- supabase
- vercel

Log in or sign up for Devpost to join the conversation.