RenderInvoiceFree
ExamplesDevelopersChangelogStarOpen app
Developers · AI agents · Integrations

No backend. Yours to self-host.

RenderInvoice runs entirely in your browser. If you need batch PDF generation, deploy the worker to your own Cloudflare account. If you want a spreadsheet workflow, use the Google Sheets script without setting up an external API.

hithismani/render-invoice
Self-hosted render API
Programmatic PDFs

cf-worker/: Cloudflare Worker

A minimal Cloudflare Worker you can deploy to your Cloudflare account. Send a POST /v1/render request with { "invoice": {…} } (or a bare invoice object) to receive PDF or PNG bytes. Two render engines are supported:

  • Satori (default): JavaScript pipeline using Satori, resvg-wasm, and pdf-lib. Takes 50 to 200 ms per invoice (around $0.15 per 1,000 requests) to output a raster PDF.
  • Browser (?engine=browser): Uses Cloudflare Browser Rendering to print the public /print-view page in headless Chromium. Takes 500 to 2000 ms per request to generate a vector PDF with selectable text.
  • • Output formats: ?format=pdf|png (satori). Browser engine is always PDF. No SVG.
  • • Optional JWT authentication (wrangler secret put API_KEY_SECRET).
  • • Workers Paid plan ($5/mo) is only required for ?engine=browser. Satori runs on the free tier.
Deploy to Cloudflare/llms.txt
# 1. One-click (Satori, free tier)
deploy.workers.cloudflare.com/?url=…/tree/main/cf-worker
# or CLI
cd cf-worker && pnpm install
npx wrangler login && npx wrangler deploy
# 2. Call it from anything
curl -X POST \
  https://your.workers.dev/v1/render \
  -H 'Content-Type: application/json' \
  --data-binary @invoice.json \
  --output invoice.pdf
# 3. Optional auth
wrangler secret put API_KEY_SECRET
Spreadsheet auto-fill
No backend

Google Sheets to invoices

A single HYPERLINK formula creates a pre-filled playground URL from a spreadsheet row. Opening the link loads every field into the playground without API calls.

  • • The playground reads invoice JSON directly from the URL hash.
  • • Data stays in your browser and is not sent to RenderInvoice servers.
  • • For advanced setups (such as multi-recipient invoices or dynamic columns), use the prompt below to generate an Apps Script or formula.
AI prompt
I want to turn a Google Sheet into a one-click invoice generator using RenderInvoice (https://renderinvoice.com, a browser-only invoice tool with no backend).

The integration is pure link-building. An Apps Script reads the active row, builds an RenderInvoice invoice JSON object, and constructs a URL like:

  https://renderinvoice.com/playground#j=<encodeURIComponent(JSON.stringify(invoice))>

Opening that URL pre-fills every field in the playground. From there I (or my client) review and download a vector PDF. No API calls, no auth, no Cloudflare Worker, and no Drive integration.

Please:
1. Propose a Google Sheet column layout that matches my business (described below). Keep one row per invoice. Include columns for: From block, Bill To block, invoice meta (number, date, due, project), line items (description / qty / rate / amount up to N rows), summary rows (subtotal, tax, total), and design settings (accentColor hex, design = "classic" or "bold").
2. Write a complete Apps Script (Code.gs) with: buildInvoice(row), shareUrlFor(invoice), openActiveRow() that pops a modal that calls window.open(url), and onOpen() that adds an "RenderInvoice" menu.
3. Make the script defensive about empty cells and stop reading line items at the first blank row.

Before writing code, please READ these reference docs so the JSON shape and URL format are correct:
- Plain-language schema and share-URL spec for AI agents: https://renderinvoice.com/llms.txt
- Developer page (schema reference, examples): https://renderinvoice.com/developers
- Live invoice examples to model after: https://renderinvoice.com/examples

Constraints from the schema:
- Every key used in lineItems[] rows must also appear in columns[].
- summary[].value is a string or number that I compute in the sheet; RenderInvoice never calculates totals, formats currency, or applies tax.
- Pre-fill design ("classic" or "bold") and accentColor (#RRGGBB).

My business: <describe your invoicing, e.g., "UK design freelancer billing hourly + 20% VAT", "SaaS with monthly seats and proration", "agency with retainers and split shipping addresses">.

My existing sheet (if any): <paste a header row, or describe the columns you already have, or leave blank to start from your suggestion>.
# One Sheets formula. Copy down a column.
=HYPERLINK(
  "https://renderinvoice.com/playground#j="
    & ENCODEURL(G2),
  "Open ↗"
)

# G2 holds the JSON for that row,
# built with & concatenation
# from your other columns.
Share-URL protocol

Hand off an invoice with a URL.

Encoding invoice JSON into the URL hash loads the invoice with no server. Point the hash at /playground to edit, or /print-view to print.

#i=  compressed with lz-string compressToEncodedURIComponent for shorter URLs.
https://renderinvoice.com/playground#i=N4IgdghgtgpiBcIAuBLAdkgNCAlgOwCcB7TCAOgA8AHJAVwBsFE...
#j=  standard encodeURIComponent(JSON.stringify(invoice)). Generates longer URLs that can be constructed from shell scripts, Apps Script, or curl.
https://renderinvoice.com/playground#j=%7B%22design%22%3A%22classic%22...
# or skip the editor:
https://renderinvoice.com/print-view#j=…same JSON…
Agent manifest

/llms.txt

Follows the llms.txt convention. Automated agents can read this file to understand the schema and worker configuration.

Read /llms.txt
Schema reference

The invoice contract.

Every field accepted by the JSON editor and render worker. Zod defines the schema in the codebase; this is the rendered documentation view.

design"classic" | "bold"Optionaldefault: "classic"

Visual variant for the rendered invoice. "classic" is the default; "bold" uses an accent header.

fontstringOptional

Google Font family name for the invoice (default Inter). Same face is used in the playground, PDF, and worker.

accentColorstringOptionaldefault: "#2563eb"

Accent color (hex) threaded through headings, totals, and borders.

logoPosition"center" | "left" | "right"Optionaldefault: "center"

Where the logo sits in the header.

direction"ltr" | "rtl"Optionaldefault: "ltr"

Reading direction. Use "rtl" for Arabic, Hebrew, Urdu, Farsi, and other right-to-left scripts.

autoSizebooleanOptionaldefault: true

Whether to automatically fit the content to the page when generating PDF.

filenamestringOptional

The filename to use for the generated PDF.

invoiceHeadingstringOptional

The main heading or title for the invoice (e.g., "Invoice").

invoiceDescriptionstringOptional

A brief description or subtitle for the invoice.

invoiceFromRecord<string, string>

Sender details as dynamic key-value pairs.

invoiceToArray<Record<string, string>>

Recipients as array of dynamic key-value pair objects.

metaTopRecord<string, string>

Metadata displayed before line items.

metaBottomRecord<string, string>Optionaldefault: {}

Metadata displayed after line items.

columnsArray<string>

Column headers for the line items table.

lineItemsArray<Record<string, string | number>>

Line item data aligned with columns.

summaryArray<Object>

Invoice summary items.

labelstring

Label for a summary item.

valuestring | number

Value for the summary item.

logoUrlOptional

Company logo URL or embedded data URL.

logoSizeObjectOptional

Logo dimensions.

widthnumber
heightnumber
digitalSignatureUrlOptional

Digital signature image URL or embedded data URL.

signatureSizeObjectOptional

Signature dimensions.

widthnumber
heightnumber
footerTextObject

Footer text.

topTextstringOptional
bottomTextstringOptional
isCancelledbooleanOptional
cancelledNotesstringOptional
amountsVerifiedHideDisclaimerbooleanOptionaldefault: false

If false, a disclaimer about verifying amounts will be displayed.

showBuiltWithbooleanOptionaldefault: false

If true, shows a small "Built with RenderInvoice" line at the bottom of the invoice.

includeEditLinkbooleanOptional

If true (default), add a full-width footer rule that links back to this invoice in the playground (PDF only).

RenderInvoice

Un-opinionated invoices. Vector PDFs. Zero backend.

Star
Product
  • Playground
  • Examples
  • Changelog
Developers
  • API & Docs
  • llms.txt
  • GitHub
Company
  • About
  • Pricing
  • Issues
© 2026 RenderInvoicegithub.com/hithismani/render-invoice