Payslip template

A payslip with employee number, department, name, pay date and pay period, three blocks for attendance, earnings and deductions, net pay, bank transfer details and year-to-date totals. Each block takes an array, so you can use your own allowances and deductions.

  • A4 portrait
  • 34 merge fields
  • Issued as PDF
  • Company names, people, addresses and amounts in the sample are fictional.
  • The sample layout is in Japanese. You can change any text in the template editor.
Sample of the payslip template (first page of a PDF issued with DocRelay)

Use cases

  • Bulk payslip issuance from payroll systems
  • Distributing PDF payslips through an employee portal
  • Bonus statements and payslips for hourly staff

Merge fields

The data fields you send to the API. Fields inside an array are shown as array.field.

FieldDescription
issued_atIssue date (YYYY-MM-DD)
pay_monthPay month (e.g. 2026年10月)
employee.numberEmployee number
employee.departmentDepartment
employee.nameEmployee name
paid_atPay date (YYYY-MM-DD)
period.startPay period start (YYYY-MM-DD)
period.endPay period end (YYYY-MM-DD)
company.nameCompany name
company.addressCompany address
company.departmentDepartment in charge
company.telPhone number
attendanceAttendance rows (array, up to 13)
attendance.nameAttendance item
attendance.valueDays or hours (e.g. 20 日, 12:30)
work_hours_totalTotal working hours
earningsEarnings rows (array, up to 13)
earnings.nameEarnings item
earnings.amountAmount
gross_payGross pay
deductionsDeduction rows (array, up to 13)
deductions.nameDeduction item
deductions.amountAmount
total_deductionsTotal deductions
bank.nameBank name
bank.branchBranch
bank.typeAccount type
bank.numberAccount number (masked recommended)
bank.amountAmount transferred
net_payNet pay
ytd.taxableYear-to-date taxable earnings
ytd.social_insuranceYear-to-date social insurance
ytd.income_taxYear-to-date income tax
noteNotes

How to use it

  1. In the dashboard, choose Create template, select "Start from a template" and pick "Payslip". The layout and sample data are copied into your project.
  2. Edit the company name, logo and field positions in the template editor to match your own format.
  3. Send the template name and data to POST /v1/renders to issue a PDF.

With a test API key (sk_test_) you can issue documents from the draft. Publish a version before issuing with a production API key. From an AI assistant, specify the same template in the from of the MCP create_template tool.

Create and issue via the API

Create a template by setting from to the template ID (payslip) in POST /v1/templates, then send the template name and data to POST /v1/renders.

1. Create a template from the ready-made one
curl https://api.docrelay.jp/v1/templates \
  -H "Authorization: Bearer $DOCRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Payslip", "from": "payslip" }'
2. Send data and issue a PDF
curl https://api.docrelay.jp/v1/renders \
  -H "Authorization: Bearer $DOCRELAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d @payslip.json \
  -o payslip.pdf
payslip.json (sample data; arrays show the first item and long text is shortened)
{
  "template": "Payslip",
  "format": "pdf",
  "data": {
    "issued_at": "2026-10-21",
    "pay_month": "2026年10月",
    "employee": {
      "number": "E-102345",
      "department": "営業本部 第一営業部",
      "name": "見本 太郎"
    },
    "paid_at": "2026-10-23",
    "period": {
      "start": "2026-09-21",
      "end": "2026-10-20"
    },
    "company": {
      "name": "サンプル商事株式会社",
      "address": "東京都千代田区見本町1-2-3 サンプルビル5F",
      "department": "人事部 給与課",
      "tel": "03-0000-0000"
    },
    "attendance": [
      {
        "name": "出勤日数",
        "value": "20 日"
      }
    ],
    "work_hours_total": "172:30",
    "earnings": [
      {
        "name": "基本給",
        "amount": 280000
      }
    ],
    "gross_pay": 373138,
    "deductions": [
      {
        "name": "健康保険料",
        "amount": 18829
      }
    ],
    "total_deductions": 81622,
    "bank": {
      "name": "見本銀行",
      "branch": "本店営業部",
      "type": "普通",
      "number": "****567",
      "amount": 291516
    },
    "net_pay": 291516,
    "ytd": {
      "taxable": 3452780,
      "social_insurance": 586720,
      "income_tax": 67890
    },
    "note": "11 月分より、住民税の特別徴収額が変更になります。年末調整の書類は 11 月 13 日(金)までに人事部へご提出くださ…"
  }
}

API reference

Early access is open

We are preparing for launch. Pre-register and we will notify you when the service becomes available.