API Payroll
The payroll actions process pay runs and read them back. add_payroll sends pay lines from your software, such as award-interpreted hours, and Microkeeper calculates the rest of the pay run: super, tax, leave, and its own pay rules. get_payrun_list and get_payroll return pay runs and payslips, for reports or to show staff their pay.
| Actions | add_payroll, get_payrun_list, get_payroll |
|---|---|
| Business key access | Payroll: Read/Write to add, Read Only to get |
This guide covers how to:
- Process a pay run.
- Send payments, expenses and deductions.
- Get a list of pay runs.
- Get payslips.
Before you start, make your keys and test your connection: see Microkeeper API.
Process a pay run with add_payroll
add_payroll works like clicking the pay run button in Microkeeper, with your pay lines added. For each employee in the pay run, Microkeeper:
- Pays their timesheets through the business's pay rules, and pays salaried staff their salary.
- Adds your payments.
- Works out super from the payments and their classes.
- Adds the business's expense and deduction rules, then your expenses and deductions.
- Works out tax and leave.
The pay run is left open. The business reviews it, then locks it and lodges STP in Microkeeper: see Processing a Pay Run.
add_payroll processes the account's main pay cycle: PCID 0 in get_payroll. Pay runs for the business's other pay cycles are processed in Microkeeper.
Example
{
"config": {
"start_date": "2026-11-30",
"end_date": "2026-12-06",
"payment_date": "2026-12-10",
"period": "weekly"
},
"pay_list": [
{ "eusername": "noah_reid", "note": "Ordinary Hours", "rate": "30", "hours": "30.5", "mult": "1", "class": "normal", "LID": 14227, "JID": 1100 },
{ "eusername": "noah_reid", "note": "Saturday", "rate": "30", "hours": "8", "mult": "1.5", "class": "normal", "date": "2026-12-05" },
{ "eusername": "noah_reid", "note": "Annual Leave", "rate": "30", "hours": "7.6", "mult": "1", "class": "normal" },
{ "eusername": "noah_reid", "note": "Laundry Allowance", "rate": "1.25", "hours": "5", "mult": "1", "class": "allowance" }
],
"exp_list": [
{ "eusername": "noah_reid", "note": "Salary Sacrifice Super", "rate": "50", "mult": "1", "class": "super" }
],
"ded_list": [
{ "eusername": "noah_reid", "note": "Union Fees", "rate": "5", "mult": "1", "class": "fees" }
]
}config fields
| Field | Required | What it is |
|---|---|---|
period | Yes | weekly, fortnightly, semi-monthly or monthly |
end_date | Yes | The last day of the pay period, YYYY-MM-DD. It chooses the pay run. For monthly it's the month's last day; for semi-monthly the 15th or the month's last day |
start_date | Yes | The first day of the pay period |
payment_date | Yes | The day staff are paid, YYYY-MM-DD. It decides the month and financial year the pay run reports in |
active_staff | No | 1 to give every active employee a payslip, with no lines sent needed; 0 (the default) for only the staff you send lines for |
run_unworked_ph | No | 0 if your software pays unworked public holidays, so Microkeeper doesn't pay them too. Leave it out to have Microkeeper pay them |
runs_in_year | No | 1 if this financial year has an extra pay run, such as 53 weeks or 27 fortnights, so tax is withheld correctly |
payment_date, period and runs_in_year are saved the first time a pay run is processed. To change the payment date later, change it in Microkeeper.
Response
{ "success":"1", "authenticated":"1", "message":"Payrun processed", "data": {"year":"2026","run_id":"23","calc_duration":0.84,"total":{"payment":1381.25,"expense":50,"deduction":5}} }| Field | What it is |
|---|---|
year, run_id | The pay run's financial year and number. Use them with get_payroll |
calc_duration | How long the pay run took to calculate, in seconds |
total | The totals of the payments, expenses and deductions you sent. Compare them with your own. Payslip totals are higher once Microkeeper adds super, timesheet pay and its rules |
Processing a pay run again
Send the same period again to process the pay run again, such as after fixing a pay line. Your new lines replace the ones you sent before, and Microkeeper calculates again. Lines a manager added to a payslip in Microkeeper are kept.
Once a pay run is locked, it can't be processed again through the API. If it needs to change, the business unlocks it in Microkeeper first; download the payslips before then if staff have been paid.
Send payments, expenses and deductions
Each line needs the employee, as eusername, EID or EmployeeID, and a note. Use eusername or EID for expenses and deductions. Every employee you send must be active.
Send award-interpreted lines: what each employee is paid, not their raw hours. Microkeeper adds super, so don't send it as a payment.
Payments: pay_list
| Field | Required | What it is |
|---|---|---|
note | Yes | The line's description on the payslip, up to 50 characters, such as Ordinary Hours |
rate | No | The rate. Left out, it's the employee's Rate Rule or profile rate |
hours | No | The hours, used for leave accruals and reports. With 0 or left out, the line is rate x mult |
mult | No | The multiplier, such as 1.5 for time and a half, or 1.25 for casual loading. Defaults to 1 |
class | No | How the payment is treated for super, tax and leave. See below. Defaults to normal |
date | No | The day the payment is for, YYYY-MM-DD |
LID, ROID, JID | No | The Location, Role and Job, for cost reports |
STP | No | The STP Category. Leave it out to use the employee's. See STP Reporting Codes |
A line is rate x hours x mult, rounded to the cent. A $100 bonus is "rate":"100" with no hours.
class | Use it for |
|---|---|
normal | Ordinary hours, loadings, weekend penalties and paid leave. Attracts super and builds up leave |
overtime | Overtime. Attracts super only if the employee's super is on total hours |
bonus | Penalties on top of the hours, such as late night work, bonuses, and task allowances, such as first aid. Attracts super |
allowance, extra | Expense allowances, such as tool and laundry. No super |
For how each class is taxed and reported, see the Payments Classification Chart.
Paying leave
To pay leave and take it from the employee's balance, start the note with the leave type's name, and use the normal class:
| Leave | note starts with |
|---|---|
| Annual Leave | Annual Leave |
| Personal Leave | Sick Leave |
| Long Service Leave | Long Service Leave |
| Rostered Day Off | RDO |
| Time Off In Lieu | TOIL |
| Study Leave | Study Leave |
| The business's own leave types | The leave type's Leave Tracking name |
The business's own leave types, such as a wellbeing day, work the same way: start the note with the type's Leave Tracking name, which the business finds in Menu > Settings > General > Global > Entitlement Settings > Configure Leave Types. The type must be active and build up a balance. For leave that has no balance, such as Unpaid Leave or Jury Duty Leave, the note is just the payslip description. See Leave Configuration.
The leave_accrual on each payslip in get_payroll shows every leave type that builds up a balance, the business's own included, by its key.
Anything after a hyphen is ignored, so Annual Leave-Restaurant Service counts as Annual Leave. Pay annual leave loading as a separate line whose note doesn't start with a leave name, such as "note":"Leave Loading","hours":"7.6","mult":"0.175": class bonus if the award's loading attracts super, extra if not. Leave accruals are worked out by Microkeeper from the hours paid.
Expenses: exp_list
Expenses come out of the employee's taxable pay, such as salary sacrifice.
| Field | Required | What it is |
|---|---|---|
note | Yes | The description, up to 30 characters |
rate | Yes | The amount |
mult | No | Defaults to 1 |
class | No | super for salary sacrificed super, fringe for a salary sacrificed exempt fringe benefit, or leave it out for other expenses |
Deductions: ded_list
Deductions come out of the employee's pay after tax.
| Field | Required | What it is |
|---|---|---|
note | Yes | The description, up to 30 characters |
rate | Yes | The amount |
mult | No | Defaults to 1 |
class | No | fees for union fees, give for workplace giving, super for after-tax super, or leave it out for other deductions |
Expense and deduction lines of 0 are skipped.
Errors
An error stops the request, and the pay run isn't changed. Line numbers count from 0.
| Message | What to check |
|---|---|
Payroll API - missing field either start_date or end_date, The period field must be set, The payment_date must be set | config has all four fields |
The period field must be set to either weekly, fortnightly, semi-monthly or monthly | period is in lower case |
A period could not be found, check your end_date (2026-12-14) | end_date is the last day of a monthly or semi-monthly period |
EID, eusername or EmployeeID missing on payment line 2, and the same for expense and deduction lines | Each line names the employee |
Payment note missing on line 2 | Each line has a note. This message is used for all three lists |
The following usernames not found or inactive | Every employee is in Microkeeper and active |
This payrun is locked 2026 23 | The pay run is unlocked in Microkeeper |
Get a list of pay runs with get_payrun_list
get_payrun_list returns pay runs with each payslip's totals and leave balances, without the pay lines, so it's quick. Use it to list an employee's payslips, or to find a pay run's PCID, year and run_id.
Send a range of payment dates, of up to 365 days, and optionally some staff:
{"start_date":"2026-06-01","end_date":"2026-06-30","eusername":["ava_patel"]}Or send pay runs by ID, as below. The staff filters are eusername, EID and EmployeeID, each as a list; staff matching any of them are returned.
Response
{
"success": "1",
"authenticated": "1",
"message": "Payrun data",
"data": {
"runs": [
{
"run_data": {
"pay_cycle_title": "Melbourne Weekly",
"abn": "51824753556",
"abn_name": "Southern Cross Hospitality Pty Ltd",
"abn_trading": "Melbourne Restaurant",
"PCID": "0",
"year": "2025",
"run_id": "49",
"payment_date": "2026-06-11",
"wip": "1",
"period": "weekly",
"day": "monday",
"unlocked": "0",
"done": 1,
"period_start": "2026-06-01",
"period_end": "2026-06-07"
},
"payslips": [
{
"eusername": "ava_patel",
"payment": "850.46",
"expense": "91.12",
"taxable": "759.34",
"deduction": "0.00",
"tax": "79.00",
"net": "680.34",
"hours": 19.5,
"annual": "0",
"sick": "0",
"rdo": "0",
"lsl": "0.325",
"annual_net": "680.34",
"annual_tax": "79.00",
"annual_gross": "759.34",
"EID": "53613",
"EmployeeID": null,
"super_fund": "8",
"super_no": "500000001",
"leave_accrual": {
"al": { "accrual_amount": "0", "accrual_bal": "0" },
"sick": { "accrual_amount": "0", "accrual_bal": "0" },
"lsl": { "accrual_amount": "0.325", "accrual_bal": "0.325" }
}
}
]
}
],
"super_fund_detail": {
"8": { "name": "AustralianSuper", "ABN": "65714394898", "USI": "STA0100AU", "open": "1" }
}
}
}run_data
| Field | What it is |
|---|---|
PCID | The pay cycle's ID. 0 for the account's main pay cycle |
pay_cycle_title, abn, abn_name, abn_trading | The pay cycle and the ABN that pays it. Not every account has them, so check they're there before you use them |
year | The financial year, by its first year: 2025 is 2025-26 |
run_id | The pay run's number in the year: the week number for weekly and fortnightly (1 to 53), 201 to 212 for monthly, and 301 to 324 for semi-monthly. PCID, year and run_id together identify a pay run |
payment_date | The day staff are paid |
period, wip | The pay frequency: weekly (1), fortnightly (2), semi-monthly (24) or monthly (12) |
day | The day the pay week starts, for weekly and fortnightly |
period_start, period_end | The pay period |
unlocked | "1" while the pay run is open, "0" once it's locked |
done | 1: the pay run has finished calculating |
payslips
| Field | What it is |
|---|---|
eusername, EID, EmployeeID | The employee |
payment | Total payments |
expense | Total expenses |
taxable | Taxable pay: payments less expenses |
tax | Tax withheld |
deduction | Total deductions |
net | Net pay: taxable pay less tax and deductions |
hours | Hours paid |
annual, sick, lsl | Annual, personal and long service leave balances after this pay run, in hours. rdo is always "0": use leave_accrual |
annual_gross, annual_tax, annual_net | Year-to-date taxable pay, tax and net pay |
super_fund, super_no | The employee's super fund ID, which super_fund_detail describes, and member number. 0 if no fund is set |
leave_accrual | Each leave type's accrual_amount, the hours accrued this pay run, and accrual_bal, the balance after it. get_payroll includes every leave type that accrues |
super_fund_detail describes each fund, keyed by its ID: its name, ABN, USI, and open ("1" if it accepts contributions). A self-managed fund has no USI: use its ABN.
Get payslips with get_payroll
get_payroll returns the same as get_payrun_list, with every payslip's pay lines. Send payment dates, as above, or the pay runs you want by ID:
{"payrun_id":[{"PCID":0,"year":2025,"run_id":49},{"PCID":0,"year":2025,"run_id":50}],"eusername":["ava_patel"]}Each payslip also has these lists, when it has lines in them:
pay_list
{ "ESBDID": "279247", "note": "Casual Ordinary", "date": "0000-00-00", "LID": "14227", "ROID": "681", "JID": "1100", "rate": "25.85", "hours": "4", "mult": "1.25", "value": "129.25", "class": "FALSE", "STP": "" }value is the line's total. STP is blank when the employee's own STP Category is used. class is a code:
class | Payment |
|---|---|
FALSE | Normal |
TRUE | Overtime |
BONUS | Bonus |
EXTRA | Extra |
ALLOW | Allowance |
ALLO2 | Tax-free allowance |
RBURS | Reimbursement |
WCE | Workers compensation |
SUPER | Employer additional super |
SUPER2 | Employer super guarantee |
exp_list and ded_list
{ "ESNTDID": "88412", "note": "Super", "rate": "12.000", "mult": "1", "value": "91.12", "class": "SUPER3" }Each line has its ID (ESNTDID for expenses, ESDID for deductions), note, rate, mult, value and class. For super, rate is the percentage.
| List | class |
|---|---|
exp_list | SUPER3 super guarantee, SUPER2 employer additional super, SUPER salary sacrificed super, FRINGE and FRING2 fringe benefits, blank for other |
ded_list | SUPER after-tax super, GIVE workplace giving, FEES union fees, CS1 and CS2 child support, blank for other |
Errors
Payroll API - missing field either start_date or end_date: send dates orpayrun_id.A maximum of 365 days can be selectedThe payrun_id must be an object,The payrun_id must include PCID, year and run_id: send a list, each with all three.There are no users found with the supplied EID, eusername or EmployeeIDThere are no payruns between the supplied dates or supplied payrun_id idsProcessing of payrun (0/2026/23) is not finished yet: try again in a minute.There are no payslips in any of the selected payruns