INVOICE API

Generate invoices
with one request.

A stateless invoice API. Send transaction data and get a PDF, HTML invoice or calculated JSON back. No database required.

POST/api/v1/invoices

Create an invoice

Invoicr validates your transaction, calculates totals and renders the result immediately.

Request body

JSON
{
  "merchant": {
    "name": "Northstar Studio",
    "address": "San Francisco, CA"
  },
  "invoiceNumber": "INV-1001",
  "date": "2026-09-20",
  "currency": "USD",
  "language": "fr",
  "items": [
    {
      "name": "Design services",
      "quantity": 1,
      "unitPrice": 250
    }
  ],
  "tax": { "rate": 8.5 },
  "payment": {
    "method": "Card"
  },
  "note": "Thank you for your business!"
}

Set language to en (default) or fr to translate invoice labels. Unsupported values fall back to English.

Response formats

PDF?format=pdf

A4 printable invoice.

HTML?format=html

Ready-to-display markup.

JSON?format=json

Validated data + totals.

cURL

cURL
curl -X POST "https://try-invoicr.vercel.app/api/v1/invoices?format=pdf" \
  -H "Content-Type: application/json" \
  -d '{   "merchant": {     "name": "Northstar Studio",     "address": "San Francisco, CA"   },   "invoiceNumber": "INV-1001",   "date": "2026-09-20",   "currency": "USD",   "language": "fr",   "items": [     {       "name": "Design services",       "quantity": 1,       "unitPrice": 250     }   ],   "tax": { "rate": 8.5 },   "payment": {     "method": "Card"   },   "note": "Thank you for your business!" }' \
  --output invoice.pdf

JavaScript

JavaScript
const response = await fetch(
  "https://try-invoicr.vercel.app/api/v1/invoices?format=pdf",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(invoice)
  }
);
const pdf = await response.blob();

Python

Python
import requests

r = requests.post(
    "https://try-invoicr.vercel.app/api/v1/invoices?format=pdf",
    json=invoice
)
open("invoice.pdf", "wb").write(r.content)