Quick Start¶
Get your first PDF invoice in 5 minutes.
1. Get an API Key¶
curl -X POST https://invoicepdfs.com/api/v1/api-keys \
-H "Authorization: Bearer inv_your_initial_key" \
-H "Content-Type: application/json" \
-d '{"name": "production"}'
The response includes your API key — save it securely, it's only shown once:
{
"data": {
"id": "key_01ABC",
"name": "production",
"api_key": "inv_live_abc123...",
"last4": "c123",
"created_at": "2026-07-20T00:00:00Z"
}
}
2. Render Your First Invoice¶
curl -X POST https://invoicepdfs.com/api/v1/documents/render \
-H "Authorization: Bearer inv_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"document_type": "invoice",
"data": {
"invoice_number": "INV-001",
"issue_date": "2026-07-20",
"due_date": "2026-08-19",
"currency": "USD",
"seller": {
"name": "Acme Corp",
"email": "billing@acme.com",
"address": {
"line1": "1 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
}
},
"buyer": {
"name": "Jane Smith",
"email": "jane@example.com"
},
"line_items": [
{
"name": "Consulting",
"quantity": "5",
"unit_price": "200.00",
"unit": "hours"
}
]
},
"template": {"id": "tpl_modern"},
"output": {"format": "pdf", "delivery": "url"}
}'
import requests
resp = requests.post(
"https://invoicepdfs.com/api/v1/documents/render",
headers={"Authorization": "Bearer inv_live_abc123..."},
json={
"document_type": "invoice",
"data": {
"invoice_number": "INV-001",
"issue_date": "2026-07-20",
"currency": "USD",
"seller": {"name": "Acme Corp"},
"buyer": {"name": "Jane Smith"},
"line_items": [
{"name": "Consulting", "quantity": "5", "unit_price": "200.00"}
],
},
"template": {"id": "tpl_modern"},
"output": {"format": "pdf", "delivery": "url"},
},
)
data = resp.json()["data"]
print(f"Download: {data['download_url']}")
print(f"Total: {data['calculation']['total']['amount']} {data['calculation']['total']['currency']}")
3. Download the PDF¶
The response includes a download_url:
{
"data": {
"id": "rnd_01ABC",
"status": "completed",
"document_type": "invoice",
"format": "pdf",
"download_url": "/api/v1/renders/rnd_01ABC/download",
"calculation": {
"subtotal": {"amount": "1000.00", "currency": "USD"},
"discount_total": {"amount": "0.00", "currency": "USD"},
"tax_total": {"amount": "0.00", "currency": "USD"},
"shipping_total": {"amount": "0.00", "currency": "USD"},
"total": {"amount": "1000.00", "currency": "USD"}
},
"expires_at": "2026-07-20T01:00:00Z",
"created_at": "2026-07-20T00:00:00Z"
}
}
Or request the PDF binary directly:
curl -X POST https://invoicepdfs.com/api/v1/documents/render \
-H "Authorization: Bearer inv_live_abc123..." \
-H "Accept: application/pdf" \
-H "Content-Type: application/json" \
-d '{ ... }' \
--output invoice.pdf
Next Steps¶
- Authentication — API key details and security
- Invoice Features — Discounts, taxes, branding, and more
- API Reference — Full endpoint docs