Overview / People & HR / Create a payroll

Create a payroll

post https://api.flactrum.com/v1/payrolls
Required scope payroll.write
Success status201
Returns One Payroll object

Request body

FieldTypeDescription
salary_id * string The employee is taken from the salary record.
period_start * string —
period_end * string —
gross_amount number|null Defaults to the salary's gross.
deductions number|null —
status string —

Response fields

FieldTypeDescription
id string —
salary_id string —
employee_id string —
period_start string —
period_end string —
gross_amount number —
deductions number —
net_amount number Always gross minus deductions; it cannot be written directly.
status string —
paid_at string|null —

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X POST 'https://api.flactrum.com/v1/payrolls' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "salary_id": "01m43mzfc8mnmj6ts0d1gsnd35",
    "period_start": "2026-10-01",
    "period_end": "2026-10-31",
    "deductions": 6000
}'

HTTP 201 · application/json

{
    "data": {
        "id": "01m43mzfcfgee6n2cbyb9sw4xw",
        "salary_id": "01m43mzfc8mnmj6ts0d1gsnd35",
        "user_id": null,
        "period_start": "2026-10-01",
        "period_end": "2026-10-31",
        "gross_amount": 36000,
        "deductions": 6000,
        "net_amount": 30000,
        "status": "draft",
        "paid_at": null,
        "created_at": "2026-10-04T14:27:08+00:00",
        "updated_at": "2026-10-04T14:27:08+00:00"
    }
}