210 × 297 mm
Invoices
Freelancer invoice
A friendly A4 invoice for freelancers, easy to edit visually: a wordmark heading, bill-to and project details, service lines, VAT totals, bank details with a pay-by-link QR code, a personal thank-you note and page numbers. Embeds ZUGFeRD / Factur-X EN 16931 XML.
Opens Dynamic Document API with this template preloaded in a free workspace.
Template language features
- Loops
- Conditionals
- Currency formatting
- Date formatting
- Number formatting
- QR code
- Header & footer
- Page numbers
- Repeating table headers
- columns
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 6 top-level fields, 65 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| invoice | object | |
| invoice.number | string | "TR-2026-031" |
| invoice.issue_date | date | "2026-09-14" |
| invoice.due_date | date | "2026-10-14" |
| invoice.currency | string | "GBP" |
| invoice.order_reference | string | "PO-2291" |
| invoice.payment_terms | string | "Net 30 days" |
| invoice.invoice_period | object | |
| invoice.invoice_period.start | date | "2026-08-17" |
| invoice.invoice_period.end | date | "2026-09-11" |
| invoice.delivery | object | |
| invoice.delivery.date | date | "2026-09-11" |
| invoice.seller | object | |
| invoice.seller.name | string | "Tamsin Rook" |
| invoice.seller.vat_id | string | "GB246813579" |
| invoice.seller.electronic_address | object | |
| invoice.seller.electronic_address.id | string | "hello@tamsinrook.example.com" |
| invoice.seller.electronic_address.scheme | string | "EM" |
| invoice.seller.address | object | |
| invoice.seller.address.line1 | string | "Flat 3, 18 Wickham Rise" |
| invoice.seller.address.city | string | "Brighton" |
| invoice.seller.address.postcode | string | "BN1 4QX" |
| invoice.seller.address.country | string | "GB" |
| invoice.seller.contact | object | |
| invoice.seller.contact.name | string | "Tamsin Rook" |
| invoice.seller.contact.phone | string | "+44 20 7946 0418" |
| invoice.seller.contact.email | string | "hello@tamsinrook.example.com" |
| invoice.buyer | object | |
| invoice.buyer.name | string | "Pebblestone Homeware Ltd" |
| invoice.buyer.vat_id | string | "GB864209753" |
| invoice.buyer.electronic_address | object | |
| invoice.buyer.electronic_address.id | string | "accounts@pebblestone.example.com" |
| invoice.buyer.electronic_address.scheme | string | "EM" |
| invoice.buyer.address | object | |
| invoice.buyer.address.line1 | string | "Unit 7, Ropewalk Yard" |
| invoice.buyer.address.line2 | string | "12 Chandler's Lane" |
| invoice.buyer.address.city | string | "Bristol" |
| invoice.buyer.address.postcode | string | "BS2 0QT" |
| invoice.buyer.address.country | string | "GB" |
| invoice.buyer.contact | object | |
| invoice.buyer.contact.name | string | "Ollie Marchbank" |
| invoice.payment | object | |
| invoice.payment.means_code | string | "30" |
| invoice.payment.remittance_information | string | "TR-2026-031" |
| invoice.payment.credit_transfers | array<object> · 1 | |
| invoice.payment.credit_transfers[].account_id | string | "GB00EXMP40221812345678" |
| invoice.payment.credit_transfers[].account_name | string | "Tamsin Rook" |
| invoice.payment.credit_transfers[].bic | string | "EXMPGB2L" |
| invoice.lines | array<object> · 5 | |
| invoice.lines[].quantity | string | "1" |
| invoice.lines[].unit | string | "LS" |
| invoice.lines[].net_amount | string | "1200.00" |
| invoice.lines[].price | object | |
| invoice.lines[].price.net | string | "1200.00" |
| invoice.lines[].tax | object | |
| invoice.lines[].tax.category | string | "S" |
| invoice.lines[].tax.rate | string | "20" |
| invoice.lines[].item | object | |
| invoice.lines[].item.name | string | "Brand voice guide" |
| invoice.lines[].item.description | string | "Flat fee · a 12-page guide to your tone, vocab…" |
| tagline | string | "Copywriting & brand voice" |
| website | string | "tamsinrook.example.com" |
| bank_name | string | "Harbourline Bank" |
| payment_link | string | "https://pay.example.com/tamsinrook/TR-2026-031" |
| thank_you_note | string | "Thank you, Ollie! It was a joy to find the wor…" |
Sample data
Fictional records used for previews. Replace them with your own data when you call the API.
{
"invoice": {
"number": "TR-2026-031",
"issue_date": "2026-09-14",
"due_date": "2026-10-14",
"currency": "GBP",
"order_reference": "PO-2291",
"payment_terms": "Net 30 days",
"invoice_period": {
"start": "2026-08-17",
"end": "2026-09-11"
},
"delivery": {
"date": "2026-09-11"
},
"seller": {
"name": "Tamsin Rook",
"vat_id": "GB246813579",
"electronic_address": {
"id": "hello@tamsinrook.example.com",
"scheme": "EM"
},
"address": {
"line1": "Flat 3, 18 Wickham Rise",
"city": "Brighton",
"postcode": "BN1 4QX",
"country": "GB"
},
"contact": {
"name": "Tamsin Rook",
"phone": "+44 20 7946 0418",
"email": "hello@tamsinrook.example.com"
}
},
"buyer": {
"name": "Pebblestone Homeware Ltd",
"vat_id": "GB864209753",
"electronic_address": {
"id": "accounts@pebblestone.example.com",
"scheme": "EM"
},
"address": {
"line1": "Unit 7, Ropewalk Yard",
"line2": "12 Chandler's Lane",
"city": "Bristol",
"postcode": "BS2 0QT",
"country": "GB"
},
"contact": {
"name": "Ollie Marchbank"
}
},
"payment": {
"means_code": "30",
"remittance_information": "TR-2026-031",
"credit_transfers": [
{
"account_id": "GB00EXMP40221812345678",
"account_name": "Tamsin Rook",
"bic": "EXMPGB2L"
}
]
},
"lines": [
{
"quantity": "1",
"unit": "LS",
"net_amount": "1200.00",
"price": {
"net": "1200.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Brand voice guide",
"description": "Flat fee · a 12-page guide to your tone, vocabulary and style"
}
},
{
"quantity": "3",
"unit": "DAY",
"net_amount": "1260.00",
"price": {
"net": "420.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Website copy",
"description": "Day rate · Home, About, Shop, Care, FAQ and Contact pages"
}
},
{
"quantity": "4800",
"unit": "D68",
"net_amount": "720.00",
"price": {
"net": "0.15"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Product descriptions",
"description": "Per word · 40 products for the autumn range"
}
},
{
"quantity": "1",
"unit": "LS",
"net_amount": "450.00",
"price": {
"net": "450.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Launch email sequence",
"description": "Flat fee · three welcome emails with two subject lines each"
}
},
{
"quantity": "3.5",
"unit": "HUR",
"net_amount": "192.50",
"price": {
"net": "55.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Revisions and calls",
"description": "Hourly · an extra review round and two calls with your team"
}
}
]
},
"tagline": "Copywriting & brand voice",
"website": "tamsinrook.example.com",
"bank_name": "Harbourline Bank",
"payment_link": "https://pay.example.com/tamsinrook/TR-2026-031",
"thank_you_note": "Thank you, Ollie! It was a joy to find the words for the autumn range. If anything needs a small tweak before launch day, just drop me a line: little fixes are always on me."
}Source
The body markup with Jinja, the stylesheet placed in <head> and the header and footer settings.
<div class="masthead">
<div class="brand">
<img class="logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAwFBMVEXgZU/+/v4AAADjd2TwtqvmhnX21tDiY03pl4j66OTzw7r0y8TfZE7oZk3fZE7fZE7spJfgZE754d3fY07icl3gZE3fZE7gZE7gZE7uraHgZE7fZE32V0/fYEj/QED/AADfZ0//gADoj4D/ZjMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABJIcDVAAAAMHRSTlP+/wD/////LP////+KE+2t/9X/SP9PzbCS/2xrCBIEASEC/wUAAAAAAAAAAAAAAAB/EQyHAAAHPUlEQVR42u2d62KiMBCFh6AGNYCIXARr7fb933Gh2qqVq4Zkkun5v2czX5OZSUhaYK+Ix0UWRVEQBKBc1X9a/ddZEfOXQoBn/+GpyCNAokgUJ6UA/ARP8D8Q8sRXAuAtxhf8dSbE/sQAuEAb/TcDPh0AnqdggNL8NAkAnoMxyrl0ADwDo5RxqQBMC38EgiEAfAPD/0LgywGQgLFKJADwQzBYof8igI8SDFfx/gqAQwbGKzs8D4BHYIEi/iyAIgA7VDwF4DMEaxR+jgdwiMAiRYexALhV8XckghYAHKwTHwMgCewDECTDAcRgpZKhABIAOgSAxPrvyANAKf4mAg8AfJvjh8jvA3BMrQYA6WcPAAGWS3QDSMB6JV0AfCAgvx3Ae0YBQPbeCkAACYk2AByIiLcAiK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.</span></h1>
<p class="tagline">{{ tagline }}</p>
</div>
</div>
<div class="doc-info">
<p class="label">Invoice</p>
<p class="doc-number">{{ invoice.number }}</p>
<p><span class="muted">Due</span> <strong>{{ invoice.due_date | format_date("long", "en-GB") }}</strong></p>
</div>
</div>
<div class="parties">
<div>
<h2 class="label">Bill to</h2>
<p><strong>{{ invoice.buyer.name }}</strong></p>
{% if invoice.buyer.contact.name %}<p>Attn. {{ invoice.buyer.contact.name }}</p>{% endif %}
<p>{{ invoice.buyer.address.line1 }}</p>
{% if invoice.buyer.address.line2 %}<p>{{ invoice.buyer.address.line2 }}</p>{% endif %}
<p>{{ invoice.buyer.address.city }} {{ invoice.buyer.address.postcode }}</p>
</div>
<div>
<h2 class="label">From</h2>
<p><strong>{{ invoice.seller.name }}</strong></p>
<p>{{ invoice.seller.address.line1 }}</p>
<p>{{ invoice.seller.address.city }} {{ invoice.seller.address.postcode }}</p>
<p class="muted">VAT {{ invoice.seller.vat_id }}</p>
</div>
<div>
<h2 class="label">Details</h2>
<table class="facts">
<tbody>
<tr><th scope="row">Issued</th><td>{{ invoice.issue_date | format_date("long", "en-GB") }}</td></tr>
{% if invoice.order_reference %}<tr><th scope="row">Your PO</th><td>{{ invoice.order_reference }}</td></tr>{% endif %}
{% if invoice.invoice_period %}<tr><th scope="row">Period</th><td>{{ invoice.invoice_period.start | format_date("d MMM", "en-GB") }} – {{ invoice.invoice_period.end | format_date("d MMM y", "en-GB") }}</td></tr>{% endif %}
<tr><th scope="row">Terms</th><td>{{ invoice.payment_terms }}</td></tr>
</tbody>
</table>
</div>
</div>
<table class="items">
<thead>
<tr>
<th scope="col">Service</th>
<th class="qty" scope="col">Qty</th>
<th class="price" scope="col">Rate</th>
<th class="amount" scope="col">Amount</th>
</tr>
</thead>
<tbody>
{% for line in invoice.lines %}
<tr>
<td>
<p class="item-name">{{ line.item.name }}</p>
{% if line.item.description %}<p class="item-note">{{ line.item.description }}</p>{% endif %}
</td>
<td class="qty">{{ line.quantity | format_number("en-GB") }}</td>
<td class="price">{{ line.price.net | format_currency(invoice.currency, "en-GB") }}</td>
<td class="amount">{{ render.invoice.lines[loop.index0].net_amount | format_currency(invoice.currency, "en-GB") }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="closing">
<div>
<h2>Thank you!</h2>
<p>{{ thank_you_note }}</p>
<p class="muted">— <em>{{ invoice.seller.contact.name }}</em></p>
</div>
<table class="totals">
<tbody>
<tr><th scope="row">Subtotal</th><td>{{ render.invoice.totals.line_total | format_currency(invoice.currency, "en-GB") }}</td></tr>
{% for vat in render.invoice.vat_breakdown %}
<tr><th scope="row">VAT {{ vat.rate | format_number("en-GB") }}%</th><td>{{ vat.tax | format_currency(invoice.currency, "en-GB") }}</td></tr>
{% endfor %}
<tr class="total-due"><th scope="row">Total due</th><td>{{ render.invoice.totals.due_payable | format_currency(invoice.currency, "en-GB") }}</td></tr>
</tbody>
</table>
</div>
<div class="payment">
<div>
<h2>Pay by bank transfer</h2>
<table class="facts">
<tbody>
<tr><th scope="row">Account name</th><td>{{ invoice.payment.credit_transfers[0].account_name }}</td></tr>
{% if bank_name %}<tr><th scope="row">Bank</th><td>{{ bank_name }}</td></tr>{% endif %}
<tr><th scope="row">IBAN</th><td><strong>{{ invoice.payment.credit_transfers[0].account_id }}</strong></td></tr>
<tr><th scope="row">BIC</th><td>{{ invoice.payment.credit_transfers[0].bic }}</td></tr>
<tr><th scope="row">Reference</th><td><strong>{{ invoice.payment.remittance_information }}</strong></td></tr>
</tbody>
</table>
</div>
{% if payment_link %}
<div class="pay-link">
<p class="qr">{{ payment_link | qrcode(size="25mm", color="#1b1c24", background="#fdf0eb", alt="QR code to pay by card online") }}</p>
<p>Or scan to pay by card</p>
</div>
{% endif %}
</div><title>Invoice {{ invoice.number }} – {{ invoice.seller.name }}</title>
<style>
* { box-sizing: border-box; }
body {
margin: 0;
font-family: "Inter", "Liberation Sans", Arial, sans-serif;
font-size: 9.5pt;
line-height: 1.5;
color: #23252e;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
h1, h2, h3 {
margin: 0;
font-family: "Poppins", "Liberation Sans", Arial, sans-serif;
font-weight: 700;
line-height: 1.25;
color: #1b1c24;
}
p { margin: 0; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: 0; text-align: left; vertical-align: top; }
.muted { color: #7b7f8c; }
.accent { color: #e0654f; }
/* Name, tagline and invoice number */
.masthead { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 7mm; }
.brand { display: flex; gap: 4.5mm; }
.logo { width: 15mm; height: 15mm; }
.brand h1 { margin-bottom: 0.5mm; font-size: 26pt; letter-spacing: -0.01em; }
.tagline { font-size: 10.5pt; color: #c2503b; }
.doc-info { text-align: right; }
.label {
margin: 1.2mm 0 1.6mm;
font-family: "Poppins", "Liberation Sans", Arial, sans-serif;
font-size: 7.5pt;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #c2503b;
}
.doc-number { margin-bottom: 0.5mm; font-family: "Poppins", "Liberation Sans", Arial, sans-serif; font-size: 14pt; font-weight: 700; color: #1b1c24; }
/* Bill to, from and details */
.parties {
display: grid;
grid-template-columns: 1fr 1fr 1.2fr;
gap: 7mm;
margin-bottom: 6mm;
padding: 4.5mm;
border: 0.75pt solid #eee4df;
border-radius: 3mm;
}
.parties .label { margin-top: 0; }
.facts td, .facts th { padding-bottom: 0.3em; }
.facts th { width: 19mm; padding-right: 1.2em; color: #7b7f8c; white-space: nowrap; font-weight: inherit; }
/* Service lines */
.items { margin-bottom: 5mm; table-layout: fixed; }
.items thead { display: table-header-group; }
.items th {
padding: 2.2mm;
border-bottom: 1pt solid #1b1c24;
font-size: 0.85em;
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
color: #7b7f8c;
}
.items td { padding: 2.2mm; border-bottom: 0.75pt solid #eee4df; }
.items tr { break-inside: avoid; }
.items .qty { width: 10.7%; text-align: right; }
.items .price { width: 15.2%; text-align: right; }
.items .amount { width: 16%; text-align: right; font-weight: 700; }
.items th.amount { font-weight: 600; }
.item-name { margin-bottom: 0.6mm; font-weight: 700; color: #1b1c24; }
.item-note { font-size: 8.5pt; color: #7b7f8c; }
/* Thank-you note and totals */
.closing { display: grid; grid-template-columns: 1.05fr 1fr; align-items: start; gap: 12mm; margin-bottom: 6mm; break-inside: avoid; }
.closing h2 { margin: 1mm 0 1.5mm; font-size: 13.7pt; color: #c2503b; }
.closing p { margin-bottom: 4pt; }
.totals td, .totals th { padding: 1.9mm; color: #7b7f8c; }
.totals th { font-weight: inherit; }
.totals th + td { text-align: right; color: #23252e; }
.totals .total-due td, .totals .total-due th { vertical-align: middle; background: #fdf0eb; font-size: 10.5pt; font-weight: 700; color: #1b1c24; }
.totals .total-due th + td { font-family: "Poppins", "Liberation Sans", Arial, sans-serif; font-size: 13pt; color: #c2503b; }
/* Bank details and pay-by-link code */
.payment {
display: grid;
grid-template-columns: 2.6fr 1fr;
gap: 8mm;
padding: 5mm;
border-radius: 3mm;
background: #fdf0eb;
break-inside: avoid;
}
.payment h2 { margin-bottom: 2mm; font-size: 11.4pt; }
.payment .facts th { width: 31mm; }
.pay-link { text-align: center; }
.pay-link .qr { margin-bottom: 1.5mm; line-height: 0; }
.pay-link p { font-size: 7.5pt; color: #7b7f8c; }
</style>Render it with the API
After adding the template to your workspace, render it by ID and pass your data. Arrays are shortened here.
curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
-H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"invoice": {
"number": "TR-2026-031",
"issue_date": "2026-09-14",
"due_date": "2026-10-14",
"currency": "GBP",
"order_reference": "PO-2291",
"payment_terms": "Net 30 days",
"invoice_period": {
"start": "2026-08-17",
"end": "2026-09-11"
},
"delivery": {
"date": "2026-09-11"
},
"seller": {
"name": "Tamsin Rook",
"vat_id": "GB246813579",
"electronic_address": {
"id": "hello@tamsinrook.example.com",
"scheme": "EM"
},
"address": {
"line1": "Flat 3, 18 Wickham Rise",
"city": "Brighton",
"postcode": "BN1 4QX",
"country": "GB"
},
"contact": {
"name": "Tamsin Rook",
"phone": "+44 20 7946 0418",
"email": "hello@tamsinrook.example.com"
}
},
"buyer": {
"name": "Pebblestone Homeware Ltd",
"vat_id": "GB864209753",
"electronic_address": {
"id": "accounts@pebblestone.example.com",
"scheme": "EM"
},
"address": {
"line1": "Unit 7, Ropewalk Yard",
"line2": "12 Chandler'\''s Lane",
"city": "Bristol",
"postcode": "BS2 0QT",
"country": "GB"
},
"contact": {
"name": "Ollie Marchbank"
}
},
"payment": {
"means_code": "30",
"remittance_information": "TR-2026-031",
"credit_transfers": [
{
"account_id": "GB00EXMP40221812345678",
"account_name": "Tamsin Rook",
"bic": "EXMPGB2L"
}
]
},
"lines": [
{
"quantity": "1",
"unit": "LS",
"net_amount": "1200.00",
"price": {
"net": "1200.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Brand voice guide",
"description": "Flat fee · a 12-page guide to your tone, vocabulary and style"
}
},
{
"quantity": "3",
"unit": "DAY",
"net_amount": "1260.00",
"price": {
"net": "420.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Website copy",
"description": "Day rate · Home, About, Shop, Care, FAQ and Contact pages"
}
}
]
},
"tagline": "Copywriting & brand voice",
"website": "tamsinrook.example.com",
"bank_name": "Harbourline Bank",
"payment_link": "https://pay.example.com/tamsinrook/TR-2026-031",
"thank_you_note": "Thank you, Ollie! It was a joy to find the words for the autumn range. If anything needs a small tweak before launch day, just drop me a line: little fixes are always on me."
},
"output": {
"format": "pdf",
"filename": "invoice-freelancer.pdf"
}
}'const response = await fetch("https://api-eu.dynamicdocumentapi.com/v1/renders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DYNAMIC_DOCUMENT_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
},
"data": {
"invoice": {
"number": "TR-2026-031",
"issue_date": "2026-09-14",
"due_date": "2026-10-14",
"currency": "GBP",
"order_reference": "PO-2291",
"payment_terms": "Net 30 days",
"invoice_period": {
"start": "2026-08-17",
"end": "2026-09-11"
},
"delivery": {
"date": "2026-09-11"
},
"seller": {
"name": "Tamsin Rook",
"vat_id": "GB246813579",
"electronic_address": {
"id": "hello@tamsinrook.example.com",
"scheme": "EM"
},
"address": {
"line1": "Flat 3, 18 Wickham Rise",
"city": "Brighton",
"postcode": "BN1 4QX",
"country": "GB"
},
"contact": {
"name": "Tamsin Rook",
"phone": "+44 20 7946 0418",
"email": "hello@tamsinrook.example.com"
}
},
"buyer": {
"name": "Pebblestone Homeware Ltd",
"vat_id": "GB864209753",
"electronic_address": {
"id": "accounts@pebblestone.example.com",
"scheme": "EM"
},
"address": {
"line1": "Unit 7, Ropewalk Yard",
"line2": "12 Chandler's Lane",
"city": "Bristol",
"postcode": "BS2 0QT",
"country": "GB"
},
"contact": {
"name": "Ollie Marchbank"
}
},
"payment": {
"means_code": "30",
"remittance_information": "TR-2026-031",
"credit_transfers": [
{
"account_id": "GB00EXMP40221812345678",
"account_name": "Tamsin Rook",
"bic": "EXMPGB2L"
}
]
},
"lines": [
{
"quantity": "1",
"unit": "LS",
"net_amount": "1200.00",
"price": {
"net": "1200.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Brand voice guide",
"description": "Flat fee · a 12-page guide to your tone, vocabulary and style"
}
},
{
"quantity": "3",
"unit": "DAY",
"net_amount": "1260.00",
"price": {
"net": "420.00"
},
"tax": {
"category": "S",
"rate": "20"
},
"item": {
"name": "Website copy",
"description": "Day rate · Home, About, Shop, Care, FAQ and Contact pages"
}
}
]
},
"tagline": "Copywriting & brand voice",
"website": "tamsinrook.example.com",
"bank_name": "Harbourline Bank",
"payment_link": "https://pay.example.com/tamsinrook/TR-2026-031",
"thank_you_note": "Thank you, Ollie! It was a joy to find the words for the autumn range. If anything needs a small tweak before launch day, just drop me a line: little fixes are always on me."
},
"output": {
"format": "pdf",
"filename": "invoice-freelancer.pdf"
}
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const result = await response.json();
console.log(result);import os
import uuid
import requests
response = requests.post(
"https://api-eu.dynamicdocumentapi.com/v1/renders",
headers={
"Authorization": f"Bearer {os.environ['DYNAMIC_DOCUMENT_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"input": {
"type": "template",
"template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C",
},
"data": {
"invoice": {
"number": "TR-2026-031",
"issue_date": "2026-09-14",
"due_date": "2026-10-14",
"currency": "GBP",
"order_reference": "PO-2291",
"payment_terms": "Net 30 days",
"invoice_period": {
"start": "2026-08-17",
"end": "2026-09-11",
},
"delivery": {
"date": "2026-09-11",
},
"seller": {
"name": "Tamsin Rook",
"vat_id": "GB246813579",
"electronic_address": {
"id": "hello@tamsinrook.example.com",
"scheme": "EM",
},
"address": {
"line1": "Flat 3, 18 Wickham Rise",
"city": "Brighton",
"postcode": "BN1 4QX",
"country": "GB",
},
"contact": {
"name": "Tamsin Rook",
"phone": "+44 20 7946 0418",
"email": "hello@tamsinrook.example.com",
},
},
"buyer": {
"name": "Pebblestone Homeware Ltd",
"vat_id": "GB864209753",
"electronic_address": {
"id": "accounts@pebblestone.example.com",
"scheme": "EM",
},
"address": {
"line1": "Unit 7, Ropewalk Yard",
"line2": "12 Chandler's Lane",
"city": "Bristol",
"postcode": "BS2 0QT",
"country": "GB",
},
"contact": {
"name": "Ollie Marchbank",
},
},
"payment": {
"means_code": "30",
"remittance_information": "TR-2026-031",
"credit_transfers": [
{
"account_id": "GB00EXMP40221812345678",
"account_name": "Tamsin Rook",
"bic": "EXMPGB2L",
},
],
},
"lines": [
{
"quantity": "1",
"unit": "LS",
"net_amount": "1200.00",
"price": {
"net": "1200.00",
},
"tax": {
"category": "S",
"rate": "20",
},
"item": {
"name": "Brand voice guide",
"description": "Flat fee · a 12-page guide to your tone, vocabulary and style",
},
},
{
"quantity": "3",
"unit": "DAY",
"net_amount": "1260.00",
"price": {
"net": "420.00",
},
"tax": {
"category": "S",
"rate": "20",
},
"item": {
"name": "Website copy",
"description": "Day rate · Home, About, Shop, Care, FAQ and Contact pages",
},
},
],
},
"tagline": "Copywriting & brand voice",
"website": "tamsinrook.example.com",
"bank_name": "Harbourline Bank",
"payment_link": "https://pay.example.com/tamsinrook/TR-2026-031",
"thank_you_note": "Thank you, Ollie! It was a joy to find the words for the autumn range. If anything needs a small tweak before launch day, just drop me a line: little fixes are always on me.",
},
"output": {
"format": "pdf",
"filename": "invoice-freelancer.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())More invoices templates
- 210 × 297 mm
Bold brand invoice
A4A confident, colourful A4 invoice for studios and product companies: a brand-coloured hero with the amount due, brand colours you set from data, itemised EN 16931 lines, VAT, a pay-by-link QR code and the same data embedded as ZUGFeRD / Factur-X EN 16931 XML.
- 210 × 297 mm
E-Rechnung (ZUGFeRD / XRechnung)
A4A German A4 invoice rendered straight from the EN 16931 invoice model, so the same data produces the visible invoice and the embedded Factur-X / ZUGFeRD or XRechnung XML (output.einvoice.invoice_path = "invoice"). It prints the engine's computed amounts, lists VAT per rate, the Leitweg-ID and the bank details.
- 210 × 297 mm
EU reverse-charge invoice
A4An A4 invoice for cross-border B2B services within the EU, rendered from the EN 16931 invoice model: both VAT IDs, the date of supply, VAT category AE (reverse charge) with its exemption reason and notice, the total in words, bank transfer details and the same data embedded as ZUGFeRD / Factur-X EN 16931 XML.