# Payroll

URL: /workflows/processes/payroll · Id: `process:payroll`

> Payroll pays every Human who works for the Startup, with withholding and tax statements.

Payroll pays every [Human](/business/nouns/human) who works for the [Startup](/business/nouns/startup), with withholding and tax statements.

## Outcome
| Part | This Process |
| --- | --- |
| Outcome | Every employee and contractor is paid for the Period with withholding, and the payroll returns are filed. |
| Reads | [Human](/business/nouns/human), [Period](/business/nouns/period) |
| Leaves | [Transaction](/business/nouns/transaction), [Entry](/business/nouns/entry) |
| Runs in | Each Startup |

## Accountable
[People Lead](/agents/people/people-lead), [People Team](/agents/people).

## Workflows
| Workflow | Runs | Team |
| --- | --- | --- |
| [Pay people](/workflows/processes/payroll/pay-people) | every month | [People Team](/agents/people) |

## Who does each step

| Workflow | Step | Role | Calls | Approval |
| --- | --- | --- | --- | --- |
| [Pay people](/workflows/processes/payroll/pay-people) | 1. Total each Human’s pay for the Period. | [Payroll Specialist](/agents/people/payroll-specialist) | [Human.list](/business/nouns/human/list) | None |
| [Pay people](/workflows/processes/payroll/pay-people) | 2. Withhold the taxes each jurisdiction requires. | [Payroll Specialist](/agents/people/payroll-specialist) | [Entry.post](/business/nouns/entry/post) | Asks first; waits 1 business hour |
| [Pay people](/workflows/processes/payroll/pay-people) | 3. Pay each Human and record the Transaction. | [Payroll Specialist](/agents/people/payroll-specialist) | [Human.remit](/business/nouns/human/remit) | Asks first; waits 1 business hour |
| [Pay people](/workflows/processes/payroll/pay-people) | 4. File the Period’s payroll returns. | [Payroll Specialist](/agents/people/payroll-specialist) | [Company.submit](/business/nouns/company/submit) | Asks first; waits 1 business hour |

## Events
| Direction | When | What happens |
| --- | --- | --- |
| In | Every month | Starts [Pay people](/workflows/processes/payroll/pay-people) |
| Out | [`Entry.posted`](/business/events/Entry.posted) | Raised by step 2 of [Pay people](/workflows/processes/payroll/pay-people) |
| Out | [`Human.remitted`](/business/events/Human.remitted) | Raised by step 3 of [Pay people](/workflows/processes/payroll/pay-people) |
| Out | [`Company.submitted`](/business/events/Company.submitted) | Raised by step 4 of [Pay people](/workflows/processes/payroll/pay-people) |

## Plays
No Play names this Process.

## Controls
No Control names this Process or a Workflow of it.

## Settings
None.

## Failure
A failed step retries; when retries run out, the Action goes to the [People Lead](/agents/people/people-lead).

| Step | On failure |
| --- | --- |
| [Pay people](/workflows/processes/payroll/pay-people) 3. Pay each Human and record the Transaction. | Goes to the [People Lead](/agents/people/people-lead). |

## Loop
No loop: the path is never randomized, because it serves [Information returns](/systems/legal-and-corporate/floor/information-returns).

## Code

**Ask**

```text
Turn on payroll
```

**API**

```bash
curl -X POST https://api.sb/leaseline.app/processes/process_1/enable \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

**SDK**

```ts
import { $ } from 'startup-builder'

await $.Process.enable({ process: 'process_1' })
```

**CLI**

```bash
npx startup-builder do Process.enable --json '{"process":"process_1"}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Process.enable({ process: 'process_1' })"
  }
}
```

## Enable
Off until someone calls [Process.enable](/business/nouns/process/enable). [Process.pause](/business/nouns/process/pause) stops new Actions; Actions in progress finish.

## Example
A home-appraisal service employs one licensed appraiser. At month end, [Pay people](/workflows/processes/payroll/pay-people) totals her pay, withholds the required taxes, pays her, and files the month's returns.