Invoice generator API
Send JSON, get back a finished invoice PDF. You don't need an HTML template or a headless browser. Totals, tax, discounts and currency formatting are handled for you.
Example
curl https://pdfloom.dev/v1/invoice \
-H "Authorization: Bearer $PDFLOOM_KEY" \
-H "Content-Type: application/json" \
-o invoice.pdf \
-d '{
"number": "INV-2026-0042",
"currency": "USD",
"date": "2026-10-18",
"due": "2026-11-01",
"from": "Acme Studio LLC\n500 Market St\nSan Francisco, CA",
"to": "Globex Corp\nAccounts Payable\nbilling@globex.com",
"items": [
{
"desc": "Website redesign",
"qty": 1,
"price": 4800
},
{
"desc": "Hosting (monthly)",
"qty": 12,
"price": 25
}
],
"tax": 8.5,
"discount": 200,
"notes": "Pay by bank transfer within 14 days.\nIBAN: US00 0000 0000 0000",
"accentColor": "#4f46e5"
}'
That request produces this PDF.
Fields
| Name | Type | Description |
|---|---|---|
items | array, required | Line items: [{"desc": "…", "qty": 2, "price": 49.5}]. Up to 500. |
docType | string | invoice (default), receipt, quote, estimate or proforma. Changes the title and labels. |
number | string | Document number, such as INV-0042. |
currency | string | ISO code: USD, EUR, GBP, CAD, AUD, SEK, NOK, DKK, CHF, JPY, INR, BRL, MXN, ZAR, NZD, SGD or PLN. |
date / due | string | Issue date and due date (or "valid until" / "paid on"), formatted YYYY-MM-DD. |
from / to | string | Seller and buyer blocks. Use \n for line breaks. |
tax | number | Tax rate in percent, applied after the discount. |
discount / shipping | number | Absolute amounts. |
notes | string | Payment terms, bank details, thank-you note. |
logo | string | An https:// image URL or a base64 data:image/… URI. |
accentColor | string | Hex color for the title and the total line, such as #4f46e5. |
Each call counts as one PDF against your plan, the same as /v1/pdf. Need full control over the design? Render your own HTML template with POST /v1/pdf.
Why use an invoice API?
- No PDF library fights. Low-level PDF libraries make you position every line by hand. Here you send data and get a laid-out document back.
- Works from any stack. One HTTPS call from Node, Python, PHP, Ruby, Go, or a no-code tool like Zapier or Make.
- Nothing stored. Invoices are rendered in memory and never saved on our servers.
Prefer a form? Use the free online invoice generator.