Invoice PDF API
Overview
The Invoice PDF API generates professional PDF documents — invoices,
receipts, quotes, refunds, and cancellation notices — from structured
JSON data. Send your data as a POST request and receive a
formatted PDF in the response.
Automate document generation in your applications — online shops, billing systems, SaaS platforms, or any workflow that needs consistent, professional documents at scale.
Key Features
- 5 document types: Invoice, Receipt, Quote, Refund (Credit Note), Cancellation
- 3 visual themes: Modern, Classic, Minimal
- 50 languages: Labels, dates, and currency formatting auto-adapted to locale
- Native Shopify support: Send Shopify order data directly — document type is auto-detected
Quick Start
Save the following JSON to a file called invoice.json:
{ "document_type": "invoice", "document_number": "INV-001", "issue_date": "2026-01-15", "currency": "USD", "customer": { "name": "Alice Smith" }, "items": [ {"description": "Consulting Services", "quantity": 5, "unit_price": 150.00} ], "total": 750.00 }
Then run this command to generate the PDF:
curl -X POST "https://api.pdfcrowd.com/templates/business/" \ -u "demo:demo" \ -d @invoice.json \ -o invoice.pdf
Examples below use demo credentials for testing. For production use, start a free trial or purchase a license.
Try It
See it in action — generate a sample invoice PDF in seconds.
HTTP Request
Send a POST request with a JSON body to the conversion endpoint. This section covers the endpoint URL, authentication, and available parameters.
Endpoint
POST https://api.pdfcrowd.com/templates/business/
The request body is JSON. Configuration is passed via query parameters.
| Parameter | Default | Description |
|---|---|---|
app |
pdfcrowd |
Data format. Omit for PDFCrowd native format, or set to shopify for Shopify order data. |
style |
modern |
Visual theme: modern, classic, or minimal. |
page_size |
A4 |
Page size: A4 or Letter. |
orientation |
portrait |
Page orientation: portrait or landscape. |
Visual Styles
| Style | Description |
|---|---|
modern | Clean sans-serif design with blue accents, colored table headers, alternating row colors |
classic | Traditional serif font, double borders, formal document layout |
minimal | Compact, text-focused — no logo, tighter spacing, smaller fonts |
Authentication
On success, returns application/pdf.
On error, returns a plain text error message with the original HTTP status code
from the conversion API (see Error Handling).
JSON Format
The PDFCrowd native format is a clean, nested JSON structure.
It is the default when the app parameter is omitted.
Here is the overall shape of a document:
Tip: Numeric fields accept both JSON numbers and strings
(e.g. "quantity": 3 or "quantity": "3").
Do not include currency symbols or thousand separators.
{
"document_type": "invoice",
"document_number": "INV-2026-001",
"issue_date": "2026-03-15",
"currency": "USD",
"seller": { ... seller details ... },
"customer": { ... customer details ... },
"items": [ ... line items ... ],
"subtotal": 1440.00,
"discount": { ... discount ... },
"shipping": { ... shipping ... },
"tax": { ... tax ... },
"total": 1608.80,
"notes": "...",
"legal_notice": "...",
... document-type-specific fields ...
}
The sections below describe each part in detail.
Required Fields
| Field | Type | Description |
|---|---|---|
document_type | string | invoice, receipt, quote, refund, credit_note, or cancellation |
document_number | string | Document identifier (e.g. "INV-2026-001") |
issue_date | string | Document date (YYYY-MM-DD) |
items | array | Line items (see Line Items) |
total | number | Grand total amount |
currency | string | ISO 4217 currency code (e.g. USD, EUR). Determines currency symbol, number formatting, and document language. Defaults to en_US formatting when omitted. |
Optional Fields
| Field | Type | Description |
|---|---|---|
locale | string | Locale for labels and formatting (e.g. fr_FR, nl_NL). Overrides the locale derived from currency. Useful when multiple countries share a currency (e.g. EUR). |
subtotal | number | Subtotal before adjustments. Hidden when equal to total with no breakdown rows |
seller | object | Seller/company details (see Seller) |
customer | object | Customer details (see Customer) |
discount | object | Discount details (see Discount) |
shipping | object | Shipping details (see Shipping) |
tax | object | Tax details (see Tax) |
notes | string | Free-text notes displayed at the bottom |
legal_notice | string | Legal disclaimer text |
Seller Object
"seller": { "name": "Acme Corp", "email": "billing@acmecorp.com", "phone": "+1 212 555 0199", "website": "https://acmecorp.com", "tax_id": "EIN 12-3456789", "logo_url": "https://acmecorp.com/logo.png", "address": { "address1": "100 Market St", "address2": "Suite 300", "city": "San Francisco", "province": "CA", "zip": "94105", "country": "United States", "country_code": "US" } }
| Field | Type | Description |
|---|---|---|
name | string | Company or shop name |
email | string | Contact email |
phone | string | Contact phone |
website | string | Website URL |
tax_id | string | Tax ID / VAT number |
bank_account | string | Bank account number (invoice only) |
iban | string | IBAN (invoice only) |
bic | string | BIC / SWIFT code (invoice only) |
logo_url | string | URL to company logo |
address | object | Structured address (see Address) |
Customer Object
"customer": { "name": "John Smith", "email": "john@example.com", "phone": "+1 555 0100", "company": "Smith & Co.", "tax_id": "US-TAX-001", "address": { "address1": "123 Main St", "address2": "Suite 4B", "city": "New York", "province": "NY", "zip": "10001", "country": "United States", "country_code": "US" } }
| Field | Type | Description |
|---|---|---|
name | string | Customer full name |
email | string | Customer email |
phone | string | Customer phone |
company | string | Company name |
tax_id | string | Customer tax ID / VAT number |
address | object | Structured address (see Address) |
Address Object
Used within seller, customer, and shipping objects.
The country_code determines postal code placement —
e.g. DE formats as 10117 Berlin while
US formats as New York, NY 10001.
| Field | Type | Description |
|---|---|---|
address1 | string | Street address line 1 |
address2 | string | Address line 2 (suite, unit, etc.) |
city | string | City |
province | string | State / Province |
zip | string | ZIP / Postal code |
country | string | Country name (displayed) |
country_code | string | ISO 3166-1 alpha-2 code (used for formatting, not displayed) |
Line Items
"items": [ {"description": "Web Design", "quantity": 10, "unit_price": 120.00, "sku": "SVC-01"}, {"description": "Hosting", "quantity": 1, "unit_price": 240.00, "tax": 45.60} ]
| Field | Type | Description |
|---|---|---|
description | string | Required. Item name |
quantity | number | Required. Quantity |
unit_price | number | Required. Price per unit |
sku | string | SKU or product code |
tax | number | Tax for this item. Adds a Tax column when present |
total | number | Item total. Auto-computed as quantity × unit_price + tax when omitted |
Discount Object
"discount": { "amount": 100.00, "label": "Loyalty discount 10%" }
| Field | Type | Description |
|---|---|---|
amount | number | Discount amount (displayed with a minus sign) |
label | string | Custom label (defaults to “Discount” in document language) |
Available on: invoice, receipt, quote, cancellation.
Shipping Object
"shipping": { "amount": 15.00, "name": "Express Shipping", "address": { "address1": "456 Oak Ave", "city": "Austin", "province": "TX", "zip": "73301", "country": "United States", "country_code": "US" } }
| Field | Type | Description |
|---|---|---|
amount | number | Shipping cost. Omitted from document when zero |
name | string | Shipping method name |
address | object | Shipping address (see Address) |
Available on: invoice, quote.
Tax Object
"tax": { "amount": 136.40, "label": "Sales Tax", "rate": 8.25, "breakdown": [ {"name": "TX State Tax 6.25%", "rate": 6.25, "amount": 103.44}, {"name": "Austin Local Tax 2%", "rate": 2, "amount": 32.96} ] }
| Field | Type | Description |
|---|---|---|
amount | number | Total tax amount. Omitted from document when zero |
label | string | Custom tax label (defaults to “Tax” in document language) |
rate | number | Tax rate percentage. Shown next to the tax label when no breakdown is present |
breakdown | array | Optional. Itemized tax rows: name, rate, amount. When omitted, a single tax line is shown |
Document Types
Set the document_type field to select the document template.
Each type supports the common fields above plus type-specific fields.
Invoice
Set "document_type": "invoice".
Full invoice with seller and customer details, line items, tax breakdown,
discounts, shipping, bank details, and payment terms.
| Field | Type | Description |
|---|---|---|
due_date | string | Payment due date (YYYY-MM-DD) |
payment_terms | string | Payment terms (e.g. “Net 30”) |
payment_instructions | string | Payment instructions |
purchase_order_number | string | PO number |
fulfillment_status | string | Fulfillment status (auto-translated). Values:
fulfilled, partial, unfulfilled, restocked
|
Receipt
Set "document_type": "receipt".
Payment confirmation with transaction details, line items, and tip.
| Field | Type | Description |
|---|---|---|
payment_method | string | Payment method (auto-translated). Values:
credit_card, debit_card, cash,
bank_deposit, money_order, gift_card,
exchange, manual
|
payment_status | string | Payment status (auto-translated). Values:
paid, pending, authorized,
partially_paid, partially_refunded,
refunded, voided
|
transaction_id | string | Transaction reference |
tip_amount | number | Tip / gratuity amount |
purchase_order_number | string | PO number |
Quote
Set "document_type": "quote".
Quotation with validity date and shipping details.
| Field | Type | Description |
|---|---|---|
valid_until | string | Quote expiration date (YYYY-MM-DD) |
reference_number | string | Reference number |
payment_terms | string | Payment terms |
purchase_order_number | string | PO number |
Refund / Credit Note
Set "document_type": "refund" or "credit_note".
Refund notice with reason and original invoice reference.
| Field | Type | Description |
|---|---|---|
original_invoice | string | Original invoice/order number |
reason | string | Refund reason (free text) |
refund_method | string | Refund method (auto-translated). Values:
credit_card, debit_card, cash,
bank_deposit, money_order, gift_card,
exchange, manual
|
refund_status | string | Refund status (auto-translated). Values:
paid, pending, authorized,
partially_paid, partially_refunded,
refunded, voided
|
Cancellation
Set "document_type": "cancellation".
Order cancellation notice with reason and refund status.
| Field | Type | Description |
|---|---|---|
cancellation_date | string | Cancellation date (YYYY-MM-DD) |
cancellation_reason | string | Cancellation reason (auto-translated). Values:
customer, fraud, inventory,
declined, staff, other
|
refund_status | string | Refund status (auto-translated). Values:
paid, pending, authorized,
partially_paid, partially_refunded,
refunded, voided
|
Complete Example
{ "document_type": "invoice", "document_number": "INV-2026-0042", "issue_date": "2026-03-15", "due_date": "2026-04-15", "currency": "USD", "purchase_order_number": "PO-9981", "payment_terms": "Net 30", "payment_instructions": "Please remit payment via ACH or check.", "notes": "Thank you for your business.", "fulfillment_status": "unfulfilled", "seller": { "name": "Acme Corp", "email": "billing@acmecorp.com", "phone": "+1 212 555 0199", "website": "https://acmecorp.com", "tax_id": "EIN 12-3456789", "logo_url": "https://pdfcrowd.com/static/images/icon2.svg", "address": { "address1": "100 Market St", "address2": "Suite 300", "city": "San Francisco", "province": "CA", "zip": "94105", "country": "United States", "country_code": "US" } }, "customer": { "name": "Jane Cooper", "email": "jane@cooperdesign.com", "phone": "+1 415 555 0100", "company": "Cooper Design LLC", "address": { "address1": "456 Oak Ave", "city": "Austin", "province": "TX", "zip": "73301", "country": "United States", "country_code": "US" } }, "items": [ {"description": "Web Design Services", "quantity": 10, "unit_price": 150.00, "sku": "SVC-WEB-01"}, {"description": "Hosting (annual)", "quantity": 1, "unit_price": 240.00} ], "subtotal": 1740.00, "discount": {"amount": 100.00, "label": "Loyalty discount"}, "shipping": {"amount": 15.00, "name": "Express Shipping"}, "tax": { "amount": 136.40, "label": "Sales Tax", "breakdown": [ {"name": "TX State Tax 6.25%", "rate": 6.25, "amount": 103.44}, {"name": "Austin Local Tax 2%", "rate": 2, "amount": 32.96} ] }, "total": 1791.40 }
Shopify Integration
Send Shopify order data directly with ?app=shopify.
Both REST API and GraphQL formats are supported.
The appropriate document type (invoice, receipt, quote, refund, or
cancellation) is selected automatically based on the order data.
Example
curl -X POST "https://api.pdfcrowd.com/templates/business/?app=shopify" \ -u "demo:demo" \ -H "Content-Type: application/json" \ -d @shopify_order.json \ -o receipt.pdf
Shopify orders don't include seller details — pass your company
information via query parameters such as
seller_name, seller_email, logo_url, etc.
The document language and formatting are automatically detected from the customer's locale or the order currency. Status values (e.g. paid, fulfilled) are translated to the document language.
Localization
The currency field determines the currency symbol, number formatting,
date formatting, and document language (labels, status translations).
Supported Currencies
The following currencies have full locale support with automatic language detection, labels, and date formatting. Any valid ISO 4217 currency code can be used.
| Currency | Name |
|---|---|
USD | US Dollar |
EUR | Euro |
GBP | British Pound |
CAD | Canadian Dollar |
AUD | Australian Dollar |
JPY | Japanese Yen |
CNY | Chinese Yuan |
KRW | South Korean Won |
INR | Indian Rupee |
BRL | Brazilian Real |
MXN | Mexican Peso |
CZK | Czech Koruna |
PLN | Polish Zloty |
SEK | Swedish Krona |
NOK | Norwegian Krone |
DKK | Danish Krone |
CHF | Swiss Franc |
RUB | Russian Ruble |
TRY | Turkish Lira |
THB | Thai Baht |
HUF | Hungarian Forint |
RON | Romanian Leu |
BGN | Bulgarian Lev |
HRK | Croatian Kuna |
ILS | Israeli Shekel |
SAR | Saudi Riyal |
IDR | Indonesian Rupiah |
MYR | Malaysian Ringgit |
VND | Vietnamese Dong |
TWD | Taiwan Dollar |
ZAR | South African Rand |
UAH | Ukrainian Hryvnia |
BDT | Bangladeshi Taka |
PKR | Pakistani Rupee |
Supported Languages
Labels, status translations, and formatting are available in 50 languages: Afrikaans, Arabic, Bengali, Bulgarian, Catalan, Chinese (Simplified), Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Gujarati, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Kannada, Korean, Latvian, Lithuanian, Malay, Malayalam, Maltese, Marathi, Norwegian, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swedish, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Vietnamese.
Error Handling
400- Invalid JSON, missing required fields, or unknown document type.
405- Method not allowed. Only
POSTrequests are accepted. 401- Invalid username or API key.
403- License expired, disabled, or no credits remaining.
429- Rate limit exceeded. Wait and retry.
430- Too many concurrent requests. Wait for current conversions to complete or upgrade your plan.
500- Internal server error.
AI Integration
Have your data in a custom JSON format? Ask an AI assistant to write the integration for you. Copy the prompt below, replace the placeholders, and paste it into ChatGPT, Claude, or any other AI coding assistant.
Write a Python script that: 1. Reads my JSON data file [DESCRIBE YOUR FILE OR PASTE A SAMPLE] 2. Transforms it to the PDFCrowd PDF Templates format (see https://pdfcrowd.com/invoice-pdf-api/) 3. Sends it to the API endpoint and saves the PDF to a local file