Run payroll
Use this guide to process pay for a period via API. Employees must exist in HR (and be mirrored in Payroll) before you start a run.Prerequisites
- API credentials — Authorization
- Employees in HR — Add an employee
- Payroll settings and chart of accounts configured for the company
- Permissions:
payroll:runs:read,payroll:runs:write; approval may requirepayroll:runs:approve
Steps
Create a payroll run
Create a run for your target pay period. Open Create payroll run in Payroll API reference for the exact request body — fields depend on your organization’s payroll configuration.Save the run
id from the response.Calculate and review
Trigger calculation on the run, then fetch line items and totals. Resolve exceptions (missing payment rails, expired contracts) before approving.
Approve and complete
If your process requires approval, call the approve endpoint with a principal holding
payroll:runs:approve. Then complete or disburse per your configuration.Fetch payslips
Tips
- Configure payroll GL mappings before your first production run if Books integration is enabled.
- Variable pay (bonuses, adjustments) is added on the run before calculation — see run line-item endpoints in the API reference.
- After completion, Payroll publishes events consumed by Books for journal posting.
Troubleshooting
| Problem | Resolution |
|---|---|
| Employee missing from run | Confirm HR → Payroll mirror. Employee needs active contract and payment rail. |
| Calculation exceptions | Fetch run exception list; fix HR data and recalculate. |
| GL not posted after run | Check Books mappings — Payroll → Books. |
Related
HR → Payroll sync
Employee mirror mechanics.
Payroll → Books
GL posting after run completion.
Payroll API reference
Full run lifecycle endpoints.