
210 × 297 mm
Payslips
Monthly payslip
An A4 monthly payslip with employer and employee details, earnings and deductions tables with this-period and year-to-date columns, employer contributions, a net pay panel with the amount in words, payment details and annual leave. Sample figures are illustrative.
PDFA4 portraitLocale en-GBHTML + Jinja
Opens Dynamic Document API with this template preloaded in a free workspace.
Template language features
- Loops
- Conditionals
- Macros
- Filters
- Currency formatting
- Number formatting
- Date formatting
Filters such as format_currency and qrcode are described in the template language reference.
Variables
Derived from the sample data: 9 top-level fields, 44 paths in total. Send the same shape as data.
| Path | Type | Example |
|---|---|---|
| employer | object | |
| employer.name | string | "Fennick & Rowe Instruments Ltd" |
| employer.address | string | "Unit 2, Heathfield Science Park ⏎ Cambridge CB…" |
| employer.paye_reference | string | "123/AB45678" |
| employer.payroll_email | string | "payroll@fennickrowe.example.com" |
| employee | object | |
| employee.name | string | "Saoirse Pembridge" |
| employee.employee_number | string | "E-00417" |
| employee.job_title | string | "Senior Test Engineer" |
| employee.department | string | "Test Engineering" |
| employee.ni_number | string | "QQ 12 34 56 C" |
| employee.tax_code | string | "1257L" |
| employee.ni_category | string | "A" |
| employee.start_date | date | "2021-04-12" |
| period | object | |
| period.label | string | "September 2026" |
| period.tax_year | string | "2026/27" |
| period.tax_period | number | 6 |
| period.frequency | string | "Monthly" |
| period.pay_date | date | "2026-09-25" |
| period.currency | string | "GBP" |
| earnings | array<object> · 4 | |
| earnings[].description | string | "Basic salary" |
| earnings[].detail | string | "£46,800.00 a year" |
| earnings[].amount | number | 3900 |
| earnings[].ytd | number | 23400 |
| deductions | array<object> · 5 | |
| deductions[].description | string | "Income tax" |
| deductions[].detail | string | "Tax code 1257L" |
| deductions[].amount | number | 604.46 |
| deductions[].ytd | number | 3654.88 |
| employer_contributions | array<object> · 2 | |
| employer_contributions[].description | string | "Employer National Insurance" |
| employer_contributions[].detail | string | "Paid on your earnings" |
| employer_contributions[].amount | number | 580.1 |
| employer_contributions[].ytd | number | 3502.8 |
| payment | object | |
| payment.method | string | "Bank transfer" |
| payment.account_hint | string | "account ending 4821" |
| leave | object | |
| leave.entitlement_days | number | 27 |
| leave.taken_days | number | 12.5 |
| leave.remaining_days | number | 14.5 |
| message | string | "The pension scheme's annual statements are now…" |
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": {
"employer": {
"name": "Fennick & Rowe Instruments Ltd",
"address": "Unit 2, Heathfield Science Park\nCambridge CB4 0XX\nUnited Kingdom",
"paye_reference": "123/AB45678",
"payroll_email": "payroll@fennickrowe.example.com"
},
"employee": {
"name": "Saoirse Pembridge",
"employee_number": "E-00417",
"job_title": "Senior Test Engineer",
"department": "Test Engineering",
"ni_number": "QQ 12 34 56 C",
"tax_code": "1257L",
"ni_category": "A",
"start_date": "2021-04-12"
},
"period": {
"label": "September 2026",
"tax_year": "2026/27",
"tax_period": 6,
"frequency": "Monthly",
"pay_date": "2026-09-25",
"currency": "GBP"
},
"earnings": [
{
"description": "Basic salary",
"detail": "£46,800.00 a year",
"amount": 3900,
"ytd": 23400
},
{
"description": "Overtime at time and a half",
"detail": "6.5 hours × £36.00",
"amount": 234,
"ytd": 1152
}
],
"deductions": [
{
"description": "Income tax",
"detail": "Tax code 1257L",
"amount": 604.46,
"ytd": 3654.88
},
{
"description": "National Insurance",
"detail": "Category A",
"amount": 258.88,
"ytd": 1565.12
}
],
"employer_contributions": [
{
"description": "Employer National Insurance",
"detail": "Paid on your earnings",
"amount": 580.1,
"ytd": 3502.8
},
{
"description": "Employer pension contribution",
"detail": "8% of gross pay",
"amount": 342.72,
"ytd": 2068.16
}
],
"payment": {
"method": "Bank transfer",
"account_hint": "account ending 4821"
},
"leave": {
"entitlement_days": 27,
"taken_days": 12.5,
"remaining_days": 14.5
},
"message": "The pension scheme'\''s annual statements are now available in the employee portal. Contact payroll by 5 October if any details on this payslip look wrong."
},
"output": {
"format": "pdf",
"filename": "payslip-monthly.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": {
"employer": {
"name": "Fennick & Rowe Instruments Ltd",
"address": "Unit 2, Heathfield Science Park\nCambridge CB4 0XX\nUnited Kingdom",
"paye_reference": "123/AB45678",
"payroll_email": "payroll@fennickrowe.example.com"
},
"employee": {
"name": "Saoirse Pembridge",
"employee_number": "E-00417",
"job_title": "Senior Test Engineer",
"department": "Test Engineering",
"ni_number": "QQ 12 34 56 C",
"tax_code": "1257L",
"ni_category": "A",
"start_date": "2021-04-12"
},
"period": {
"label": "September 2026",
"tax_year": "2026/27",
"tax_period": 6,
"frequency": "Monthly",
"pay_date": "2026-09-25",
"currency": "GBP"
},
"earnings": [
{
"description": "Basic salary",
"detail": "£46,800.00 a year",
"amount": 3900,
"ytd": 23400
},
{
"description": "Overtime at time and a half",
"detail": "6.5 hours × £36.00",
"amount": 234,
"ytd": 1152
}
],
"deductions": [
{
"description": "Income tax",
"detail": "Tax code 1257L",
"amount": 604.46,
"ytd": 3654.88
},
{
"description": "National Insurance",
"detail": "Category A",
"amount": 258.88,
"ytd": 1565.12
}
],
"employer_contributions": [
{
"description": "Employer National Insurance",
"detail": "Paid on your earnings",
"amount": 580.1,
"ytd": 3502.8
},
{
"description": "Employer pension contribution",
"detail": "8% of gross pay",
"amount": 342.72,
"ytd": 2068.16
}
],
"payment": {
"method": "Bank transfer",
"account_hint": "account ending 4821"
},
"leave": {
"entitlement_days": 27,
"taken_days": 12.5,
"remaining_days": 14.5
},
"message": "The pension scheme's annual statements are now available in the employee portal. Contact payroll by 5 October if any details on this payslip look wrong."
},
"output": {
"format": "pdf",
"filename": "payslip-monthly.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": {
"employer": {
"name": "Fennick & Rowe Instruments Ltd",
"address": "Unit 2, Heathfield Science Park\nCambridge CB4 0XX\nUnited Kingdom",
"paye_reference": "123/AB45678",
"payroll_email": "payroll@fennickrowe.example.com",
},
"employee": {
"name": "Saoirse Pembridge",
"employee_number": "E-00417",
"job_title": "Senior Test Engineer",
"department": "Test Engineering",
"ni_number": "QQ 12 34 56 C",
"tax_code": "1257L",
"ni_category": "A",
"start_date": "2021-04-12",
},
"period": {
"label": "September 2026",
"tax_year": "2026/27",
"tax_period": 6,
"frequency": "Monthly",
"pay_date": "2026-09-25",
"currency": "GBP",
},
"earnings": [
{
"description": "Basic salary",
"detail": "£46,800.00 a year",
"amount": 3900,
"ytd": 23400,
},
{
"description": "Overtime at time and a half",
"detail": "6.5 hours × £36.00",
"amount": 234,
"ytd": 1152,
},
],
"deductions": [
{
"description": "Income tax",
"detail": "Tax code 1257L",
"amount": 604.46,
"ytd": 3654.88,
},
{
"description": "National Insurance",
"detail": "Category A",
"amount": 258.88,
"ytd": 1565.12,
},
],
"employer_contributions": [
{
"description": "Employer National Insurance",
"detail": "Paid on your earnings",
"amount": 580.1,
"ytd": 3502.8,
},
{
"description": "Employer pension contribution",
"detail": "8% of gross pay",
"amount": 342.72,
"ytd": 2068.16,
},
],
"payment": {
"method": "Bank transfer",
"account_hint": "account ending 4821",
},
"leave": {
"entitlement_days": 27,
"taken_days": 12.5,
"remaining_days": 14.5,
},
"message": "The pension scheme's annual statements are now available in the employee portal. Contact payroll by 5 October if any details on this payslip look wrong.",
},
"output": {
"format": "pdf",
"filename": "payslip-monthly.pdf",
},
},
timeout=90,
)
response.raise_for_status()
print(response.json())