| name | run_payroll |
| tier | 2 |
| task | T12 |
| description | This skill should be used when the task asks to "run payroll", "kjør lønn", "registrer lønn", "process salary", "traiter la paie", "processar folha de pagamento", "Gehaltsabrechnung durchführen", "ejecute la nómina", or involves registering salary, wages, bonuses, or payroll for an employee. |
Run Payroll
3 API calls. Use manual salary voucher with correct accounts.
Call 1: Find Employee
GET /employee?email=<email>&fields=id,firstName,lastName&count=5
Call 2: Find Salary Accounts (ONE call)
GET /ledger/account?number=5000,2600,2930&fields=id,number,name
- 5000 = "Lønn til ansatte" (salary expense, debit)
- 2600 = "Forskuddstrekk" (tax withholding, credit)
- 2930 = "Skyldig lønn" (net salary payable, credit)
Call 3: Create Salary Voucher
Calculate: gross = base_salary + bonus. Tax = gross × 0.40 (standard ~40% tax). Net = gross - tax.
POST /ledger/voucher
{
"date": "2026-03-01",
"description": "Lønn mars 2026 - <employee name>",
"postings": [
{
"date": "2026-03-01",
"account": {"id": <account_5000_id>},
"amountGross": <base_salary>,
"amountGrossCurrency": <base_salary>,
"description": "Grunnlønn",
"row": 1,
"employee": {"id": <employee_id>}
},
{
"date": "2026-03-01",
"account": {"id": <account_5000_id>},
"amountGross": <bonus>,
"amountGrossCurrency": <bonus>,
"description": "Bonus",
"row": 2,
"employee": {"id": <employee_id>}
},
{
"date": "2026-03-01",
"account": {"id": <account_2600_id>},
"amountGross": -<tax_amount>,
"amountGrossCurrency": -<tax_amount>,
"description": "Skattetrekk",
"row": 3,
"employee": {"id": <employee_id>}
},
{
"date": "2026-03-01",
"account": {"id": <account_2930_id>},
"amountGross": -<net_amount>,
"amountGrossCurrency": -<net_amount>,
"description": "Skyldig lønn",
"row": 4,
"employee": {"id": <employee_id>}
}
]
}
Use first of current month for date. Separate base salary and bonus into individual postings on account 5000.
Total: 3 calls, 0 errors.
Tax Calculation
Standard Norwegian tax withholding is approximately 40% of gross:
- Tax = round(gross × 0.40)
- Net = gross - tax
Gotchas
- Use account 5000 for salary expense (NOT 5001 or other variants)
- Use account 2600 for tax withholding (Forskuddstrekk)
- Use account 2930 for net salary payable (Skyldig lønn)
- employee reference is REQUIRED on every posting — this is how the scoring links postings to the employee
- Separate base salary and bonus into individual rows on account 5000
- Postings MUST balance: base + bonus - tax - net = 0
- Both
amountGross AND amountGrossCurrency are required
- Use first of month as date (2026-03-01)
- No voucherType needed — POST /ledger/voucher works without it