Generating a clean, professional PDF invoice in code is one of those tasks that looks trivial until you start. You reach for a PDF library, then fight with layout, fonts, multi-currency formatting, VAT/tax math, and right-to-left languages. An hour later you have a brittle template and you still have to maintain it.

This guide shows a shortcut: turn one JSON payload into a finished invoice — PDF, JSON totals, or UBL XML — with a single HTTP POST, using the free Invovate API. No PDF library, no template engine.

Try it with zero setup (no API key)

Anonymous calls can compute invoice totals — handy for validating tax and discount math before you render anything:

curl -X POST https://invovate.com/api/generate-invoice \ -H "Content-Type: application/json" \ -d '{ "output": "json", "from": { "name": "Acme Inc" }, "to": { "name": "Globex LLC" }, "items": [ { "description": "Consulting", "quantity": 10, "unit_price": 150, "tax_rate": 20 } ] }'

You get back the calculated subtotal, total_tax, and grand_total as JSON. No account needed.

Get a free key (for PDF / UBL / shareable links)

Rendering an actual PDF (or UBL, or a shareable hosted link) needs a free API key:

  1. Create a free account at invovate.com and verify your email.
  2. Copy your key from the dashboard — it starts with inv_.
  3. Pass it as a bearer token: Authorization: Bearer inv_yourkey.
Free tier: 40 requests/hour, 400/week — enough to build and run a low-volume integration. Paid plans start at $9/mo when you need more.

Render a PDF (cURL)

curl -X POST https://invovate.com/api/generate-invoice \ -H "Authorization: Bearer inv_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "output": "pdf", "template": "navy", "invoice": { "number": "INV-2026-001", "currency": "EUR", "language": "fr" }, "from": { "name": "Acme Inc" }, "to": { "name": "Globex LLC", "address": "1 Rue de Rivoli, Paris" }, "items": [ { "description": "Consulting", "quantity": 10, "unit_price": 150, "tax_rate": 20 } ] }' --output invoice.pdf

That's a French-language, EUR, VAT-20% invoice on the navy template — written straight to invoice.pdf.

Node.js

import { writeFileSync } from "node:fs"; const res = await fetch("https://invovate.com/api/generate-invoice", { method: "POST", headers: { "Authorization": `Bearer ${process.env.INVOVATE_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ output: "pdf", invoice: { number: "INV-2026-001", currency: "USD", language: "en" }, from: { name: "Acme Inc" }, to: { name: "Globex LLC" }, items: [{ description: "Website design", quantity: 1, unit_price: 1500, tax_rate: 10 }], }), }); writeFileSync("invoice.pdf", Buffer.from(await res.arrayBuffer()));

Prefer a wrapper? There's an SDK: npm i invovate.

Python

import requests resp = requests.post( "https://invovate.com/api/generate-invoice", headers={ "Authorization": f"Bearer {INVOVATE_API_KEY}", # Set a User-Agent — the CDN in front of the API rejects the # default bare client UA. "User-Agent": "my-app/1.0", }, json={ "output": "pdf", "invoice": {"number": "INV-2026-001", "currency": "USD"}, "from": {"name": "Acme Inc"}, "to": {"name": "Globex LLC"}, "items": [{"description": "Website design", "quantity": 1, "unit_price": 1500, "tax_rate": 10}], }, ) open("invoice.pdf", "wb").write(resp.content)

There's a Python SDK too: pip install invovate.

Languages, currencies, and tax

Set invoice.language (11 supported, including ar, ja, hi, and ru with proper fonts and RTL) and invoice.currency (20+, with correct symbol and decimal handling). Per-line tax_rate and discount are supported, plus invoice-level global_tax, global_discount, and amount_paid for partial payments. The math comes back identical whether you request json or pdf.

Shareable link + QR code

Add features to get a hosted, shareable invoice URL (and optionally a scan-to-view QR):

{ "output": "json", "features": { "hosted_link": true, "qr": true }, "invoice": { "currency": "USD" }, "from": { "name": "Acme Inc" }, "to": { "name": "Globex LLC" }, "items": [{ "description": "Retainer", "quantity": 1, "unit_price": 800 }] }

The response includes a hosted_url you can email to a client — no login required on their end.

UBL for e-invoicing

Need a machine-readable invoice? Request "output": "ubl" to get a UBL 2.1 XML document instead of a PDF — a useful starting point for structured invoice exchange. (Invovate produces the document; it does not submit to national e-invoicing networks.)

For AI agents

If you're building with LLMs, there's an MCP server (npx invovate-mcp) that exposes invoice generation as tools to Claude Desktop, Cursor, and Windsurf — so an assistant can create a real invoice from a natural-language request.

Start building with the Invoice API

Free tier: 40 calls/hour, no credit card. Get your API key in about 60 seconds.

Get your API key

Further reading