Pay Run
A Pay Run is one pay period’s payroll for a Company: each employee’s gross pay, withholding, deductions and net pay, approved and paid together.
Properties
| Property | Type | Required | Description |
|---|---|---|---|
company | Company | required | The employer of record for everyone it pays. |
periodStart | date | required | The first day of the pay period. |
periodEnd | date | required | The last day of the pay period. |
payDate | date | required | The day net pay reaches each employee’s bank. |
kind | string | required | A regular run on the pay schedule, or an offCycle run for a bonus, a correction or final pay. |
humans | list of Human | The employees it pays. | |
gross | money | Pay before withholding and deductions, for everyone in the run. | |
withheld | money | Income and payroll taxes withheld from employees’ pay. | |
deductions | money | Benefit and retirement deductions the employees elected. | |
employerTax | money | Payroll taxes the Company owes on top of gross pay. | |
net | money | What reaches the employees’ banks: gross less withholding and deductions. | |
status | string | required | Where the Pay Run stands; only an approved run is paid. |
Object
{
"$id": "https: //api.sb/ kilnbakery.com/ pay-runs/ pay_run_1",
"$type": "PayRun",
"company": "company_1",
"periodStart": "2026-10-22",
"periodEnd": "2026-10-22",
"payDate": "2026-10-22",
"kind": "regular",
"humans": [
"human_1"
],
"gross": {
"amount": 9,
"currency": "USD"
},
"withheld": {
"amount": 9,
"currency": "USD"
},
"deductions": {
"amount": 9,
"currency": "USD"
},
"employerTax": {
"amount": 9,
"currency": "USD"
},
"net": {
"amount": 9,
"currency": "USD"
},
"status": "prepared"
}Relationships
- A Pay Run is paid by one Company: a Pay Run is paid by one Company, the employer of record for everyone in it.
paidBy, inversepayRuns. - A Pay Run pays many Humans: a Pay Run pays the Humans the Company employs; each employee appears in one run per pay period.
pays, inversepaidIn.
Lifecycle
| State | Meaning | Moves to |
|---|---|---|
prepared (first) | Every amount is computed and the run waits for approval; nothing is booked or paid. | approved by PayRun.approve; voided by PayRun.void |
approved | The cost is booked and payment is scheduled to land on the pay date. | paid by PayRun.pay |
paid | Net pay reached each employee, and the payroll provider holds the taxes and deductions to remit. | None: it ends here. |
voided | The run was set aside before approval; nothing was booked or paid, and the record stays. | None: it ends here. |
Verbs
getReturns one Pay Run by id.GET /{namespace}/pay-runs/{id}listReturns Pay Runs, newest first, one page at a time.GET /{namespace}/pay-runsapproveApprove accepts a prepared Pay Run within the approver’s Mandate, books its cost, and schedules payment to land on the pay date.POST /{namespace}/pay-runs/{payRun}/approvepayPay funds an approved Pay Run: net pay to each employee’s bank on the pay date, taxes and deductions to the payroll provider.POST /{namespace}/pay-runs/{payRun}/paypreparePrepare computes one pay period’s gross pay, withholding, deductions and employer taxes for each employee, and holds the Pay Run for approval.POST /{namespace}/pay-runs/preparevoidVoid sets aside a prepared Pay Run that is wrong, so a corrected one can be prepared; the record stays.POST /{namespace}/pay-runs/{payRun}/void
A Pay Run is kept forever and never edited: it has no update or delete.
Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.
| Operation | owner | admin | member | viewer |
|---|---|---|---|---|
PayRun.get | Yes | Yes | Yes | Yes |
PayRun.list | Yes | Yes | Yes | Yes |
PayRun.approve | Yes | No | No | No |
PayRun.pay | Yes | No | No | No |
PayRun.prepare | Yes | Yes | Yes | No |
PayRun.void | Yes | Yes | Yes | No |
Call it
Prepare the latest pay run with a company.Example
A property-management app with four employees in two states pays on the 15th and the last day of each month. The Payroll Specialist prepares the run for the 1st to the 15th: $18,400 gross, withholding for both states, $14,050 net. It approves within its Limit, and the Treasurer funds it two days before payday.