NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Invoice Generator API

POST

Create downloadable PDF invoices with line items and taxes.

Invoice Generator is an invoice generation API that creates downloadable PDF invoices from party addresses, line items, and payment terms. It computes subtotals with discounts and sales tax, returning an expiring download link.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/invoicegenerator
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Start from a template — a working app you can deploy in a minute

About the Invoice Generator API

Send billing addresses, an invoice number, and line items with item quantities and unit prices. The endpoint applies discounts, calculates sales tax against the adjusted subtotal, fetches remote logos up to 2 MB, and labels amounts with the currency code you pass, using that currency's decimal places and digit grouping (for example 1,250.00 EUR or 375,000 JPY). Addresses work worldwide: state and postcode are optional, and each party can carry a country and a VAT, GST or tax ID. It returns a temporary download URL and a Unix expiration timestamp.

What people use it for

Order Fulfillment Billing
When an order clears checkout, generate a branded PDF receipt with itemized charges and local sales tax to email buyers.
Monthly Subscription Receipts
SaaS platforms turn recurring subscription renewals into downloadable invoice documents displaying custom payment terms and client billing addresses.
Contractor Payout Invoicing
To process contractor payouts, convert milestone task descriptions and hourly rates into signed PDF invoices before issuing bank transfers.
Automated Accounts Receivable
Accounting tools construct standardized PDF billing files complete with discounts and custom company logos directly from scheduled batch jobs.

Worked example: Invoice two line items with a discount and sales tax

A design studio bills a client for two pages of design work and ten support hours, takes 100.00 off, and adds Texas sales tax.

Request
curl -X POST https://api.apiverve.com/v1/invoicegenerator \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "invoiceNumber": "INV-1042",
    "date": "2026-11-15",
    "dueDate": "2026-12-15",
    "paymentTerms": "Net 30",
    "from_name": "Northwind Studio", "from_street": "12 Harbor Way",
    "from_city": "Austin", "from_state": "TX", "from_zip": "78701",
    "to_name": "Contoso Ltd", "to_street": "400 Market St",
    "to_city": "Denver", "to_state": "CO", "to_zip": "80202",
    "items": [
      { "qty": 2, "description": "Landing page design", "unit_price": 1200 },
      { "qty": 10, "description": "Support hours", "unit_price": 85 }
    ],
    "discount": 100,
    "salesTax": 8.25
  }'
Response
{
  "status": "ok",
  "error": null,
  "data": {
    "pdfName": "35591ca3-fed1-4a2d-9795-a6edd09c7a53.pdf",
    "expires": 1794910305945,
    "downloadURL": "https://storage.googleapis.com/apiverve/APIData/invoicegenerator/35591ca3-….pdf?…"
  }
}

The PDF shows a subtotal of 3,250.00, the 100.00 discount, 259.88 sales tax (8.25% of the discounted 3,150.00) and a total of 3,409.88.

The response carries only the file. Download it before expires, a millisecond timestamp 48 hours after the call, and keep your own copy.

Edge cases and limits

Discount is an amount
discount is a flat amount in the invoice currency, not a percentage, and it comes off the subtotal before tax. It isn't capped, so keep it below the subtotal.
Sales tax is a rate
salesTax is a percentage: 8.25 means 8.25%, applied to the subtotal after the discount.
No float drift
Line totals and sums are worked in whole cents, so floating-point errors like 0.1 + 0.2 never reach the PDF.
Logo
logoURL must be a public http(s) image of up to 2 MB, fetched with a 5-second timeout. If it can't be loaded, a placeholder is used and the invoice still renders.

Compared with the alternatives

Render your own HTML to PDF
Full control over the layout, but you maintain the template, the arithmetic and a headless browser. If you need a custom design, render it yourself with the HTML to PDF API.
Invoicing platforms
Stripe Invoicing or QuickBooks also send the invoice, take payment and chase late payers. This API only produces the document, for apps that already handle billing themselves.

Without writing code

Free invoice generator on DigestYourFinances makes an invoice in the browser.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Invoice Generator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Invoice Generator API.

Read the docs →
Which plan fits 5,000 invoices a month?
Starter easily covers 5,000 invoices. At 20 credits per invoice, 5,000 calls use 100,000 credits, which is half of Starter's monthly allowance. That works out to about $0.003 per invoice, or $3.00 per 1,000 invoices. If you want to test the workflow first, the Free plan provides 10 invoice generations each month.
Which currencies does Invoice Generator support?
Pass any ISO 4217 currency code (the reference lists 172). Amounts are shown with that currency's decimal places and digit grouping, followed by the code, for example 1,250.00 EUR or 375,000 JPY. Codes that are not ISO currencies, such as crypto or metals, are shown to 2 decimal places. Without a currency, amounts print as plain 2-decimal numbers.
Can I invoice customers outside the US?
Yes. State and postal code are optional and accept any format, so UK, EU, Australian and other addresses print naturally (for example London, SW1A 2AA). Add from_country and to_country for a country line, from_taxId and to_taxId for a VAT, GST or ABN line, and taxLabel to rename the Sales Tax row (for example VAT or GST).
Can I include discounts, sales tax, and custom payment terms?
Yes. You can supply an itemized list of charges with individual quantities, descriptions, and unit prices, along with discount values and percentage-based sales tax. The request also accepts payment terms, job descriptions, issue dates, due dates, and sender and recipient address blocks.
How does the API return the generated invoice?
The API returns a JSON payload containing the unique filename of the generated document, an expiration timestamp, and a temporary download URL. You can use that URL to fetch the completed PDF file directly into your application.
How long does the invoice download link remain active?
The generated download URL is temporary. Each response returns a Unix timestamp indicating when the download link expires and the document is deleted, so your system should download and persist the PDF file promptly.

Ready to build with Invoice Generator? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs