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/events/{id}/approveApprove incidenceπ’ 2. Calculate Payroll
Run the payroll engine to compute salaries, taxes, and deductions for all employees.
/api/v1/payroll/calendarsGet payroll calendar/api/v1/payroll/calculateRun calculation/api/v1/payroll/employee-summary/{payrollId}View summary/api/v1/payroll/conceptsList 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/stampStamp CFDI/api/v1/payroll/stamp-status/{payrollId}Check statusπ 4. Generate Payslips
Create and distribute payslips to all employees.
/api/v1/payroll/payslips/{payrollId}Get payslips/api/v1/payroll/payslips/sendSend to employeesπΈ 5. Disburse Payroll
Process bank transfers to pay employees.
/api/v1/payroll/disbursementInitiate disbursement/api/v1/payroll/disbursement-statusCheck status