Overview
As an HRA (Human Resources Administrator), you need to process all incidences (PTOs, leaves, absences, extra hours, reimbursements, etc.) to calculate payroll, stamp CFDIs, generate payslips, and disburse payments. This flow guides you through the complete payroll cycle using the Worky APIs.
Payroll Cycle Stages
π 1. Collect Incidences
Gather all HR incidences for the payroll period: PTOs, leaves, absences, overtime, reimbursements, bonuses, and deductions.
/api/v1/incidences/eventsList all incidences/api/v1/time-off/eventsGet time-off events/api/v1/time-off/balancesCheck PTO balances/api/v1/incidences/requests/approve/{id}Approve incidenceπ’ 2. Calculate Payroll
Run the payroll engine to compute salaries, taxes, and deductions for all employees.
/api/v1/payroll/calendarGet payroll calendar/api/v1/payroll/calculationRun calculation/api/v1/payroll/employee-summary/{id}View summary/api/v1/payroll/conceptList payroll conceptsπ 3. Stamp CFDI
Generate and stamp the official CFDI (Comprobante Fiscal Digital por Internet) for each employee's payslip as required by Mexican tax law.
/api/v1/payroll/engine/do-calculationRun processing/api/v1/payroll/{payrollId}Check statusπ 4. Generate Payslips
Create and distribute payslips to all employees.
/api/v1/payroll/{payrollId}Get payroll record/api/v1/payroll/querySearch payroll recordsπΈ 5. Disburse Payroll
Process bank transfers to pay employees.
/api/v1/payroll/period/closeClose payroll period/api/v1/payroll/{payrollId}Check status