Skip to main content
Beta. Melso does not serve the payroll endpoints yet, and their fields can still change. Keep them behind a flag in your product.
These calls work with a company key in its own company, or with a partner key in any company of the firm. $MELSO_API_KEY is either one.
Register each employee when the company hires them. Melso’s professionals do the registration with the Social Security, communicate contracts to Contrat@ and prepare each month’s payroll.

1. Set up the company’s labour data once

The Social Security accounts (CCC), the collective agreement, the mutua and the account salaries leave from. Read them with Get the labour settings and send what is missing with Update the labour settings.

2. Register an employee

Send only what the employee confirmed. An employee without a full profile is kept, and the month’s payroll lists them as incomplete.
incomplete lists what the payroll still needs from them. To see what a hire would cost before you make it, use Preview a payslip.

3. Register the contract and send it to Contrat@

Create a contract with its SEPE clave, account, occupation and hours. Then send it to Contrat@ within 10 days, and follow the SEPE’s answer in List Contrat@ submissions. Extensions and conversions are contracts too, with event and previous_id.

4. Run the month

Every change of state sends the run’s version as expected_version. If the month changed in between, the call answers 409: read it again.

5. Get the payslips and files

Download a payroll file gives the payslips and settlements as PDF, the SEPA transfer file and the official files, with scope and kind.

6. Social Security

After a month is approved, generate its file for SILTRA with Generate a SILTRA file, then import what the TGSS answers with Import a TGSS answer. List Social Security liquidations shows what is due and when. Sick leaves come from the INSS’s FIE files: import each one and the next month’s payroll applies them.

When someone leaves

Record the termination in the month’s incidents, so the payroll calculates the settlement (finiquito). Then update the employee with active: false and end_date.