business template

Invoice Image Generator API

Render full invoices as PNG images for emails, dashboards, and exports

Invoice Image template preview, a business image generated by the html2img API

Use cases for the Invoice Image Generator API

The Invoice Image template is the shortest path to a working invoice image generator api from your stack. Send a small JSON payload, get back a tested PNG that fits your brand. No browser, no headless Chrome wrangling, no design tooling on your side.

Common reasons people reach for this template:

  • Attaching invoices to confirmation emails
  • Embedding invoices in customer dashboards
  • Generating invoice previews for accounting tools

How it works

1

Send a JSON payload

POST to the template endpoint with the values you want rendered. Authenticate with your API key.

2

We render the image

The template is rendered server-side as a 1200x630 PNG (or whatever dimensions the template defines).

3

You get back a URL

The response includes a CDN URL for the PNG. Cache it, embed it, attach it to a tweet, anything you need.

Quick example

A single cURL call to render a Invoice Image as a PNG:

curl -X POST https://app.html2img.com/api/v1/templates/invoice-image \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"invoice_number":"INV-2026-0042","issue_date":"Apr 30, 2026","due_date":"May 30, 2026","business_name":"Northwind Studio Ltd","business_address":"12 Bishopsgate\nLondon EC2N 4AT\nUnited Kingdom","business_email":"[email protected]","client_name":"Acme Corp","client_address":"548 Market Street\nSan Francisco, CA 94104\nUSA","client_email":"[email protected]","items":[{"description":"Brand identity design","quantity":"1","unit_price":"$4,800.00","amount":"$4,800.00"},{"description":"Landing page build (8 sections)","quantity":"1","unit_price":"$3,200.00","amount":"$3,200.00"},{"description":"Photography retainer","quantity":"6","unit_price":"$420.00","amount":"$2,520.00"}],"subtotal":"$10,520.00","tax_label":"VAT (20%)","tax_amount":"$2,104.00","total":"$12,624.00","notes":"Payment due within 30 days. Wire transfer details on file.","accent_color":"#0F766E"}'

For the full PHP, Node and Python equivalents, plus every input the template accepts, see the Invoice Image API reference. Setting up your key is covered in the authentication guide.

Inputs at a glance

A quick summary of what the Invoice Image template accepts. The full reference, including example values and array shapes, is in the docs.

Name Type Required
invoice_number string Required
issue_date string Optional
due_date string Optional
business_name string Required
business_address string Optional
business_email string Optional
client_name string Required
client_address string Optional
client_email string Optional
items array Required
subtotal string Optional
tax_label string Optional
tax_amount string Optional
total string Required
notes string Optional
logo_url url Optional
accent_color string Optional

See the full inputs reference for descriptions, examples and validation rules.

Related templates

Ready to render your first Invoice Image?

Sign up free, grab an API key, send a payload. The pricing page covers the higher-volume plans if you outgrow the free tier.