Invoice Generator
Free · No Auth · No Rate Limit

Invoice API

Generate professional HTML invoices programmatically. Send a JSON payload, get back a print-ready HTML invoice — or a JSON envelope with calculated totals.

POST https://tulz.org/api/invoice

No API Key

Completely open

No Rate Limit

Use freely

CORS enabled

Call from browser

Free forever

Zero cost

Quick Start

javascript
const payload = {
  "invoiceNumber": "INV-042",
  "issueDate": "2026-04-07",
  "dueDate": "2026-05-07",
  "currency": "USD",
  "accentColor": "#7c3aed",
  "from": {
    "name": "Acme Corp",
    "address": "123 Main St\nSan Francisco, CA 94102",
    "email": "billing@acme.com",
    "website": "acme.com"
  },
  "to": {
    "name": "Client Inc.",
    "address": "456 Oak Ave\nNew York, NY 10001",
    "email": "accounts@client.com"
  },
  "items": [
    {
      "description": "Website Development",
      "quantity": 1,
      "rate": 2500
    },
    {
      "description": "Monthly Maintenance",
      "quantity": 3,
      "rate": 200
    },
    {
      "description": "Logo Design",
      "quantity": 1,
      "rate": 400
    }
  ],
  "taxRate": 8.5,
  "discount": 5,
  "notes": "Payment due within 30 days. Thank you for your business!"
};

const res = await fetch("https://tulz.org/api/invoice", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(payload),
});

// Save as HTML file
const html = await res.text();
console.log(html);

// Or get totals + HTML in JSON
const json = await fetch(
  "https://tulz.org/api/invoice?format=json",
  { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }
).then(r => r.json());
console.log(json.total, json.formatted.total);

Request

POST /api/invoice — Content-Type: application/json

Response

Default (HTML)

Returns the invoice as a fully self-contained HTML page. Print it, convert to PDF with Puppeteer, or embed in an iframe.

?format=json

Returns a JSON envelope with calculated totals + the full HTML:

json
{
  "invoiceNumber": "INV-042",
  "currency": "USD",
  "subtotal": 3500.00,
  "discount": 175.00,
  "tax": 281.19,
  "total": 3606.19,
  "formatted": {
    "subtotal": "$3,500.00",
    "discount": "$175.00",
    "tax": "$281.19",
    "total": "$3,606.19"
  },
  "html": "<!DOCTYPE html>..."
}
json
// Errors return HTTP 422
{ "error": "'from.name' is required." }
{ "error": "items[0].quantity must be a positive number." }

Try it live

Calls the real API

OpenAPI / Swagger schema

Machine-readable spec for code generation, Postman, or Swagger UI.

GET /api/invoice →