filealloy

Invoice PDF API for EU SaaS

From invoice data to a durable PDF—without running a browser.

Render branded HTML invoices, convert the result to PDF/A when your workflow needs an archive copy, and return an email-ready attachment. Inputs and outputs are processed in memory, then discarded.

EU-hosted · deterministic rendering · no retained files

NorthstarINVOICE
INV-1042
Issued 22 Sep 2026
Acme SAS
Paris, France
DescriptionAmount
Platform subscription
October 2026
€1,250.00
Total due€1,250.00
Generated with a deterministic HTML-to-PDF workflow

One focused workflow

Keep the document path simple.

Use the parts you need. The API does not turn this into a vague “AI document” pipeline.

  1. 01

    Build your invoice HTML

    Keep your existing template, customer data, tax logic, and branding in your application.

  2. 02

    Render a PDF

    Send HTML to POST /v1/html-to-pdf and receive PDF bytes in the response.

  3. 03

    Archive when required

    Send that PDF to POST /v1/pdf-to-pdfa to create a PDF/A-2b archive copy.

  4. 04

    Deliver or store it yourself

    Attach the returned file to email or save it in your own storage and retention system.

Node.js integration

Generate a branded invoice in one request.

The render request uses only your HTML and returns a PDF. No Chromium runtime or PDF drawing library in your app.

import { writeFile } from "node:fs/promises";

const invoice = {
  number: "INV-1042",
  customer: "Acme SAS",
  total: "€1,250.00",
};

const html = `<!doctype html>
<html><head><meta charset="utf-8" />
<style>
  body { font: 14px Arial, sans-serif; color: #17171a; padding: 44px; }
  h1 { margin: 0 0 8px; font-size: 24px; }
  table { width: 100%; border-collapse: collapse; margin-top: 28px; }
  th, td { text-align: left; padding: 10px 0; border-bottom: 1px solid #e7e8ec; }
  .total { text-align: right; font-size: 18px; font-weight: 700; margin-top: 22px; }
</style></head><body>
  <h1>Invoice ${invoice.number}</h1>
  <p>Billed to: ${invoice.customer}</p>
  <table><tr><th>Description</th><th>Amount</th></tr>
    <tr><td>Monthly platform subscription</td><td>€1,250.00</td></tr></table>
  <p class="total">Total: ${invoice.total}</p>
</body></html>`;

const response = await fetch("https://api.filealloy.com/v1/html-to-pdf", {
  method: "POST",
  headers: { "X-API-Key": process.env.FILEALLOY_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({ html }),
});
if (!response.ok) throw new Error(`Invoice render failed: ${response.status}`);

await writeFile("invoice.pdf", Buffer.from(await response.arrayBuffer()));
Need an archive copy?Convert the returned PDF in a second request. This keeps the archival step explicit and testable.
const form = new FormData();
form.append("file", new Blob([await Bun.file("invoice.pdf").arrayBuffer()], {
  type: "application/pdf",
}), "invoice.pdf");

const archive = await fetch("https://api.filealloy.com/v1/pdf-to-pdfa", {
  method: "POST",
  headers: { "X-API-Key": process.env.FILEALLOY_API_KEY },
  body: form,
});
if (!archive.ok) throw new Error(`PDF/A conversion failed: ${archive.status}`);

await Bun.write("invoice-archive.pdf", await archive.arrayBuffer());

Privacy boundary

Files are not a training set.

Invoice HTML and generated PDFs are processed in memory for the request. FileAlloy does not retain the document after the response.

Operational fit

Measure your own template.

Rendering time depends on your HTML, fonts, images, and region. Use the included example as a baseline, then record p50 and p95 latency in your own environment before defining an SLA.

Owned workflow

Your invoice system stays yours.

Keep data, accounting logic, delivery, retention, and audit controls in your application. FileAlloy is the deterministic document-processing step.

Start with one workflow

Build invoice PDFs your customers can rely on.

Start with the free tier, test your template, then scale when the workflow proves itself.

Create an API key