Templates › Invoice
Invoice template
A clean, itemised invoice with your details, the client's details, line items, optional discount and tax, totals and payment instructions. Totals are computed on the server from quantity × unit price.
Preview the sample PDF Get a free API key
Fields
| Field | Type | Required | Description |
|---|---|---|---|
number | string | yes | Invoice number, e.g. INV-2026-014 |
date | string (YYYY-MM-DD) | yes | Issue date |
due_date | string (YYYY-MM-DD) | no | Payment due date |
currency | string | no | ISO code, default USD |
from | object | yes | {name, address_lines[], email, tax_id} — you, the issuer |
to | object | yes | {name, address_lines[], email, tax_id} — the client |
items | array | yes | [{description, quantity, unit_price}] |
discount | number | no | Flat discount amount subtracted before tax |
tax_rate | number | no | Percent, e.g. 20 for 20% VAT |
tax_label | string | no | Label for the tax line, default 'Tax' |
notes | string | no | Free text under the totals (terms, thank-you) |
payment_instructions | string | no | Bank details or payment link text |
logo | string (data:image/... URI) | no | Your logo, inline as a data URI |
accent | string (CSS color) | no | Accent colour for headings, default #0b5c6b |
Sample request
POST https://docpress.dev/v1/pdf
Authorization: Bearer dp_your_key
Content-Type: application/json
{
"template": "invoice",
"data": {
"number": "INV-2026-014",
"date": "2026-10-18",
"due_date": "2026-11-17",
"currency": "USD",
"from": {
"name": "Northwind Studio LLC",
"address_lines": [
"120 Market Street, Suite 4",
"Portland, OR 97201"
],
"email": "billing@example.com",
"tax_id": "EIN 12-3456789"
},
"to": {
"name": "Acme Robotics Inc.",
"address_lines": [
"500 Industrial Way",
"Austin, TX 78701"
],
"email": "ap@example.org"
},
"items": [
{
"description": "Brand identity design \u2014 logo, colour system, typography",
"quantity": 1,
"unit_price": 3200
},
{
"description": "Website design (6 page templates)",
"quantity": 6,
"unit_price": 450
},
{
"description": "Design review meetings",
"quantity": 3,
"unit_price": 150
}
],
"discount": 200,
"tax_rate": 8.25,
"tax_label": "Sales tax",
"notes": "Thank you for your business. Payment is due within 30 days.",
"payment_instructions": "Bank transfer: First Example Bank \u00b7 Routing 000000000 \u00b7 Account 123456789 \u00b7 Reference INV-2026-014"
}
}
Add "page_size": "Letter" next to template to change the paper size. Output on the free plan carries a small footer mark. See the API docs for authentication and errors.