DocPress

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

FieldTypeRequiredDescription
numberstringyesInvoice number, e.g. INV-2026-014
datestring (YYYY-MM-DD)yesIssue date
due_datestring (YYYY-MM-DD)noPayment due date
currencystringnoISO code, default USD
fromobjectyes{name, address_lines[], email, tax_id} — you, the issuer
toobjectyes{name, address_lines[], email, tax_id} — the client
itemsarrayyes[{description, quantity, unit_price}]
discountnumbernoFlat discount amount subtracted before tax
tax_ratenumbernoPercent, e.g. 20 for 20% VAT
tax_labelstringnoLabel for the tax line, default 'Tax'
notesstringnoFree text under the totals (terms, thank-you)
payment_instructionsstringnoBank details or payment link text
logostring (data:image/... URI)noYour logo, inline as a data URI
accentstring (CSS color)noAccent 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.