Create payroll draft

Create a payroll draft from the initialized payroll data. This is the second step of the payroll process.

Flow: GET /payrolls/period-options → POST /payrolls/initialize → edit payrollData → POST /payrolls (create draft) → review → approve.

Send the modified payrollData for each employee and contractor: its workers are employee and contractor records only, and an admin record has no pay and is never on a payroll. The same mutual-exclusivity rule from the initialize response applies: each employee entry must contain either payrollData (non-split) or splits (split), never both. payment_method and note are always at the employee root level.

Contractors always use payrollData (no splits).

A bonus or other one-time amount paid as a separate payment, now or on a named day, outside the regular run is an off-cycle draft with that payday; an amount for a future payroll is a scheduled earning (POST /scheduled-earnings) instead. A regular draft pays every worker of the period the initialize suggestion lists; a change for one worker leaves the others as suggested.

The draft pays exactly the body it receives: custom earning rates are paid when the body carries them in customEarnings / customReimbursements (the initialize suggestion does when it includes usual pay), and the vacation, sick, holiday and approved hours in pto_hours are all paid at pto_payment_amount (approved holds hours from approved PTO requests).

The server processes payrollData, creates the payroll, and returns a full preview with per-employee tax/benefit/deduction breakdowns, aggregate totals, and an actions.approve hint. The new draft's id is in both id and payroll_id. This is the review step — inspect the preview and call approve when ready.

A company can have at most 3 draft payrolls open at a time. Once that limit is reached this endpoint returns 409 until an existing draft is approved or deleted.

An off-cycle's payday must be a business day the company can still approve, as POST /payrolls/initialize describes: an earlier one answers 400 naming the earliest day, and a weekend or holiday one 400 naming the next business day.

Scheduled earnings that match this payroll are added as their own lines, on top of the body's pay, as POST /payrolls/initialize reports them in its scheduled_earnings block: the save claims every row the block lists as included, and a waiting one (a next-payroll earning on an off-cycle, or a new match on an existing draft) only when scheduled_earnings_include names it; one left out stays created. A dated earning never rides on an off-cycle. A next-payroll earning named in scheduled_earnings_not_now (Not now) is left out and this payroll never takes it: the save records the new draft's id on it. An id in either list the save cannot act on is ignored, never refused, and returned in scheduled_earnings_ignored. The lines never go in payrollData.

Requires the payroll plan or higher.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Allowed:
string
required

Pay period start date (YYYY-MM-DD)

string
required

Pay period end date (YYYY-MM-DD)

string
required

Payday (YYYY-MM-DD). An off-cycle's must be a business day the company can still approve (POST /payrolls/initialize describes the rule, and suggests the earliest day when sent without one); an earlier one, or a weekend or holiday one, answers 400 naming the day to use, on an edit too.

string | null
enum

Required for type=regular

Allowed:
integer | null

Required for type=regular

employees
array of objects

Employee payroll entries

employees
contractors
array of objects

Contractor payroll entries

contractors
scheduled_earnings_include
array of integers

The waiting scheduled earnings this save includes, by scheduled_earning_id from initialize's scheduled_earnings rows with inclusion: waiting: a next-payroll earning on an off-cycle, or a new match on an existing draft. Each becomes its own line. A waiting one left out stays created (idle). The save claims what the block lists as included without it, and earnings already pending on an edited draft stay. An id this save cannot include is ignored, never refused, and returned in the response's scheduled_earnings_ignored.

scheduled_earnings_include
scheduled_earnings_not_now
array of integers

Next-payroll scheduled earnings this payroll should not take (Not now), by scheduled_earning_id: the save takes none of them and records the saved payroll's id on each, so this payroll never takes them and a later one can. On an edit, one pending on the draft is released and its line removed. A dated earning has no Not now and is ignored here; an id in both lists is a Not now.

scheduled_earnings_not_now
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json