/// GENERATE
1 credit

Invoice PDF API — invoices straight from JSON

Send line items and parties as JSON; get back a finished, correctly-totalled PDF.

/// Quick answer

An invoice PDF API turns structured data — buyer, seller, line items, totals — into a finished PDF in a single HTTP request, with no template to open and no document to lay out. ASHDOCS does it at POST /api/v1/tools/invoice-pdf for one credit, and a free version runs in the browser without an account.

Try Invoice PDF API — free →Read the docsPrefer a UI? Use the free invoice generator →

Free account. No card required.

How does the Invoice PDF API work?

One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.

curl -X POST https://www.ashdocs.com/api/v1/tools/invoice-pdf \
  -H "X-API-Key: ash_live_..." \
  -H "Content-Type: application/json" \
  -d '{"invoice":{"number":"INV-2026-0041","currency":"USD","seller":{"name":"Acme Studio"},"buyer":{"name":"Globex Ltd"},"line_items":[{"description":"Design work","quantity":12,"unit_price":95,"tax_rate":0}]},"options":{"template":"clean","format":"A4"}}'

Common use cases

Frequently asked questions

Does the invoice PDF API calculate sales tax for me?+

No. It applies the rate you supply and computes the totals from it. It does not determine which rate applies to your transaction.

How much does one invoice cost?+

One credit.

Who calculates the totals?+

The server does. The line total, the subtotal, the tax per rate and the grand total are all computed from the quantities, unit prices and tax rates you send — the client cannot override them, and a total supplied in the payload is ignored.

RELATED TOOLS