# Payroll

> Stamp payroll receipts (CFDI type N with Nómina 1.2) in two ways: Fiscalisto calculates your employee's ordinary receipt, or stamps as is the amounts your payroll system already calculated, ordinary or extraordinary.

A **payroll receipt** is a type N CFDI with the Nómina 1.2 complement. There are two ways to stamp it, each on its own route, and they never mix:

| | Fiscalisto calculates | Your system calculates |
| --- | --- | --- |
| Route | [`POST /v1/payroll_receipts`](#stamp-it) | [`POST /v1/payroll_receipts/external`](#stamp-the-payroll-your-system-calculated) |
| You send | The employee (`emp_…`) and the period | The full employee, each perception, deduction and other payment, and the totals |
| Amounts | Salary, ISR with the article 96 tariff, employment subsidy and the employee's IMSS contributions, like **Nómina › Emitir recibos** | Yours, exactly as you send them: Fiscalisto validates them and never recalculates, rounds or completes them |
| Payroll | Ordinary only, with salary, ISR, subsidy and IMSS | Ordinary (`O`) and extraordinary (`E`): Christmas bonus, profit sharing, bonuses, commissions, overtime, Infonavit, severance, retirement… |
| Before stamping | [Review the receipt](#see-the-receipt-before-stamping-it) and send its `confirmation_token`: only that one is stamped | [Review it](#review-it-without-stamping) with the same body |

Sending amounts to the first route, or an `emp_…` to the second, returns `400` `calculation_mode_ambiguous` instead of guessing what you meant. Asking the first for an extraordinary receipt (`type: "E"`, periodicity `99`, `separation`, `retirement` or `disabilities`) returns `400` `payroll_calculation_unsupported`, which points you to the [Christmas bonus, profit sharing and severance route](#christmas-bonus-profit-sharing-and-severance) or to the second.

Fiscalisto calculates ordinary payroll (the salary for the days paid, ISR with the employment subsidy and the employee's IMSS contributions, with its [incidents](#incidents): overtime, Sundays, vacation and bonuses) and, on its own route, the [Christmas bonus, profit sharing and severance](#christmas-bonus-profit-sharing-and-severance). It also deducts what you registered on each employee: [Infonavit, Fonacot, alimony, loans, savings fund and union dues](#each-employees-deductions). If your payroll carries anything else (commissions or disability payments), calculate it in your system and stamp those receipts with the second route: that way the calculation, and whatever changes in the law, stays in your system.

Each receipt uses one timbre, like any invoice. In test mode it's stamped with SAT's test issuers, at no cost.

## Before the first receipt

The issuer needs its IMSS **employer registration** (11 characters) and, if it's an individual, its CURP:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/issuers/iss_OufpKqnrvx9p \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "employer_registration": "Y5412345109" }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const issuer = await fiscalisto.issuers.update("iss_OufpKqnrvx9p", { employer_registration: "Y5412345109" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

issuer = fiscalisto.issuers.update("iss_OufpKqnrvx9p", {"employer_registration": "Y5412345109"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$issuer = $fiscalisto->issuers->update('iss_OufpKqnrvx9p', ['employer_registration' => 'Y5412345109']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	issuer, err := client.Issuers.Update(ctx, "iss_OufpKqnrvx9p", &fiscalisto.UpdateIssuerParams{
		EmployerRegistration: fiscalisto.String("Y5412345109"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(issuer.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.UpdateIssuerParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var issuer = fiscalisto.issuers().update("iss_OufpKqnrvx9p", new UpdateIssuerParams().setEmployerRegistration("Y5412345109"));
System.out.println(issuer.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var issuer = await fiscalisto.Issuers.UpdateAsync("iss_OufpKqnrvx9p", new UpdateIssuerParams
{
    EmployerRegistration = "Y5412345109",
});
```

Without it, a receipt returns `422` `payroll_invalid` and says so.

## Add an employee

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/employees \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "9",
    "name": "MARIA OLIVIA MARTINEZ SAGAZ",
    "tax_id": "MASO451221PM4",
    "curp": "MASO451221MSLRGL08",
    "social_security_number": "12345678903",
    "zip": "80290",
    "email": "maria.martinez@example.com",
    "start_date": "2024-03-04",
    "daily_salary": 320,
    "integrated_daily_salary": 334.66,
    "periodicity": "04",
    "state": "SIN"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const employee = await fiscalisto.employees.create({
  number: "9",
  name: "MARIA OLIVIA MARTINEZ SAGAZ",
  tax_id: "MASO451221PM4",
  curp: "MASO451221MSLRGL08",
  social_security_number: "12345678903",
  zip: "80290",
  email: "maria.martinez@example.com",
  start_date: "2024-03-04",
  daily_salary: 320,
  integrated_daily_salary: 334.66,
  periodicity: "04",
  state: "SIN",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

employee = fiscalisto.employees.create({
    "number": "9",
    "name": "MARIA OLIVIA MARTINEZ SAGAZ",
    "tax_id": "MASO451221PM4",
    "curp": "MASO451221MSLRGL08",
    "social_security_number": "12345678903",
    "zip": "80290",
    "email": "maria.martinez@example.com",
    "start_date": "2024-03-04",
    "daily_salary": 320,
    "integrated_daily_salary": 334.66,
    "periodicity": "04",
    "state": "SIN",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$employee = $fiscalisto->employees->create([
    'number' => '9',
    'name' => 'MARIA OLIVIA MARTINEZ SAGAZ',
    'tax_id' => 'MASO451221PM4',
    'curp' => 'MASO451221MSLRGL08',
    'social_security_number' => '12345678903',
    'zip' => '80290',
    'email' => 'maria.martinez@example.com',
    'start_date' => '2024-03-04',
    'daily_salary' => 320,
    'integrated_daily_salary' => 334.66,
    'periodicity' => '04',
    'state' => 'SIN',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	employee, err := client.Employees.Create(ctx, &fiscalisto.CreateEmployeeParams{
		Number:                "9",
		Name:                  "MARIA OLIVIA MARTINEZ SAGAZ",
		TaxID:                 "MASO451221PM4",
		CURP:                  "MASO451221MSLRGL08",
		SocialSecurityNumber:  "12345678903",
		Zip:                   "80290",
		Email:                 fiscalisto.String("maria.martinez@example.com"),
		StartDate:             "2024-03-04",
		DailySalary:           320,
		IntegratedDailySalary: 334.66,
		Periodicity:           fiscalisto.String("04"),
		State:                 "SIN",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(employee.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateEmployeeParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employee = fiscalisto.employees().create(new CreateEmployeeParams()
        .setNumber("9")
        .setName("MARIA OLIVIA MARTINEZ SAGAZ")
        .setTaxId("MASO451221PM4")
        .setCurp("MASO451221MSLRGL08")
        .setSocialSecurityNumber("12345678903")
        .setZip("80290")
        .setEmail("maria.martinez@example.com")
        .setStartDate("2024-03-04")
        .setDailySalary(320)
        .setIntegratedDailySalary(334.66)
        .setPeriodicity("04")
        .setState("SIN"));
System.out.println(employee.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employee = await fiscalisto.Employees.CreateAsync(new CreateEmployeeParams
{
    Number = "9",
    Name = "MARIA OLIVIA MARTINEZ SAGAZ",
    TaxId = "MASO451221PM4",
    Curp = "MASO451221MSLRGL08",
    SocialSecurityNumber = "12345678903",
    Zip = "80290",
    Email = "maria.martinez@example.com",
    StartDate = "2024-03-04",
    DailySalary = 320,
    IntegratedDailySalary = 334.66m,
    Periodicity = "04",
    State = "SIN",
});
```

The name, RFC and postal code go as on the employee's constancia de situación fiscal: SAT compares them. What you don't send takes the usual value of **Nuevo empleado**:

| Field | Default | What it is |
| --- | --- | --- |
| `contract_type` | `01` | Permanent contract (c_TipoContrato). |
| `workday_type` | `01` | Day shift (c_TipoJornada). |
| `periodicity` | `04` | Fortnightly. Also `02` weekly, `03` every 14 days and `05` monthly. |
| `risk_class` | `1` | The position's IMSS risk class, 1 to 5. |
| `border_zone` | `false` | Whether they work in the northern border free zone (the zone's minimum wage). |
| `imss_worker_type` | `1` | IMSS worker type: permanent (`2` to `4`: temporary urban, construction, rural). |
| `imss_salary_type` | `0` | Fixed salary (`1` variable, `2` mixed). |
| `imss_reduced_week` | `0` | Normal week and workday (`1` to `5`: days per week; `6`: reduced workday). |
| `aguinaldo_days` | `15` | Days of aguinaldo a year (at least the law's 15). |
| `vacation_premium` | `0.25` | Prima vacacional as a fraction (at least the law's 25%). |
| `pantry_vouchers` | `0` | Vales de despensa per month, in pesos. |
| `savings_fund_rate` | `0` | Fondo de ahorro as a fraction of the salary, up to `0.13`. |

With `pantry_vouchers`, each receipt pays its days' share as vales de despensa (`029`), exempt as previsión social within the 7 UMA a year limit of article 93 of the LISR; they don't go in the bank file. With `savings_fund_rate`, the receipt carries the employer's contribution as fondo de ahorro (`005`, exempt up to 1.3 UMA a year) and deducts both contributions (`004`, keys `FAT` for the worker and `FAE` for the employer); it doesn't apply to someone earning the minimum wage.

To [pay them through the bank](#pay-the-payroll-at-the-bank) and [report them to IMSS](#imss-movements), also send their `clabe` and, if you want the exact name in the IMSS files, `given_names`, `first_surname` and `second_surname` (without them, Fiscalisto splits `name` using the letters of their CURP).

The response carries `warnings` with what SAT could reject before stamping, for example an RFC or a CURP whose check digit doesn't match. They don't prevent saving it: review them with the employee.

An RFC or an employee number that already exists in the issuer returns `400` `employee_exists`. To change a salary or terminate (`end_date`), use [`POST /v1/employees/{id}`](https://fiscalisto.com/en/docs/api/referencia/nomina/update-employee) with only what changes; receipts already stamped don't change.

## See the receipt before stamping it

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_receipts/preview \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    "period": { "start": "2026-10-01", "end": "2026-10-15" }
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollReceiptPreview = await fiscalisto.payrollReceipts.preview({
  employee: "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
  period: { start: "2026-10-01", end: "2026-10-15" },
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_receipt_preview = fiscalisto.payroll_receipts.preview({
    "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    "period": {"start": "2026-10-01", "end": "2026-10-15"},
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollReceiptPreview = $fiscalisto->payrollReceipts->preview([
    'employee' => 'emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr',
    'period' => [
        'start' => '2026-10-01',
        'end' => '2026-10-15',
    ],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollReceiptPreview, err := client.PayrollReceipts.Preview(ctx, &fiscalisto.PreviewPayrollReceiptParams{
		Employee: "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
		Period: fiscalisto.PreviewPayrollReceiptParamsPeriod{
			Start: "2026-10-01",
			End:   "2026-10-15",
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollReceiptPreview)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.PreviewPayrollReceiptParams;
import com.fiscalisto.model.PreviewPayrollReceiptParamsPeriod;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollReceiptPreview = fiscalisto.payrollReceipts().preview(new PreviewPayrollReceiptParams()
        .setEmployee("emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr")
        .setPeriod(new PreviewPayrollReceiptParamsPeriod()
                .setStart("2026-10-01")
                .setEnd("2026-10-15")));
System.out.println(payrollReceiptPreview);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollReceiptPreview = await fiscalisto.PayrollReceipts.PreviewAsync(new PreviewPayrollReceiptParams
{
    Employee = "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    Period = new() { Start = "2026-10-01", End = "2026-10-15" },
});
```

Returns the receipt as it would be stamped, without stamping or using timbres:

```json
{
  "object": "payroll_receipt_preview",
  "periodicity": "04",
  "period": { "start": "2026-10-01", "end": "2026-10-15", "payment_date": "2026-10-15" },
  "days": 15,
  "imss_days": {
    "calendar_days": 15,
    "absences": 0,
    "disability_days": 0,
    "sickness_and_maternity": 15,
    "disability_and_old_age": 15
  },
  "perceptions": [{ "type": "001", "key": "001", "concept": "Sueldo", "taxed": 4800, "exempt": 0 }],
  "deductions": [
    { "type": "001", "key": "001", "concept": "Cuotas IMSS", "amount": 119.21 },
    { "type": "002", "key": "002", "concept": "ISR", "amount": 80.85 }
  ],
  "isr": { "tariff": 345.15, "subsidy": 264.3, "withheld": 80.85, "exempt_minimum": false },
  "totals": { "perceptions": 4800, "deductions": 200.06, "net": 4599.94 },
  "confirmation_token": "9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e",
  "warnings": []
}
```

Keep the `confirmation_token` and send it when stamping: Fiscalisto recalculates the receipt at that moment and only stamps it if it's exactly the one you reviewed. If it changed (another receipt of the employee was stamped that month, their salary changed or the tables were updated), it returns `409` `payroll_calculation_changed` without stamping: review it again. Without `confirmation_token` it stamps the receipt it calculates at that moment, as before.

`warnings` says what the receipt doesn't include, without preventing stamping: `finiquito_not_included` when the employee left within the period (the receipt pays their days worked, not their severance, which is stamped with [your system's route](#extraordinary-payroll)), `absences_over_monthly_limit` when this receipt takes them past 7 absences in the month (the extra ones pay contributions as days worked), and `payroll_rates_pending` when less than a month is left before the loaded values stop applying (ISR, subsidy, minimum wage or UMA). It is also compared with the employee's previous ordinary receipt (same periodicity, within the last 75 days): `net_changed_vs_previous` when the net changes by 10% or more and at least $100 (the message says what changed), `salary_changed_vs_previous` when their integrated daily salary changed (file the salary change with the IMSS) and `low_net` when deductions leave them less than 30% of their earnings.

`isr.tariff` is the tariff's ISR, `isr.subsidy` the employment subsidy they're entitled to and `isr.withheld` what's withheld from them. The period is in Mexico City time; `payment_date` (the payment date) is its last day if you don't send it, and `days` are all the payable days of the period (without those before they started or after they left) less their absences and disability. Send `days` to pay other days.

`explanation` says how each ISR, employment subsidy and IMSS line was calculated, with the receipt's own figures: `id` (`isr`, `subsidio`, `isr_ajuste` when the receipt reverses the month's subsidy, and one per employee IMSS quota: `imss_eym_excedente`, `imss_eym_dinero`, `imss_gmp`, `imss_iv`, `imss_cv`), `amount`, `summary`, `steps` (the base, the row of the article 96 LISR tariff with its lower limit, fixed fee and rate, or the quota's rate and the days it accrues, and the arithmetic in `formula`; the last step is the amount) and `law`, the article behind each figure (`ref`, like `LISR art. 96` or `LSS art. 168 fr. II inciso b)`, and `says`). The texts are in Spanish. It's saved with the receipt when stamped: in the app it's **Cómo se calculó** in **Emitir recibos** and in the employee portal, and in the MCP `calculo_recibo_nomina` and the `explicacion` of `preparar_recibo_nomina`.

If the employee was absent or had an IMSS disability certificate, send `absences` and `disability_days`, in whole days: they aren't paid and they change the IMSS contributions. Contributions are calculated on the calendar days of the period (they accrue per calendar month, article 39 of the Ley del Seguro Social), not on the days paid: a fortnight from the 16th to the 31st contributes 16 days and one from 16 to 28 February 13, though both pay 15. `imss_days` says how many: `calendar_days` the calendar days they worked, `sickness_and_maternity` those of enfermedades y maternidad (the period less the disability: absences still contribute there, article 31 section I) and `disability_and_old_age` those of invalidez y vida and cesantía en edad avanzada y vejez (also less the absences, up to 7 a month). Disability days carry no employee contributions (article 31 section IV). For absences of eight days in a row or more, the employer stops contributing only by filing the aviso de baja (article 37): give the employee their `end_date`.

### Incidents

`incidents` adds what the period pays besides the days, like the **Incidencias** column of Nómina › Emitir recibos. Fiscalisto calculates each amount, its exempt part (article 93 of the Ley del ISR) and the ISR with the salary:

```json
{
  "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
  "period": { "start": "2026-10-01", "end": "2026-10-15" },
  "incidents": {
    "double_hours": 4,
    "sundays": 1,
    "holidays_worked": 1,
    "vacation_days": 2,
    "bonuses": [{ "type": "010", "amount": 500 }]
  }
}
```

- `double_hours` and `triple_hours`: whole overtime hours, at the daily salary divided by the workday's hours (8 day shift, 7 night, 7.5 mixed). Doubles are up to 9 a week in 2026 and 2027, 10 in 2028, 11 in 2029 and 12 from 2030 (article 66 of the Ley Federal del Trabajo); more answers `422` and the rest go as triples. Half of the doubles is exempt, up to 5 UMA a week (all of them on the minimum wage); triples are taxed. Perception `019` carries its `overtime` (days, `hours_type` `01` doubles or `02` triples, hours and amount); send `overtime_days` if it wasn't one per 3 hours.
- `sundays`: prima dominical of 25% of the daily salary per Sunday (perception `020`), exempt up to 1 UMA per Sunday.
- `rest_days_worked` and `holidays_worked`: weekly rest days worked without another in their place (LFT article 73, perception `054`) and mandatory rest days worked (articles 74 and 75, perception `055`): double salary for each, on top of the day already in `days`. Half is exempt together with the double overtime hours, up to 5 UMA a week for all of them (all of it on the minimum wage).
- `vacation_days`: vacation days within `days`; adds their prima vacacional (perception `021`) at the employee's rate, exempt up to 15 UMA a year less what their earlier receipts of the year exempted.
- `bonuses`: `010` punctuality bonus, `049` attendance bonus, `028` commissions and `038` other bonus, with their `amount` and an optional `concept`. They are taxed.
- `disability_pay`: if the employer pays the receipt's `disability_days` on top of the IMSS subsidio, its `type` (c_TipoIncapacidad: `01` riesgo de trabajo, `02` general illness, `03` maternity, `04` leave to care for children with cancer) and its `rate`, the fraction of the daily salary it pays (`1` all of it; `0.4` what completes the IMSS's 60%). It goes as subsidio por incapacidad (perception `014`) with its `Incapacidad` node. It's exempt as previsión social within the 7 UMA a year limit of article 93 of the LISR, together with the vales de despensa; a riesgo de trabajo's, in full.
- `retroactive`: the back pay of a raise in force since before the period. Change the employee's salary to the new one first and send `from` (the day it applies from, up to a year before the period), `previous_salary` (the daily salary before it) and, optionally, `days` (the days paid at the previous salary; by default those of the periods since `from`). It pays the difference for those days as perception `001` with key `RET` («Sueldo retroactivo»), taxed, which pays ISR with the period's salary (LISR article 96). It doesn't withhold the IMSS quotas of the difference (LSS article 38): file the salary change with its date and the SUA computes them.

Send the same `incidents` when stamping it: the receipt's `confirmation_token` includes them.

### Net to gross

To pay a fixed net, `POST /v1/payroll/net_to_gross` finds the daily salary whose ordinary receipt for a whole period pays at least that `net` (rounded up to the cent), with today's ISR and IMSS, like **Calcular desde el neto** on each employee in the app. With `employee` it takes their periodicity, zone, benefits (Christmas bonus, vacation premium, seniority, pantry vouchers and savings fund) and their SDI ÷ salary; without it, send `periodicity` and, optionally, `border_zone`, `start_date`, `aguinaldo_days`, `vacation_premium`, `pantry_vouchers` and `savings_fund_rate` (otherwise, the law's benefits). It doesn't count absences, incidents or deductions like Infonavit or loans, and it saves nothing: to use it, update the employee with `daily_salary` and `integrated_daily_salary`. If the net is less than what the minimum wage pays, it answers `400` with `param` `net`.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll/net_to_gross \
  -H "Authorization: Bearer $FISCALISTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "net": 8000 }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const netToGross = await fiscalisto.payrollReceipts.netToGross({
  employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  net: 8000,
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

net_to_gross = fiscalisto.payroll_receipts.net_to_gross({
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "net": 8000,
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$netToGross = $fiscalisto->payrollReceipts->netToGross([
    'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'net' => 8000,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	netToGross, err := client.PayrollReceipts.NetToGross(ctx, &fiscalisto.NetToGrossParams{
		Employee: fiscalisto.String("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"),
		Net:      8000,
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *netToGross)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.NetToGrossParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var netToGross = fiscalisto.payrollReceipts().netToGross(new NetToGrossParams()
        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setNet(8000));
System.out.println(netToGross);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var netToGross = await fiscalisto.PayrollReceipts.NetToGrossAsync(new NetToGrossParams
{
    Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Net = 8000,
});
```

```json
{
  "object": "net_to_gross",
  "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  "periodicity": "04",
  "net_requested": 8000,
  "daily_salary": 620.46,
  "integrated_daily_salary": 652.79,
  "period": { "start": "2026-11-16", "end": "2026-11-30" },
  "days": 15,
  "perceptions": 9306.9,
  "deductions": 1306.82,
  "taxes_withheld": 1056.21,
  "other_payments": 0,
  "net": 8000.08
}
```

### Salary raise

`POST /v1/employee_raises` gives several employees a raise at once, like **Aumento de sueldo** in Nómina › Empleados: `percent` (5 is 5%), `amount` (pesos more per day) or `daily_salary` (one new salary for everyone), only one of them. Without `employees`, everyone who works on `effective_date` (today or earlier; today by default). Each employee keeps their integration factor, and their new SDI is recorded as a salary modification on that date in the [IMSS movements](#imss-movements), to be filed by `imss_deadline` (5 business days). If any of them can't take it (it isn't a raise, it falls below the minimum wage, they didn't work that day), it answers `400` and changes no one; with `"dry_run": true` it answers how each one would end up, with their `error`, without saving. Periods already stamped since `effective_date` are paid with the retroactive pay in the incidents.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/employee_raises \
  -H "Authorization: Bearer $FISCALISTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "percent": 5, "effective_date": "2026-11-16" }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const employeeRaise = await fiscalisto.employees.giveRaise({ percent: 5, effective_date: "2026-11-16" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

employee_raise = fiscalisto.employees.give_raise({"percent": 5, "effective_date": "2026-11-16"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$employeeRaise = $fiscalisto->employees->giveRaise([
    'percent' => 5,
    'effective_date' => '2026-11-16',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	employeeRaise, err := client.Employees.GiveRaise(ctx, &fiscalisto.CreateEmployeeRaiseParams{
		Percent:       fiscalisto.Float64(5),
		EffectiveDate: fiscalisto.String("2026-11-16"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *employeeRaise)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateEmployeeRaiseParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeRaise = fiscalisto.employees().giveRaise(new CreateEmployeeRaiseParams()
        .setPercent(5)
        .setEffectiveDate("2026-11-16"));
System.out.println(employeeRaise);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeRaise = await fiscalisto.Employees.GiveRaiseAsync(new CreateEmployeeRaiseParams
{
    Percent = 5,
    EffectiveDate = "2026-11-16",
});
```

```json
{
  "object": "employee_raise",
  "applied": true,
  "effective_date": "2026-11-16",
  "imss_deadline": "2026-11-23",
  "employees": [
    {
      "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "name": "ANA LÓPEZ PÉREZ",
      "daily_salary_before": 400,
      "daily_salary": 420,
      "integrated_daily_salary_before": 418.36,
      "integrated_daily_salary": 439.28,
      "error": null
    }
  ]
}
```

## Payroll approval

If the issuer requires the payroll run (prenómina) to be approved before stamping (in the app, **Ajustes › Aprobaciones › Prenómina**), its receipts for a period are stamped only after a person approves that run. `POST /v1/payroll_approvals` sends it for approval with the `period` and each employee's `receipts` (`employee`, plus `days`, `absences`, `disability_days` and `incidents` as in `POST /v1/payroll_receipts`). Fiscalisto calculates each receipt as it would stamp it, keeps its amounts in `totals`, replaces any earlier request for the same period and notifies who can approve it. A person approves or rejects it in Nómina › Emitir recibos, or with Claude or ChatGPT (`aprobacion_prenomina`): an API key can't give the OK. If the company set up approval steps for the payroll run (**Ajustes › Aprobaciones › Pasos de aprobación de la prenómina**), it goes through each in order: while it waits, `step` says which one it is at (`number`, `of` and `name`). A step that approves by itself leaves it `approved` when requested, with the step in `note`.

While it isn't approved (`status` `pending` or `rejected`, with the reason in `note`), `POST /v1/payroll_receipts` and the receipts of `POST /v1/payroll_batches` for that period answer `409` `payroll_approval_required` and stamp nothing. Once approved, only the receipts in it with the same amounts and payment date are stamped; if something changed, request it again. `GET /v1/payroll_approvals/{id}` and `GET /v1/payroll_approvals` (with `status`) read it, and `POST /v1/payroll_approvals/{id}/cancel` withdraws one that is waiting. Corrections with `replaces` and receipts your system calculated (`/external`) don't need it.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_approvals \
  -H "Authorization: Bearer $FISCALISTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "period": { "start": "2026-11-16", "end": "2026-11-30" }, "receipts": [{ "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "days": 15 }] }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollApproval = await fiscalisto.payrollApprovals.create({
  period: { start: "2026-11-16", end: "2026-11-30" },
  receipts: [
    {
      employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      days: 15,
    },
  ],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_approval = fiscalisto.payroll_approvals.create({
    "period": {"start": "2026-11-16", "end": "2026-11-30"},
    "receipts": [
        {
            "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
            "days": 15,
        },
    ],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollApproval = $fiscalisto->payrollApprovals->create([
    'period' => [
        'start' => '2026-11-16',
        'end' => '2026-11-30',
    ],
    'receipts' => [
        [
            'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
            'days' => 15,
        ],
    ],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollApproval, err := client.PayrollApprovals.Create(ctx, &fiscalisto.CreatePayrollApprovalParams{
		Period: fiscalisto.CreatePayrollApprovalParamsPeriod{
			Start: "2026-11-16",
			End:   "2026-11-30",
		},
		Receipts: []fiscalisto.CreatePayrollApprovalParamsReceipt{
			{
				Employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
				Days:     fiscalisto.Float64(15),
			},
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payrollApproval.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreatePayrollApprovalParams;
import com.fiscalisto.model.CreatePayrollApprovalParamsPeriod;
import com.fiscalisto.model.CreatePayrollApprovalParamsReceipt;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollApproval = fiscalisto.payrollApprovals().create(new CreatePayrollApprovalParams()
        .setPeriod(new CreatePayrollApprovalParamsPeriod()
                .setStart("2026-11-16")
                .setEnd("2026-11-30"))
        .setReceipts(List.of(
                new CreatePayrollApprovalParamsReceipt()
                        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
                        .setDays(15)
        )));
System.out.println(payrollApproval.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollApproval = await fiscalisto.PayrollApprovals.CreateAsync(new CreatePayrollApprovalParams
{
    Period = new() { Start = "2026-11-16", End = "2026-11-30" },
    Receipts = new()
    {
        new()
        {
            Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
            Days = 15,
        },
    },
});
```

```json
{
  "id": "pap_OufpKqnrvx9p7Hq2LmN4pXs8VbT1cZeR0a",
  "object": "payroll_approval",
  "status": "pending",
  "periodicity": "04",
  "period": { "start": "2026-11-16", "end": "2026-11-30", "payment_date": "2026-11-30" },
  "net": 8000.08,
  "receipts": [
    {
      "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "name": "ANA LÓPEZ PÉREZ",
      "days": 15,
      "totals": { "perceptions": 9306.9, "deductions": 1306.82, "other_payments": 0, "taxes_withheld": 1056.21, "net": 8000.08 }
    }
  ],
  "step": { "number": 1, "of": 2, "name": "Recursos Humanos" }
}
```

## Stamp it

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_receipts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nomina-2026-10-q1-9" \
  -d '{
    "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    "period": { "start": "2026-10-01", "end": "2026-10-15" },
    "confirmation_token": "9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e",
    "send_email": true,
    "metadata": { "corrida": "2026-19" }
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const invoice = await fiscalisto.payrollReceipts.create({
  employee: "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
  period: { start: "2026-10-01", end: "2026-10-15" },
  confirmation_token: "9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e",
  send_email: true,
  metadata: { corrida: "2026-19" },
}, { idempotencyKey: "nomina-2026-10-q1-9" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

invoice = fiscalisto.payroll_receipts.create({
    "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    "period": {"start": "2026-10-01", "end": "2026-10-15"},
    "confirmation_token": "9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e",
    "send_email": True,
    "metadata": {"corrida": "2026-19"},
}, idempotency_key="nomina-2026-10-q1-9")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$invoice = $fiscalisto->payrollReceipts->create([
    'employee' => 'emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr',
    'period' => [
        'start' => '2026-10-01',
        'end' => '2026-10-15',
    ],
    'confirmation_token' => '9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e',
    'send_email' => true,
    'metadata' => ['corrida' => '2026-19'],
], ['idempotency_key' => 'nomina-2026-10-q1-9']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	invoice, err := client.PayrollReceipts.Create(ctx, &fiscalisto.CreatePayrollReceiptParams{
		Employee: "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
		Period: fiscalisto.CreatePayrollReceiptParamsPeriod{
			Start: "2026-10-01",
			End:   "2026-10-15",
		},
		ConfirmationToken: fiscalisto.String("9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e"),
		SendEmail:         fiscalisto.Bool(true),
		Metadata:          map[string]string{"corrida": "2026-19"},
	}, fiscalisto.WithIdempotencyKey("nomina-2026-10-q1-9"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(invoice.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreatePayrollReceiptParams;
import com.fiscalisto.model.CreatePayrollReceiptParamsPeriod;
import java.util.Map;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var invoice = fiscalisto.payrollReceipts().create(new CreatePayrollReceiptParams()
        .setEmployee("emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr")
        .setPeriod(new CreatePayrollReceiptParamsPeriod()
                .setStart("2026-10-01")
                .setEnd("2026-10-15"))
        .setConfirmationToken("9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e")
        .setSendEmail(true)
        .setMetadata(Map.of("corrida", "2026-19")), RequestOptions.idempotencyKey("nomina-2026-10-q1-9"));
System.out.println(invoice.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var invoice = await fiscalisto.PayrollReceipts.CreateAsync(new CreatePayrollReceiptParams
{
    Employee = "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    Period = new() { Start = "2026-10-01", End = "2026-10-15" },
    ConfirmationToken = "9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e",
    SendEmail = true,
    Metadata = new() { ["corrida"] = "2026-19" },
}, new RequestOptions { IdempotencyKey = "nomina-2026-10-q1-9" });
```

The response is an [invoice](https://fiscalisto.com/en/docs/api/facturas) of `type: "N"` with its `uuid`, PDF and XML, and with the receipt in `payroll` (`calculation: "fiscalisto"`):

```json
{
  "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg",
  "object": "invoice",
  "type": "N",
  "status": "valid",
  "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718",
  "customer": { "tax_id": "MASO451221PM4", "legal_name": "MARIA OLIVIA MARTINEZ SAGAZ", "tax_system": "605", "zip": "80290" },
  "use": "CN01",
  "payment_method": "PUE",
  "items": [
    { "description": "Pago de nómina", "product_key": "84111505", "unit_key": "ACT", "quantity": 1, "unit_price": 4800, "discount": 200.06 }
  ],
  "subtotal": 4800,
  "discount": 200.06,
  "total": 4599.94,
  "payroll": {
    "type": "O",
    "calculation": "fiscalisto",
    "periodicity": "04",
    "period": { "start": "2026-10-01", "end": "2026-10-15", "payment_date": "2026-10-15" },
    "days": 15,
    "perceptions": [{ "type": "001", "key": "001", "concept": "Sueldo", "taxed": 4800, "exempt": 0 }],
    "deductions": [
      { "type": "001", "key": "001", "concept": "Cuotas IMSS", "amount": 119.21 },
      { "type": "002", "key": "002", "concept": "ISR", "amount": 80.85 }
    ],
    "totals": { "perceptions": 4800, "deductions": 200.06, "other_payments": 0, "net": 4599.94 }
  },
  "metadata": { "corrida": "2026-19" }
}
```

The `invoice.stamped` webhook also arrives. With `send_email` the employee gets the PDF and the XML at their `email`; if they have none, it returns `400` `parameter_missing` before stamping.

An employee has only one receipt per period: requesting it again (even with another `Idempotency-Key`) returns the one they already have, without stamping another. A period that overlaps another current receipt of the same employee, or longer than their periodicity (a month on a weekly payroll), returns `payroll_invalid`, so the same days aren't paid twice.

### At the change of year

The minimum wage and the employment subsidy change every January 1, the ISR tariff can change that day and the UMA changes every February 1. Fiscalisto calculates with the published values it has loaded: a receipt paid after the date they apply until returns `422` `payroll_invalid` saying what's missing, until the new ones are loaded. If you need them sooner, stamp those receipts with [your system's route](#stamp-the-payroll-your-system-calculated).

## Correct a receipt

A stamped receipt isn't edited: it's replaced. Correct the employee (for example their periodicity, with [`POST /v1/employees/{id}`](https://fiscalisto.com/en/docs/api/referencia/nomina/update-employee)) and send `POST /v1/payroll_receipts` with `replaces` and the id (`inv_…`) or UUID of the valid receipt. Fiscalisto calculates the receipt from the employee as they are now, stamps it related with `04` and cancels the old one with motive `01` (it doesn't need the employee's acceptance). The response has `substitutes` with `canceled`, like an [external receipt's](#correct-or-repeat-an-external-receipt). The period can be another one that crosses the old one's, like a quincena instead of the week paid by mistake. `replaces` also goes in `POST /v1/payroll_receipts/preview`, and its `confirmation_token` is good only for that replacement. It only takes a valid receipt Fiscalisto calculated for the same employee and without viáticos; otherwise, `422` `payroll_invalid`.

You can also cancel it with [`POST /v1/invoices/{id}/cancel`](https://fiscalisto.com/en/docs/api/cancelacion) and stamp the period again: a period whose receipt was cancelled can be stamped again, but the two receipts aren't related. A receipt your system calculated is corrected by [replacing it](#correct-or-repeat-an-external-receipt).

## List them

Receipts are type N invoices: [`GET /v1/invoices?type=N`](https://fiscalisto.com/en/docs/api/referencia/facturas/list-invoices) gives them, newest first, and [`GET /v1/employees`](https://fiscalisto.com/en/docs/api/referencia/nomina/list-employees) the employees.

## Christmas bonus, profit sharing and severance

`POST /v1/payroll_receipts/extraordinary` calculates and stamps an extraordinary payroll receipt (`TipoNomina` `E`, periodicity `99`) for an employee (`emp_…`), like **Nómina › Aguinaldo, PTU y finiquitos**. `kind` says which:

| `kind` | What it pays | Exempt |
| --- | --- | --- |
| `aguinaldo` | The employee's yearly aguinaldo days (at least 15) in proportion to the days worked in `year`, at their daily salary. `days_worked` changes those days. | 30 UMA |
| `ptu` | `ptu_amount`, their share of the profit sharing (half by days worked and half by salary, capped at three months of salary). | 15 UMA |
| `finiquito` | At the last day worked (the employee's `end_date`): proportional aguinaldo, vacation and vacation premium, less what was already paid in the year, plus the vacation days from past years not taken and not prescribed (`vacation_days_owed`; by default, those of their [vacation control](#each-employees-vacations)). With `exit_reason: "dismissal"`, the 3-month indemnity on the integrated salary, with `twenty_days_per_year` 20 days per year, and the seniority premium; with `"worker_rescission"` (the worker rescinds, LFT art. 51) the 3 months, the 20 days per year and the premium; with `"justified_dismissal"` (LFT art. 47) and `"death"` only the seniority premium, and with `"resignation"` the premium only after 15 years or more. Separation payments carry the `SeparacionIndemnizacion` node. | 90 UMA per year of service on the indemnity |

The ISR on the taxable part of an aguinaldo or profit sharing is calculated both ways the law allows (added to the month's salary, LISR article 96, or with article 174 of its Regulations) and the lower one is withheld, unless you ask for one with `isr_method`. The days of the last period of someone leaving are paid in their ordinary receipt, not in the severance.

The taxable part (without indemnities or the seniority premium) counts as the month's income for the subsidio para el empleo limit, as the decree says. If it takes the month past the limit and other receipts of the month already applied subsidio, the receipt carries the adjustment: deduction `107`, the ISR that subsidio spared as deduction `002`, and other payment `007`. Ordinary receipts stamped later in the month count it too.

Review it first with `POST /v1/payroll_receipts/extraordinary/preview`, which returns what it pays (`lines`), the ISR both ways and the net, and a `confirmation_token` that stamps exactly that receipt:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_receipts/extraordinary/preview \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    "kind": "aguinaldo",
    "payment_date": "2026-12-18"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const extraordinaryPayrollReceiptPreview = await fiscalisto.payrollReceipts.previewExtraordinary({
  employee: "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
  kind: "aguinaldo",
  payment_date: "2026-12-18",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

extraordinary_payroll_receipt_preview = fiscalisto.payroll_receipts.preview_extraordinary({
    "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    "kind": "aguinaldo",
    "payment_date": "2026-12-18",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$extraordinaryPayrollReceiptPreview = $fiscalisto->payrollReceipts->previewExtraordinary([
    'employee' => 'emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr',
    'kind' => 'aguinaldo',
    'payment_date' => '2026-12-18',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	extraordinaryPayrollReceiptPreview, err := client.PayrollReceipts.PreviewExtraordinary(ctx, &fiscalisto.PreviewExtraordinaryPayrollReceiptParams{
		Employee:    "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
		Kind:        "aguinaldo",
		PaymentDate: "2026-12-18",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *extraordinaryPayrollReceiptPreview)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.PreviewExtraordinaryPayrollReceiptParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var extraordinaryPayrollReceiptPreview = fiscalisto.payrollReceipts().previewExtraordinary(new PreviewExtraordinaryPayrollReceiptParams()
        .setEmployee("emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr")
        .setKind("aguinaldo")
        .setPaymentDate("2026-12-18"));
System.out.println(extraordinaryPayrollReceiptPreview);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var extraordinaryPayrollReceiptPreview = await fiscalisto.PayrollReceipts.PreviewExtraordinaryAsync(new PreviewExtraordinaryPayrollReceiptParams
{
    Employee = "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
    Kind = "aguinaldo",
    PaymentDate = "2026-12-18",
});
```

There is one receipt per employee, kind and year (severance, per exit date): asking again returns the same one, and a canceled one can be issued again. To correct it, cancel it and stamp it again.

## Stamp the payroll your system calculated

If your payroll system already calculated the receipt, send it to `POST /v1/payroll_receipts/external` and Fiscalisto stamps it **exactly as it comes**: each perception, deduction and other payment with its amounts, without recalculating ISR or IMSS, without rounding, without adding or removing items. What it does do is validate it against SAT's standard before stamping, and if something fails it rejects it saying which field to correct.

The employee goes in full in the request, with your system's data: it doesn't use or change the employees (`emp_…`) you have in Fiscalisto.

### Review it without stamping

With the same body as [to stamp it](#stamp-your-systems-receipt), `POST /v1/payroll_receipts/external/preview` runs every check without stamping or using timbres:

```bash
curl https://api.fiscalisto.com/v1/payroll_receipts/external/preview \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d @recibo.json
```

Returns the receipt as it would be stamped (`payroll`, `subtotal`, `discount` and `total`), the warnings in `warnings` and the unsealed XML in `unsigned_xml`, with the amounts you sent. In the SDKs it's `payrollReceipts.previewExternal`.

### Stamp your system's receipt

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_receipts/external \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nomina-2026-Q19-123" \
  -d '{
    "type": "O",
    "periodicity": "04",
    "period": {
      "start": "2026-10-01",
      "end": "2026-10-15",
      "payment_date": "2026-10-15"
    },
    "days": 15,
    "employee": {
      "tax_id": "MASO451221PM4",
      "name": "MARIA OLIVIA MARTINEZ SAGAZ",
      "zip": "80290",
      "curp": "MASO451221MSLRGL08",
      "number": "123",
      "social_security_number": "12345678903",
      "start_date": "2024-03-04",
      "contract_type": "01",
      "regime_type": "02",
      "unionized": false,
      "workday_type": "01",
      "risk_class": "1",
      "department": "Ventas",
      "position": "Ejecutiva de cuenta",
      "contribution_base_salary": 525.4,
      "integrated_daily_salary": 525.4,
      "state": "SIN",
      "bank_account": "002180700601234561"
    },
    "perceptions": [
      {
        "type": "001",
        "key": "SUELDO",
        "concept": "Sueldo",
        "taxed": 7500,
        "exempt": 0
      },
      {
        "type": "019",
        "key": "HEXTRA",
        "concept": "Horas extra dobles",
        "taxed": 450,
        "exempt": 450,
        "overtime": [
          {
            "days": 2,
            "hours_type": "01",
            "hours": 6,
            "amount_paid": 900
          }
        ]
      },
      {
        "type": "028",
        "key": "COMISION",
        "concept": "Comisiones de octubre",
        "taxed": 1200,
        "exempt": 0
      }
    ],
    "deductions": [
      {
        "type": "001",
        "key": "IMSS",
        "concept": "Cuotas obreras IMSS",
        "amount": 260.15
      },
      {
        "type": "002",
        "key": "ISR",
        "concept": "ISR",
        "amount": 1203.72
      },
      {
        "type": "010",
        "key": "INFONAVIT",
        "concept": "Crédito Infonavit",
        "amount": 950
      },
      {
        "type": "004",
        "key": "PRESTAMO",
        "concept": "Préstamo personal",
        "amount": 500
      }
    ],
    "other_payments": [
      {
        "type": "002",
        "key": "SUBSIDIO",
        "concept": "Subsidio para el empleo",
        "amount": 0,
        "subsidy_caused": 0
      }
    ],
    "totals": {
      "perceptions": 9600,
      "deductions": 2913.87,
      "other_payments": 0,
      "net": 6686.13
    },
    "references": {
      "employee_id": "nom-000123",
      "payroll_run_id": "2026-Q19"
    },
    "send_email": false,
    "metadata": {
      "corrida": "2026-Q19"
    }
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const invoice = await fiscalisto.payrollReceipts.createExternal({
  type: "O",
  periodicity: "04",
  period: {
    start: "2026-10-01",
    end: "2026-10-15",
    payment_date: "2026-10-15",
  },
  days: 15,
  employee: {
    tax_id: "MASO451221PM4",
    name: "MARIA OLIVIA MARTINEZ SAGAZ",
    zip: "80290",
    curp: "MASO451221MSLRGL08",
    number: "123",
    social_security_number: "12345678903",
    start_date: "2024-03-04",
    contract_type: "01",
    regime_type: "02",
    unionized: false,
    workday_type: "01",
    risk_class: "1",
    department: "Ventas",
    position: "Ejecutiva de cuenta",
    contribution_base_salary: 525.4,
    integrated_daily_salary: 525.4,
    state: "SIN",
    bank_account: "002180700601234561",
  },
  perceptions: [
    {
      type: "001",
      key: "SUELDO",
      concept: "Sueldo",
      taxed: 7500,
      exempt: 0,
    },
    {
      type: "019",
      key: "HEXTRA",
      concept: "Horas extra dobles",
      taxed: 450,
      exempt: 450,
      overtime: [
        {
          days: 2,
          hours_type: "01",
          hours: 6,
          amount_paid: 900,
        },
      ],
    },
    {
      type: "028",
      key: "COMISION",
      concept: "Comisiones de octubre",
      taxed: 1200,
      exempt: 0,
    },
  ],
  deductions: [
    {
      type: "001",
      key: "IMSS",
      concept: "Cuotas obreras IMSS",
      amount: 260.15,
    },
    {
      type: "002",
      key: "ISR",
      concept: "ISR",
      amount: 1203.72,
    },
    {
      type: "010",
      key: "INFONAVIT",
      concept: "Crédito Infonavit",
      amount: 950,
    },
    {
      type: "004",
      key: "PRESTAMO",
      concept: "Préstamo personal",
      amount: 500,
    },
  ],
  other_payments: [
    {
      type: "002",
      key: "SUBSIDIO",
      concept: "Subsidio para el empleo",
      amount: 0,
      subsidy_caused: 0,
    },
  ],
  totals: {
    perceptions: 9600,
    deductions: 2913.87,
    other_payments: 0,
    net: 6686.13,
  },
  references: {
    employee_id: "nom-000123",
    payroll_run_id: "2026-Q19",
  },
  send_email: false,
  metadata: { corrida: "2026-Q19" },
}, { idempotencyKey: "nomina-2026-Q19-123" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

invoice = fiscalisto.payroll_receipts.create_external({
    "type": "O",
    "periodicity": "04",
    "period": {
        "start": "2026-10-01",
        "end": "2026-10-15",
        "payment_date": "2026-10-15",
    },
    "days": 15,
    "employee": {
        "tax_id": "MASO451221PM4",
        "name": "MARIA OLIVIA MARTINEZ SAGAZ",
        "zip": "80290",
        "curp": "MASO451221MSLRGL08",
        "number": "123",
        "social_security_number": "12345678903",
        "start_date": "2024-03-04",
        "contract_type": "01",
        "regime_type": "02",
        "unionized": False,
        "workday_type": "01",
        "risk_class": "1",
        "department": "Ventas",
        "position": "Ejecutiva de cuenta",
        "contribution_base_salary": 525.4,
        "integrated_daily_salary": 525.4,
        "state": "SIN",
        "bank_account": "002180700601234561",
    },
    "perceptions": [
        {
            "type": "001",
            "key": "SUELDO",
            "concept": "Sueldo",
            "taxed": 7500,
            "exempt": 0,
        },
        {
            "type": "019",
            "key": "HEXTRA",
            "concept": "Horas extra dobles",
            "taxed": 450,
            "exempt": 450,
            "overtime": [
                {
                    "days": 2,
                    "hours_type": "01",
                    "hours": 6,
                    "amount_paid": 900,
                },
            ],
        },
        {
            "type": "028",
            "key": "COMISION",
            "concept": "Comisiones de octubre",
            "taxed": 1200,
            "exempt": 0,
        },
    ],
    "deductions": [
        {
            "type": "001",
            "key": "IMSS",
            "concept": "Cuotas obreras IMSS",
            "amount": 260.15,
        },
        {
            "type": "002",
            "key": "ISR",
            "concept": "ISR",
            "amount": 1203.72,
        },
        {
            "type": "010",
            "key": "INFONAVIT",
            "concept": "Crédito Infonavit",
            "amount": 950,
        },
        {
            "type": "004",
            "key": "PRESTAMO",
            "concept": "Préstamo personal",
            "amount": 500,
        },
    ],
    "other_payments": [
        {
            "type": "002",
            "key": "SUBSIDIO",
            "concept": "Subsidio para el empleo",
            "amount": 0,
            "subsidy_caused": 0,
        },
    ],
    "totals": {
        "perceptions": 9600,
        "deductions": 2913.87,
        "other_payments": 0,
        "net": 6686.13,
    },
    "references": {
        "employee_id": "nom-000123",
        "payroll_run_id": "2026-Q19",
    },
    "send_email": False,
    "metadata": {"corrida": "2026-Q19"},
}, idempotency_key="nomina-2026-Q19-123")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$invoice = $fiscalisto->payrollReceipts->createExternal([
    'type' => 'O',
    'periodicity' => '04',
    'period' => [
        'start' => '2026-10-01',
        'end' => '2026-10-15',
        'payment_date' => '2026-10-15',
    ],
    'days' => 15,
    'employee' => [
        'tax_id' => 'MASO451221PM4',
        'name' => 'MARIA OLIVIA MARTINEZ SAGAZ',
        'zip' => '80290',
        'curp' => 'MASO451221MSLRGL08',
        'number' => '123',
        'social_security_number' => '12345678903',
        'start_date' => '2024-03-04',
        'contract_type' => '01',
        'regime_type' => '02',
        'unionized' => false,
        'workday_type' => '01',
        'risk_class' => '1',
        'department' => 'Ventas',
        'position' => 'Ejecutiva de cuenta',
        'contribution_base_salary' => 525.4,
        'integrated_daily_salary' => 525.4,
        'state' => 'SIN',
        'bank_account' => '002180700601234561',
    ],
    'perceptions' => [
        [
            'type' => '001',
            'key' => 'SUELDO',
            'concept' => 'Sueldo',
            'taxed' => 7500,
            'exempt' => 0,
        ],
        [
            'type' => '019',
            'key' => 'HEXTRA',
            'concept' => 'Horas extra dobles',
            'taxed' => 450,
            'exempt' => 450,
            'overtime' => [
                [
                    'days' => 2,
                    'hours_type' => '01',
                    'hours' => 6,
                    'amount_paid' => 900,
                ],
            ],
        ],
        [
            'type' => '028',
            'key' => 'COMISION',
            'concept' => 'Comisiones de octubre',
            'taxed' => 1200,
            'exempt' => 0,
        ],
    ],
    'deductions' => [
        [
            'type' => '001',
            'key' => 'IMSS',
            'concept' => 'Cuotas obreras IMSS',
            'amount' => 260.15,
        ],
        [
            'type' => '002',
            'key' => 'ISR',
            'concept' => 'ISR',
            'amount' => 1203.72,
        ],
        [
            'type' => '010',
            'key' => 'INFONAVIT',
            'concept' => 'Crédito Infonavit',
            'amount' => 950,
        ],
        [
            'type' => '004',
            'key' => 'PRESTAMO',
            'concept' => 'Préstamo personal',
            'amount' => 500,
        ],
    ],
    'other_payments' => [
        [
            'type' => '002',
            'key' => 'SUBSIDIO',
            'concept' => 'Subsidio para el empleo',
            'amount' => 0,
            'subsidy_caused' => 0,
        ],
    ],
    'totals' => [
        'perceptions' => 9600,
        'deductions' => 2913.87,
        'other_payments' => 0,
        'net' => 6686.13,
    ],
    'references' => [
        'employee_id' => 'nom-000123',
        'payroll_run_id' => '2026-Q19',
    ],
    'send_email' => false,
    'metadata' => ['corrida' => '2026-Q19'],
], ['idempotency_key' => 'nomina-2026-Q19-123']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	invoice, err := client.PayrollReceipts.CreateExternal(ctx, &fiscalisto.ExternalPayrollReceiptCreate{
		Type:        "O",
		Periodicity: "04",
		Period: fiscalisto.ExternalPayrollReceiptCreatePeriod{
			Start:       "2026-10-01",
			End:         "2026-10-15",
			PaymentDate: "2026-10-15",
		},
		Days: 15,
		Employee: fiscalisto.ExternalPayrollReceiptCreateEmployee{
			TaxID:                  "MASO451221PM4",
			Name:                   "MARIA OLIVIA MARTINEZ SAGAZ",
			Zip:                    "80290",
			CURP:                   "MASO451221MSLRGL08",
			Number:                 "123",
			SocialSecurityNumber:   fiscalisto.String("12345678903"),
			StartDate:              fiscalisto.String("2024-03-04"),
			ContractType:           "01",
			RegimeType:             "02",
			Unionized:              fiscalisto.Bool(false),
			WorkdayType:            fiscalisto.String("01"),
			RiskClass:              fiscalisto.String("1"),
			Department:             fiscalisto.String("Ventas"),
			Position:               fiscalisto.String("Ejecutiva de cuenta"),
			ContributionBaseSalary: fiscalisto.Float64(525.4),
			IntegratedDailySalary:  fiscalisto.Float64(525.4),
			State:                  "SIN",
			BankAccount:            fiscalisto.String("002180700601234561"),
		},
		Perceptions: []fiscalisto.ExternalPayrollReceiptCreatePerception{
			{
				Type:    "001",
				Key:     "SUELDO",
				Concept: "Sueldo",
				Taxed:   7500,
				Exempt:  0,
			},
			{
				Type:    "019",
				Key:     "HEXTRA",
				Concept: "Horas extra dobles",
				Taxed:   450,
				Exempt:  450,
				Overtime: []fiscalisto.ExternalPayrollReceiptCreatePerceptionOvertimeItem{
					{Days: 2, HoursType: "01", Hours: 6, AmountPaid: 900},
				},
			},
			{
				Type:    "028",
				Key:     "COMISION",
				Concept: "Comisiones de octubre",
				Taxed:   1200,
				Exempt:  0,
			},
		},
		Deductions: []fiscalisto.ExternalPayrollReceiptCreateDeduction{
			{
				Type:    "001",
				Key:     "IMSS",
				Concept: "Cuotas obreras IMSS",
				Amount:  260.15,
			},
			{
				Type:    "002",
				Key:     "ISR",
				Concept: "ISR",
				Amount:  1203.72,
			},
			{
				Type:    "010",
				Key:     "INFONAVIT",
				Concept: "Crédito Infonavit",
				Amount:  950,
			},
			{
				Type:    "004",
				Key:     "PRESTAMO",
				Concept: "Préstamo personal",
				Amount:  500,
			},
		},
		OtherPayments: []fiscalisto.ExternalPayrollReceiptCreateOtherPayment{
			{
				Type:          "002",
				Key:           "SUBSIDIO",
				Concept:       "Subsidio para el empleo",
				Amount:        0,
				SubsidyCaused: fiscalisto.Float64(0),
			},
		},
		Totals: fiscalisto.ExternalPayrollReceiptCreateTotals{
			Perceptions:   9600,
			Deductions:    2913.87,
			OtherPayments: 0,
			Net:           6686.13,
		},
		References: &fiscalisto.ExternalPayrollReceiptCreateReferences{
			EmployeeID:   fiscalisto.String("nom-000123"),
			PayrollRunID: fiscalisto.String("2026-Q19"),
		},
		SendEmail: fiscalisto.Bool(false),
		Metadata:  map[string]string{"corrida": "2026-Q19"},
	}, fiscalisto.WithIdempotencyKey("nomina-2026-Q19-123"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(invoice.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.ExternalPayrollReceiptCreate;
import com.fiscalisto.model.ExternalPayrollReceiptCreateDeduction;
import com.fiscalisto.model.ExternalPayrollReceiptCreateEmployee;
import com.fiscalisto.model.ExternalPayrollReceiptCreateOtherPayment;
import com.fiscalisto.model.ExternalPayrollReceiptCreatePerception;
import com.fiscalisto.model.ExternalPayrollReceiptCreatePerceptionOvertimeItem;
import com.fiscalisto.model.ExternalPayrollReceiptCreatePeriod;
import com.fiscalisto.model.ExternalPayrollReceiptCreateReferences;
import com.fiscalisto.model.ExternalPayrollReceiptCreateTotals;
import java.util.List;
import java.util.Map;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var invoice = fiscalisto.payrollReceipts().createExternal(new ExternalPayrollReceiptCreate()
        .setType("O")
        .setPeriodicity("04")
        .setPeriod(new ExternalPayrollReceiptCreatePeriod()
                .setStart("2026-10-01")
                .setEnd("2026-10-15")
                .setPaymentDate("2026-10-15"))
        .setDays(15)
        .setEmployee(new ExternalPayrollReceiptCreateEmployee()
                .setTaxId("MASO451221PM4")
                .setName("MARIA OLIVIA MARTINEZ SAGAZ")
                .setZip("80290")
                .setCurp("MASO451221MSLRGL08")
                .setNumber("123")
                .setSocialSecurityNumber("12345678903")
                .setStartDate("2024-03-04")
                .setContractType("01")
                .setRegimeType("02")
                .setUnionized(false)
                .setWorkdayType("01")
                .setRiskClass("1")
                .setDepartment("Ventas")
                .setPosition("Ejecutiva de cuenta")
                .setContributionBaseSalary(525.4)
                .setIntegratedDailySalary(525.4)
                .setState("SIN")
                .setBankAccount("002180700601234561"))
        .setPerceptions(List.of(
                new ExternalPayrollReceiptCreatePerception()
                        .setType("001")
                        .setKey("SUELDO")
                        .setConcept("Sueldo")
                        .setTaxed(7500)
                        .setExempt(0),
                new ExternalPayrollReceiptCreatePerception()
                        .setType("019")
                        .setKey("HEXTRA")
                        .setConcept("Horas extra dobles")
                        .setTaxed(450)
                        .setExempt(450)
                        .setOvertime(List.of(
                                new ExternalPayrollReceiptCreatePerceptionOvertimeItem()
                                        .setDays(2)
                                        .setHoursType("01")
                                        .setHours(6)
                                        .setAmountPaid(900)
                        )),
                new ExternalPayrollReceiptCreatePerception()
                        .setType("028")
                        .setKey("COMISION")
                        .setConcept("Comisiones de octubre")
                        .setTaxed(1200)
                        .setExempt(0)
        ))
        .setDeductions(List.of(
                new ExternalPayrollReceiptCreateDeduction()
                        .setType("001")
                        .setKey("IMSS")
                        .setConcept("Cuotas obreras IMSS")
                        .setAmount(260.15),
                new ExternalPayrollReceiptCreateDeduction()
                        .setType("002")
                        .setKey("ISR")
                        .setConcept("ISR")
                        .setAmount(1203.72),
                new ExternalPayrollReceiptCreateDeduction()
                        .setType("010")
                        .setKey("INFONAVIT")
                        .setConcept("Crédito Infonavit")
                        .setAmount(950),
                new ExternalPayrollReceiptCreateDeduction()
                        .setType("004")
                        .setKey("PRESTAMO")
                        .setConcept("Préstamo personal")
                        .setAmount(500)
        ))
        .setOtherPayments(List.of(
                new ExternalPayrollReceiptCreateOtherPayment()
                        .setType("002")
                        .setKey("SUBSIDIO")
                        .setConcept("Subsidio para el empleo")
                        .setAmount(0)
                        .setSubsidyCaused(0)
        ))
        .setTotals(new ExternalPayrollReceiptCreateTotals()
                .setPerceptions(9600)
                .setDeductions(2913.87)
                .setOtherPayments(0)
                .setNet(6686.13))
        .setReferences(new ExternalPayrollReceiptCreateReferences()
                .setEmployeeId("nom-000123")
                .setPayrollRunId("2026-Q19"))
        .setSendEmail(false)
        .setMetadata(Map.of("corrida", "2026-Q19")), RequestOptions.idempotencyKey("nomina-2026-Q19-123"));
System.out.println(invoice.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var invoice = await fiscalisto.PayrollReceipts.CreateExternalAsync(new ExternalPayrollReceiptCreate
{
    Type = "O",
    Periodicity = "04",
    Period = new()
    {
        Start = "2026-10-01",
        End = "2026-10-15",
        PaymentDate = "2026-10-15",
    },
    Days = 15,
    Employee = new()
    {
        TaxId = "MASO451221PM4",
        Name = "MARIA OLIVIA MARTINEZ SAGAZ",
        Zip = "80290",
        Curp = "MASO451221MSLRGL08",
        Number = "123",
        SocialSecurityNumber = "12345678903",
        StartDate = "2024-03-04",
        ContractType = "01",
        RegimeType = "02",
        Unionized = false,
        WorkdayType = "01",
        RiskClass = "1",
        Department = "Ventas",
        Position = "Ejecutiva de cuenta",
        ContributionBaseSalary = 525.4m,
        IntegratedDailySalary = 525.4m,
        State = "SIN",
        BankAccount = "002180700601234561",
    },
    Perceptions = new()
    {
        new()
        {
            Type = "001",
            Key = "SUELDO",
            Concept = "Sueldo",
            Taxed = 7500,
            Exempt = 0,
        },
        new()
        {
            Type = "019",
            Key = "HEXTRA",
            Concept = "Horas extra dobles",
            Taxed = 450,
            Exempt = 450,
            Overtime = new()
            {
                new()
                {
                    Days = 2,
                    HoursType = "01",
                    Hours = 6,
                    AmountPaid = 900,
                },
            },
        },
        new()
        {
            Type = "028",
            Key = "COMISION",
            Concept = "Comisiones de octubre",
            Taxed = 1200,
            Exempt = 0,
        },
    },
    Deductions = new()
    {
        new()
        {
            Type = "001",
            Key = "IMSS",
            Concept = "Cuotas obreras IMSS",
            Amount = 260.15m,
        },
        new()
        {
            Type = "002",
            Key = "ISR",
            Concept = "ISR",
            Amount = 1203.72m,
        },
        new()
        {
            Type = "010",
            Key = "INFONAVIT",
            Concept = "Crédito Infonavit",
            Amount = 950,
        },
        new()
        {
            Type = "004",
            Key = "PRESTAMO",
            Concept = "Préstamo personal",
            Amount = 500,
        },
    },
    OtherPayments = new()
    {
        new()
        {
            Type = "002",
            Key = "SUBSIDIO",
            Concept = "Subsidio para el empleo",
            Amount = 0,
            SubsidyCaused = 0,
        },
    },
    Totals = new()
    {
        Perceptions = 9600,
        Deductions = 2913.87m,
        OtherPayments = 0,
        Net = 6686.13m,
    },
    References = new()
    {
        EmployeeId = "nom-000123",
        PayrollRunId = "2026-Q19",
    },
    SendEmail = false,
    Metadata = new() { ["corrida"] = "2026-Q19" },
}, new RequestOptions { IdempotencyKey = "nomina-2026-Q19-123" });
```

The response is the invoice of `type: "N"`, with the amounts you sent and your references in `payroll.references`:

```json
{
  "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg",
  "object": "invoice",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "branch": null,
  "type": "N",
  "status": "valid",
  "uuid": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718",
  "series": null,
  "folio": "1",
  "date": "2026-10-15T09:30:12",
  "customer": {
    "tax_id": "MASO451221PM4",
    "legal_name": "MARIA OLIVIA MARTINEZ SAGAZ",
    "tax_system": "605",
    "zip": "80290"
  },
  "use": "CN01",
  "payment_form": null,
  "payment_method": "PUE",
  "currency": "MXN",
  "exchange_rate": null,
  "items": [
    {
      "description": "Pago de nómina",
      "product_key": "84111505",
      "unit_key": "ACT",
      "quantity": 1,
      "unit_price": 9600,
      "discount": 2913.87,
      "taxability": "01",
      "iva": "0"
    }
  ],
  "subtotal": 9600,
  "discount": 2913.87,
  "taxes": {
    "iva": 0,
    "ieps": 0,
    "iva_withheld": 0,
    "isr_withheld": 0,
    "local_transferred": 0,
    "local_withheld": 0
  },
  "total": 6686.13,
  "payment_status": null,
  "amount_due": null,
  "amount_paid": null,
  "related": null,
  "payroll": {
    "type": "O",
    "calculation": "external",
    "periodicity": "04",
    "period": {
      "start": "2026-10-01",
      "end": "2026-10-15",
      "payment_date": "2026-10-15"
    },
    "days": 15,
    "references": {
      "employee_id": "nom-000123",
      "payroll_run_id": "2026-Q19"
    },
    "employer": {
      "employer_registration": "Y5412345109",
      "curp": null
    },
    "employee": {
      "id": null,
      "number": "123",
      "curp": "MASO451221MSLRGL08",
      "social_security_number": "12345678903",
      "start_date": "2024-03-04",
      "seniority": "P136W",
      "contract_type": "01",
      "unionized": false,
      "workday_type": "01",
      "regime_type": "02",
      "department": "Ventas",
      "position": "Ejecutiva de cuenta",
      "risk_class": "1",
      "contribution_base_salary": 525.4,
      "integrated_daily_salary": 525.4,
      "state": "SIN",
      "bank_account": "002180700601234561"
    },
    "perceptions": [
      {
        "type": "001",
        "key": "SUELDO",
        "concept": "Sueldo",
        "taxed": 7500,
        "exempt": 0
      },
      {
        "type": "019",
        "key": "HEXTRA",
        "concept": "Horas extra dobles",
        "taxed": 450,
        "exempt": 450,
        "overtime": [
          {
            "days": 2,
            "hours_type": "01",
            "hours": 6,
            "amount_paid": 900
          }
        ]
      },
      {
        "type": "028",
        "key": "COMISION",
        "concept": "Comisiones de octubre",
        "taxed": 1200,
        "exempt": 0
      }
    ],
    "deductions": [
      {
        "type": "001",
        "key": "IMSS",
        "concept": "Cuotas obreras IMSS",
        "amount": 260.15
      },
      {
        "type": "002",
        "key": "ISR",
        "concept": "ISR",
        "amount": 1203.72
      },
      {
        "type": "010",
        "key": "INFONAVIT",
        "concept": "Crédito Infonavit",
        "amount": 950
      },
      {
        "type": "004",
        "key": "PRESTAMO",
        "concept": "Préstamo personal",
        "amount": 500
      }
    ],
    "other_payments": [
      {
        "type": "002",
        "key": "SUBSIDIO",
        "concept": "Subsidio para el empleo",
        "amount": 0,
        "subsidy_caused": 0
      }
    ],
    "totals": {
      "salaries": 9600,
      "separation": 0,
      "retirement": 0,
      "taxed": 9150,
      "exempt": 450,
      "perceptions": 9600,
      "other_deductions": 1710.15,
      "taxes_withheld": 1203.72,
      "deductions": 2913.87,
      "other_payments": 0,
      "subtotal": 9600,
      "net": 6686.13
    }
  },
  "cancellation": null,
  "email": null,
  "error": null,
  "recurring_invoice": null,
  "created_at": "2026-10-15T09:30:12-06:00",
  "metadata": {
    "corrida": "2026-Q19"
  }
}
```

Its PDF, XML, cancellation and the `invoice.stamped` webhook are those of any [invoice](https://fiscalisto.com/en/docs/api/facturas). The XML carries `TipoNomina="O"`, `TotalPercepciones="9600.00"`, `TotalDeducciones="2913.87"`, `TotalOtrosPagos="0.00"`, the `HorasExtra` node and the `SubsidioAlEmpleo`, exactly as you sent them.

### What you send

| Field | What it is |
| --- | --- |
| `type` | `O` ordinary payroll (periodicity `01` to `10`) or `E` extraordinary (periodicity `99`). |
| `periodicity`, `period`, `days` | PeriodicidadPago, FechaInicialPago, FechaFinalPago, FechaPago and NumDiasPagados (from 0.001 to 36160). |
| `employer` | Optional. `registration` (employer registration; without the field, the issuer's when the contract is `01` to `08`; `null`, none), `curp`, `origin_tax_id` and `sncf`. |
| `employee` | RFC, name and postal code as on their constancia, CURP, number, contract, regime, state and, depending on the case, NSS, start of employment, seniority, workday, risk, salaries, bank or CLABE and subcontracting. If the worker died, `tax_id` is the generic RFC `XAXX010101000` with their name and CURP (Guía de llenado, NOM10): the receipt goes with régimen `605`, uso `CN01` and the postal code of the place of issue, and the response warns about it. |
| `perceptions` | Each perception with `type` (c_TipoPercepcion), `key`, `concept`, `taxed` and `exempt`; `overtime` with `019` and `stock_options` with `045`. |
| `deductions` | Each deduction with `type` (c_TipoDeduccion: `001` IMSS, `002` ISR, `004` other, `006` disability, `007` alimony, `010` Infonavit…), `key`, `concept` and `amount`. |
| `other_payments` | `002` employment subsidy (with `subsidy_caused`), `004` offset of balances in favor (with `balance_compensation`) and the rest of c_TipoOtroPago. |
| `separation` | With perceptions `022`, `023` or `025` (indemnities, seniority premium, severance). |
| `retirement` | With perceptions `039` or `044` (retirement, pension). |
| `disabilities` | With perception `014` or deduction `006`. |
| `totals` | The totals your system calculated: `perceptions`, `deductions`, `other_payments` and `net`, and if you want `salaries`, `separation`, `retirement`, `taxed`, `exempt`, `taxes_withheld` and `other_deductions`. They're compared to the cent. |
| `references` | Your ids: `employee_id` and `payroll_run_id` (required with `type: "E"`). They come back in `payroll.references`. |
| `replaces` | The receipt (`inv_…` or UUID) this one corrects. |

### What it validates

- SAT's current catalogs (Nómina 1.2 revision E, with perceptions `054` to `057` and deductions `108` to `115`), the formats of RFC, CURP, NSS, CLABE and dates.
- The rules of the Nómina 1.2 error matrix: payroll type and periodicity, contract and regime, employer registration and IMSS data, subsidy caused (up to 628 pesos in a period of 31 days or less), perception `038` taxed only, nodes that go with each perception or deduction.
- The sums: each group's total is the sum of its lines, the net is perceptions plus other payments minus deductions, and it isn't negative. A total that doesn't add up is rejected; it's never adjusted.

What doesn't comply returns `422` `payroll_invalid` with every problem, each with its field:

```json
{
  "error": {
    "type": "invoice_error",
    "code": "payroll_invalid",
    "message": "4 problemas; el primero, deductions.4.type: La deducción 999 no está en c_TipoDeduccion [NOM213].",
    "param": "deductions.4.type",
    "errors": [
      { "param": "deductions.4.type", "code": "catalog", "message": "La deducción 999 no está en c_TipoDeduccion [NOM213]." },
      { "param": "deductions.4.key", "code": "invalid", "message": "La clave del patrón lleva de 3 a 15 caracteres, sin «|» ni espacios de más." },
      { "param": "totals.deductions", "code": "totals_mismatch", "message": "El total de deducciones que mandó (2,913.87) no es la suma de sus líneas (2,914.87). Fiscalisto no corrige importes: revise el cálculo." },
      { "param": "totals.net", "code": "totals_mismatch", "message": "El neto que mandó (6,686.14) no es percepciones más otros pagos menos deducciones (6,685.13)." }
    ]
  }
}
```

`code` is `missing`, `not_allowed`, `invalid`, `catalog`, `totals_mismatch` or `rule`. A field with the wrong type (text instead of a number, a field that doesn't exist) returns `400` `parameter_invalid` before checking the receipt.

### Extraordinary payroll

Christmas bonus, profit sharing, bonuses outside the ordinary payroll, severance and settlements go with `type: "E"`, `periodicity: "99"` and the run's id in `references.payroll_run_id`:

```json
{
  "type": "E",
  "periodicity": "99",
  "period": {
    "start": "2026-12-15",
    "end": "2026-12-15",
    "payment_date": "2026-12-15"
  },
  "days": 15,
  "employee": { "…": "el mismo de la quincena" },
  "perceptions": [
    {
      "type": "002",
      "key": "AGUINALDO",
      "concept": "Aguinaldo 2026",
      "taxed": 3980.7,
      "exempt": 3519.3
    }
  ],
  "deductions": [
    {
      "type": "002",
      "key": "ISR",
      "concept": "ISR del aguinaldo",
      "amount": 836.45
    }
  ],
  "other_payments": [
    {
      "type": "002",
      "key": "SUBSIDIO",
      "concept": "Subsidio para el empleo",
      "amount": 0,
      "subsidy_caused": 0
    }
  ],
  "totals": {
    "perceptions": 7500,
    "deductions": 836.45,
    "other_payments": 0,
    "net": 6663.55
  },
  "references": {
    "employee_id": "nom-000123",
    "payroll_run_id": "aguinaldo-2026"
  }
}
```

A severance carries its perceptions `022`, `023` or `025` and the `separation` node; a pension or retirement, `039` or `044` and the `retirement` node.

SAT's Guía de llenado also asks for two things SAT doesn't check; when a receipt doesn't follow them it is still stamped as sent, and `warnings` says so: separation payments go with `regime_type` `13` (with `contract_type` `09`, `10` or `99`), apart from the ordinary pay, and an asimilado's payments (`regime_type` `05` to `11`) go as perception `046`, taxed.

### Duplicates

So the same thing isn't paid twice:

- **The same request again** (with the same `Idempotency-Key`, or with another but the same receipt, amount by amount) returns the receipt already stamped, without stamping another.
- **An ordinary receipt with other amounts** for the same employee (by RFC) and the same period returns `409` `payroll_receipt_exists`; in a period that overlaps another current ordinary receipt, `409` `payroll_period_overlap`. Both carry the existing receipt in `error.invoice`. This includes receipts Fiscalisto calculated.
- **Extraordinary ones** don't clash with ordinary ones or across runs: each `payroll_run_id` is one receipt per employee. The same run with other amounts returns `409` `payroll_receipt_exists`.
- Two simultaneous requests for the same employee are served one after the other: only one stamps.

### Correct or repeat an external receipt

To correct a current receipt, send the correct receipt with `replaces` and the previous one's id or UUID: Fiscalisto stamps it related with `04` (replacement of previous CFDI) and cancels the previous one with reason `01`. The new one can have other amounts and the same period. The previous one is cancelled 15 minutes after the new one is stamped, once SAT has it for cancelling: meanwhile `substitutes.canceled` is `false` with its `cancel_error`. If SAT doesn't have the new receipt on record yet, Fiscalisto cancels the previous one as soon as SAT allows (it tries every 15 minutes for 72 hours). `substitutes.cancellation` says where it stands: `pending` (SAT is finishing it, a few minutes), `scheduled` (Fiscalisto asks again on its own) or `failed` (request it again with `POST /v1/invoices/{id}/cancel`, reason `01`), the same as the previous one's `cancellation` in [`GET /v1/invoices/{id}`](https://fiscalisto.com/en/docs/api/referencia/facturas/get-invoice). When it changes, the previous one's webhook arrives (`invoice.canceled` or `invoice.cancellation_failed`): don't store the response's `canceled` as final. `replaces` only accepts a current payroll receipt of the same issuer and the same employee (otherwise, `409` `payroll_replacement_invalid`).

You can also cancel the previous one with [`POST /v1/invoices/{id}/cancel`](https://fiscalisto.com/en/docs/api/cancelacion) and stamp the period again.

### Integration example

Your system calculates the fortnight and, for each employee, reviews and stamps the receipt, storing the UUID (to send them all in one request, see [Stamp the whole payroll at once](#stamp-the-whole-payroll-at-once)):

```ts
import { Fiscalisto, FiscalistoError } from "fiscalisto";

const fiscalisto = new Fiscalisto();

for (const recibo of await miNomina.recibos("2026-Q19")) {
  const body = {
    type: "O",
    periodicity: "04",
    period: { start: "2026-10-01", end: "2026-10-15", payment_date: "2026-10-15" },
    days: recibo.dias,
    employee: recibo.empleado,
    perceptions: recibo.percepciones,
    deductions: recibo.deducciones,
    other_payments: recibo.otrosPagos,
    totals: recibo.totales,
    references: { employee_id: recibo.empleado.id, payroll_run_id: "2026-Q19" },
  };
  try {
    // La Idempotency-Key es de este recibo: si se cae la red, repetirlo no timbra dos veces.
    const invoice = await fiscalisto.payrollReceipts.createExternal(body, {
      idempotencyKey: `2026-Q19-${recibo.empleado.id}`,
    });
    await miNomina.guardarUuid(recibo.id, invoice.uuid);
  } catch (e) {
    if (e instanceof FiscalistoError && e.code === "payroll_invalid")
      await miNomina.marcarError(recibo.id, e.raw.errors); // [{ param, code, message }]
    else throw e;
  }
}
```

### From ChatGPT or Claude

With [Fiscalisto connected to ChatGPT or Claude](/ayuda/cuenta/chatgpt-y-claude), `preparar_recibo_nomina_externo` checks the receipt and shows the person the summary; `timbrar_recibo_nomina_externo` only stamps with that review's `confirmation_token` and exactly the same data. If a single amount changes, it's refused and has to be reviewed again.

## Stamp the whole payroll at once

For 100 or 1,000 employees you don't need one request per receipt or to watch the timbres-per-second limit: send the whole run to `POST /v1/payroll_batches` and Fiscalisto stamps the receipts in the background, one after another. It answers `202` right away with the batch (`pyb_…`) and notifies you with the `payroll_batch.completed` webhook when it's done.

With the employees you have in Fiscalisto, `receipts` carries each one's id and the batch the period; Fiscalisto calculates each receipt as in [Stamp it](#stamp-it):

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_batches \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nomina-2026-q20" \
  -d '{
    "name": "Quincena 2026-20",
    "period": { "start": "2026-10-16", "end": "2026-10-31" },
    "send_email": true,
    "receipts": [
      { "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr", "reference": "q20-9" },
      { "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "reference": "q20-12", "days": 12 }
    ]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollBatch = await fiscalisto.payrollBatches.create({
  name: "Quincena 2026-20",
  period: { start: "2026-10-16", end: "2026-10-31" },
  send_email: true,
  receipts: [
    {
      employee: "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
      reference: "q20-9",
    },
    {
      employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      reference: "q20-12",
      days: 12,
    },
  ],
}, { idempotencyKey: "nomina-2026-q20" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_batch = fiscalisto.payroll_batches.create({
    "name": "Quincena 2026-20",
    "period": {"start": "2026-10-16", "end": "2026-10-31"},
    "send_email": True,
    "receipts": [
        {
            "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
            "reference": "q20-9",
        },
        {
            "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
            "reference": "q20-12",
            "days": 12,
        },
    ],
}, idempotency_key="nomina-2026-q20")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollBatch = $fiscalisto->payrollBatches->create([
    'name' => 'Quincena 2026-20',
    'period' => [
        'start' => '2026-10-16',
        'end' => '2026-10-31',
    ],
    'send_email' => true,
    'receipts' => [
        [
            'employee' => 'emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr',
            'reference' => 'q20-9',
        ],
        [
            'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
            'reference' => 'q20-12',
            'days' => 12,
        ],
    ],
], ['idempotency_key' => 'nomina-2026-q20']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollBatch, err := client.PayrollBatches.Create(ctx, &fiscalisto.CreatePayrollBatchParams{
		Name: fiscalisto.String("Quincena 2026-20"),
		Period: &fiscalisto.CreatePayrollBatchParamsPeriod{
			Start: "2026-10-16",
			End:   "2026-10-31",
		},
		SendEmail: fiscalisto.Bool(true),
		Receipts: []fiscalisto.CreatePayrollBatchParamsReceipt{
			{
				Employee:  "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
				Reference: fiscalisto.String("q20-9"),
			},
			{
				Employee:  "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
				Reference: fiscalisto.String("q20-12"),
				Days:      fiscalisto.Float64(12),
			},
		},
	}, fiscalisto.WithIdempotencyKey("nomina-2026-q20"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(payrollBatch.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreatePayrollBatchParams;
import com.fiscalisto.model.CreatePayrollBatchParamsPeriod;
import com.fiscalisto.model.CreatePayrollBatchParamsReceipt;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollBatch = fiscalisto.payrollBatches().create(new CreatePayrollBatchParams()
        .setName("Quincena 2026-20")
        .setPeriod(new CreatePayrollBatchParamsPeriod()
                .setStart("2026-10-16")
                .setEnd("2026-10-31"))
        .setSendEmail(true)
        .setReceipts(List.of(
                new CreatePayrollBatchParamsReceipt()
                        .setEmployee("emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr")
                        .setReference("q20-9"),
                new CreatePayrollBatchParamsReceipt()
                        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
                        .setReference("q20-12")
                        .setDays(12)
        )), RequestOptions.idempotencyKey("nomina-2026-q20"));
System.out.println(payrollBatch.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollBatch = await fiscalisto.PayrollBatches.CreateAsync(new CreatePayrollBatchParams
{
    Name = "Quincena 2026-20",
    Period = new() { Start = "2026-10-16", End = "2026-10-31" },
    SendEmail = true,
    Receipts = new()
    {
        new()
        {
            Employee = "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
            Reference = "q20-9",
        },
        new()
        {
            Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
            Reference = "q20-12",
            Days = 12,
        },
    },
}, new RequestOptions { IdempotencyKey = "nomina-2026-q20" });
```

Each receipt can carry its own `period`, its `days` (without them, all the days it's entitled to less its absences and disability), its `absences` and `disability_days` and its `send_email`; the batch's `send_email` sends it to the employees who have an email.

If your system already calculated the payroll, send the receipts in `external_receipts` instead of `receipts`: each one is the body of [`POST /v1/payroll_receipts/external`](#stamp-your-systems-receipt) without `issuer` or `metadata` (the issuer goes once, in the batch, and each receipt carries its `reference`), and it's stamped as it comes. A batch is one kind only: with both it returns `400` `calculation_mode_ambiguous`. A replacement (`replaces`) goes alone, with `POST /v1/payroll_receipts/external`.

### What's checked first

Everything that can be checked without stamping is checked before starting, and if something fails no receipt is stamped: an employee that doesn't exist or doesn't belong to the issuer, a missing period, `send_email` for someone without an email, the same employee twice with overlapping periods, the issuer's employer registration and, in `external_receipts`, every check of an external receipt. The error says which receipt: `param` is `receipts.3.employee` or `external_receipts.12.totals.net`, and `payroll_invalid` carries every problem in `errors[]`. In production, if you don't have enough timbres for the whole batch (and have no auto-refill), it returns `402` `insufficient_balance` before starting.

### Each employee's result

`GET /v1/payroll_batches/{id}` (and the `payroll_batch.completed` event) carries in `receipts` each employee's receipt, in the order you sent them:

```json
{
  "id": "pyb_OufpKqnrvx9p6tQ2wE8rYu4iOp7aSd3fGh",
  "object": "payroll_batch",
  "calculation": "fiscalisto",
  "status": "completed",
  "total": 2,
  "stamped": 1,
  "failed": 1,
  "processing": 0,
  "receipts": [
    {
      "index": 0,
      "reference": "q20-9",
      "employee": "emp_OufpKqnrvx9p4gtWHOcPMsq25QUp6Licjr",
      "tax_id": "MASO451221PM4",
      "status": "valid",
      "invoice": "inv_OufpKqnrvx9p8Nm3kR6tYp1wQz4xCv7bNs",
      "uuid": "52378E0C-799A-4E53-85DC-795C6A488776",
      "total": 4599.93,
      "error": null
    },
    {
      "index": 1,
      "reference": "q20-12",
      "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "tax_id": "GORA800101AB1",
      "status": "failed",
      "invoice": null,
      "error": { "code": "payroll_invalid", "message": "ANA GOMEZ RUIZ dejó de trabajar antes de este periodo." }
    }
  ]
}
```

What's only known when stamping stays on that employee's receipt, with `error.code` and `error.message`, and the rest are stamped anyway: `payroll_invalid` (didn't work in the period, already has an overlapping receipt, too many days), `payroll_receipt_exists` or `payroll_period_overlap` (external receipts, see [Duplicates](#duplicates)), `invoice_rejected` (the PAC or SAT rejected it; `invoice` is the rejected receipt) or `insufficient_balance`. Each receipt also sends its `invoice.stamped` or `invoice.failed`. If the PAC doesn't answer, the receipt stays `processing` and is stamped on its own as soon as it's back.

### Send it again

An employee has one receipt per period in a batch too. With the same `Idempotency-Key` it returns the same batch. With another, it's another batch, but receipts already stamped come back as they are (the same `invoice` and `uuid`, without stamping another) and only the failed ones are attempted: once what failed is corrected, you can send the whole run again.

## Pay the payroll at the bank

With the receipts stamped, `POST /v1/payroll_bank_files` builds the disbursement file you upload to your bank's portal to pay each employee's net. It takes the issuer's stamped (and not cancelled) payroll receipts with that payment date, adds them up per employee (the fortnight and a Christmas bonus on the same day go in a single payment) and pays the `clabe` on their employee record: by account if it's the same bank, by SPEI if it's another.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_bank_files \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "payment_date": "2026-10-31",
    "layout": "bbva",
    "account": "012180001122334451"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollBankFile = await fiscalisto.payrollBankFiles.create({
  payment_date: "2026-10-31",
  layout: "bbva",
  account: "012180001122334451",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_bank_file = fiscalisto.payroll_bank_files.create({
    "payment_date": "2026-10-31",
    "layout": "bbva",
    "account": "012180001122334451",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollBankFile = $fiscalisto->payrollBankFiles->create([
    'payment_date' => '2026-10-31',
    'layout' => 'bbva',
    'account' => '012180001122334451',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollBankFile, err := client.PayrollBankFiles.Create(ctx, &fiscalisto.CreatePayrollBankFileParams{
		PaymentDate: "2026-10-31",
		Layout:      fiscalisto.String("bbva"),
		Account:     fiscalisto.String("012180001122334451"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollBankFile)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreatePayrollBankFileParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollBankFile = fiscalisto.payrollBankFiles().create(new CreatePayrollBankFileParams()
        .setPaymentDate("2026-10-31")
        .setLayout("bbva")
        .setAccount("012180001122334451"));
System.out.println(payrollBankFile);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollBankFile = await fiscalisto.PayrollBankFiles.CreateAsync(new CreatePayrollBankFileParams
{
    PaymentDate = "2026-10-31",
    Layout = "bbva",
    Account = "012180001122334451",
});
```

| `layout` | Portal | Requires |
| --- | --- | --- |
| `bbva` | BBVA Net Cash, payroll | — |
| `banamex` | BancaNet Empresarial, layout D | Banamex `account` and `client_number` (12 digits) |
| `banorte` | Banorte en su Empresa | Banorte `account` and `issuer_number` (issuer, 5 digits) |
| `santander` | Enlace, payroll payment | Santander `account`; only pays Santander accounts |
| `spei` | CSV for any bank's bulk SPEI payments | — |

Without `layout`, the one for `account`'s bank is used; without `account`, the one used last time in the app or the issuer's first bank account. `sequence` (1 to 99) numbers the files of the same day.

The response carries the file in `content` (text, lines with CR LF) and in `content_base64` (the same bytes in Windows-1252, as the portals read them: save it as is with its `file_name`), `total`, each payment in `payments` and in `excluded` who was left out and why (no CLABE, another bank's account in `santander`, a $0 net). It doesn't charge or move money: you upload it and authorize it at the bank. Upload the first one as a test: each portal validates it before loading anything, and some contracts require a format of their own.

### Pay the payroll from Pagos

If the empresa pays suppliers with Fiscalisto ([Supplier payouts](https://fiscalisto.com/en/docs/api/pagos-a-proveedores)), `POST /v1/payroll_payouts` does the same as **Pagar por transferencia** in the app: it prepares a draft payout with each employee's net (their stamped receipts with that payment date, less vales de despensa, the same sum as the bank file) to their CLABE. No money moves: someone on the team opens it at `payout.app_url` and signs it with their passkey, like any payout.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_payouts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: nomina-2026-11-15" \
  -d '{
    "payment_date": "2026-11-15"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollPayout = await fiscalisto.payrollPayouts.create({ payment_date: "2026-11-15" }, { idempotencyKey: "nomina-2026-11-15" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_payout = fiscalisto.payroll_payouts.create({"payment_date": "2026-11-15"}, idempotency_key="nomina-2026-11-15")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollPayout = $fiscalisto->payrollPayouts->create(['payment_date' => '2026-11-15'], ['idempotency_key' => 'nomina-2026-11-15']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollPayout, err := client.PayrollPayouts.Create(ctx, &fiscalisto.CreatePayrollPayoutParams{
		PaymentDate: "2026-11-15",
	}, fiscalisto.WithIdempotencyKey("nomina-2026-11-15"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollPayout)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.CreatePayrollPayoutParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollPayout = fiscalisto.payrollPayouts().create(new CreatePayrollPayoutParams().setPaymentDate("2026-11-15"), RequestOptions.idempotencyKey("nomina-2026-11-15"));
System.out.println(payrollPayout);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollPayout = await fiscalisto.PayrollPayouts.CreateAsync(new CreatePayrollPayoutParams { PaymentDate = "2026-11-15" }, new RequestOptions { IdempotencyKey = "nomina-2026-11-15" });
```

It only pays a CLABE that's already a Pagos account, approved and past its wait. The API doesn't register CLABEs: an employee's new `clabe` is registered in the app (**Registrar CLABE**, with its identity check), verified with the bank and waits like any supplier's, so changing an employee's record can't redirect their nómina. Whoever can't be paid goes in `excluded` with `status` and `reason` (`add`: their CLABE still needs registering; `waiting`: their account is being verified or in its wait; `blocked`: their CLABE doesn't exist, doesn't receive or the bank returned a payout to it, so ask them for another account; `no_clabe`, `zero`, `in_payout`: already in another payout of this nómina, which is never paid twice). Pay them later with another `Idempotency-Key`, once their accounts are ready. If another receipt with that `payment_date` is stamped later (an aguinaldo, a corrected one with a higher net), the new payout carries only what each employee is still owed; a transfer the bank returned or that was taken out of its payout is owed again.

The same `Idempotency-Key` answers the same payout; with another payment date, `409` `idempotency_key_reused`. With nobody to pay it answers `400` `parameter_invalid` with the reason, and if the empresa doesn't let the API prepare payouts (**Pagos › Configurar pagos**), `403` `payouts_api_disabled`. `pay_on` schedules the day it goes out (by default, as soon as it's signed). In ChatGPT or Claude it's `pagar_nomina`.

## IMSS movements

Fiscalisto keeps each employee's affiliation movements (`imss_movement`, `imv_…`) without you doing anything: when created it records their **alta** (registration), when their `integrated_daily_salary` changes a salary **modificación** (change) dated today (Mexico time), when you set their `end_date` their **baja** (termination, with `exit_reason`, voluntary separation by default) and when rehired their **reingreso** (rehire). Until reported, a movement follows the employee: if you correct the start date or the salary before reporting their alta, the alta is corrected.

`GET /v1/imss_movements` lists the pending ones (`status=pending`, all, oldest to newest) or those already reported (`status=reported`). Each one carries in `problems` what IMSS would reject on its line (an invalid NSS, missing employer registration). To add one by hand, `POST /v1/imss_movements` with `employee`, `kind`, `date` and `integrated_daily_salary` (or `exit_reason` on a baja); a pending one changes with `POST /v1/imss_movements/{id}` and is deleted with `DELETE`.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/imss_movements \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "kind": "modificacion",
    "date": "2026-10-31",
    "integrated_daily_salary": 366
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const imssMovement = await fiscalisto.imssMovements.create({
  employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  kind: "modificacion",
  date: "2026-10-31",
  integrated_daily_salary: 366,
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

imss_movement = fiscalisto.imss_movements.create({
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "kind": "modificacion",
    "date": "2026-10-31",
    "integrated_daily_salary": 366,
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$imssMovement = $fiscalisto->imssMovements->create([
    'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'kind' => 'modificacion',
    'date' => '2026-10-31',
    'integrated_daily_salary' => 366,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	imssMovement, err := client.ImssMovements.Create(ctx, &fiscalisto.CreateImssMovementParams{
		Employee:              "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
		Kind:                  "modificacion",
		Date:                  "2026-10-31",
		IntegratedDailySalary: fiscalisto.Float64(366),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(imssMovement.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateImssMovementParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssMovement = fiscalisto.imssMovements().create(new CreateImssMovementParams()
        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setKind("modificacion")
        .setDate("2026-10-31")
        .setIntegratedDailySalary(366));
System.out.println(imssMovement.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssMovement = await fiscalisto.ImssMovements.CreateAsync(new CreateImssMovementParams
{
    Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Kind = "modificacion",
    Date = "2026-10-31",
    IntegratedDailySalary = 366,
});
```

### The files for IDSE and SUA

`POST /v1/imss_files` builds the files for the pending movements (all, or those in `movements`):

- `format: "idse"`: IDSE's 168-position format, one file per type (rehires, salary changes, terminations). It needs your subdelegation's 5-digit `guide` (the one you saved in the app is remembered).
- `format: "sua"`: `ASEG.TXT` with the registrations and `MOVT.TXT` with the other movements, to import into SUA.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/imss_files \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "idse",
    "guide": "12345"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const imssFiles = await fiscalisto.imssFiles.create({ format: "idse", guide: "12345" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

imss_files = fiscalisto.imss_files.create({"format": "idse", "guide": "12345"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$imssFiles = $fiscalisto->imssFiles->create(['format' => 'idse', 'guide' => '12345']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	imssFiles, err := client.ImssFiles.Create(ctx, &fiscalisto.CreateImssFilesParams{
		Format: "idse",
		Guide:  fiscalisto.String("12345"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *imssFiles)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateImssFilesParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssFiles = fiscalisto.imssFiles().create(new CreateImssFilesParams().setFormat("idse").setGuide("12345"));
System.out.println(imssFiles);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssFiles = await fiscalisto.ImssFiles.CreateAsync(new CreateImssFilesParams
{
    Format = "idse",
    Guide = "12345",
});
```

The issuer needs `employer_registration`. The salary is declared capped at 25 UMA and never below its zone's minimum, and the name goes in its three parts (the employee's `given_names`, `first_surname`, `second_surname`; if they don't have them, Fiscalisto splits it using the letters of their CURP). Those IMSS would reject are left out, in `refused`, without stopping the others. Each file comes in `content` and in `content_base64` (Windows-1252, as IDSE and SUA read them).

Building the files doesn't mark them as reported. When IMSS receives them (IDSE's acknowledgment), mark them:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/imss_movements/report \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "movements": ["imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.imssMovements.report({
  movements: ["imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.imss_movements.report({
    "movements": ["imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"],
})["data"]
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->imssMovements->report([
    'movements' => ['imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT'],
])['data'];
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	imssMovementList, err := client.ImssMovements.Report(ctx, &fiscalisto.ReportImssMovementsParams{
		Movements: []string{"imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *imssMovementList)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ReportImssMovementsParams;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssMovementList = fiscalisto.imssMovements().report(new ReportImssMovementsParams()
        .setMovements(List.of("imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT")));
System.out.println(imssMovementList);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssMovementList = await fiscalisto.ImssMovements.ReportAsync(new ReportImssMovementsParams
{
    Movements = new() { "imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT" },
});
```

A reported movement no longer changes or gets deleted; with `"reported": false` it goes back to pending if you marked it by mistake.

If the IDSE acknowledgment refused any, send them in `rejected` with IMSS's reason: they stay `pending`, with `imss_rejection`, until you fix the employee or the movement (changing it clears it) and send it again. In the app, **Subir acuse del IDSE** reads the acknowledgment's PDF and proposes this by itself.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/imss_movements/report \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "movements": ["imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"],
    "rejected": [
      { "movement": "imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT", "reason": "Error 105: la CURP no coincide con el NSS" }
    ]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.imssMovements.report({
  movements: ["imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"],
  rejected: [
    {
      movement: "imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT",
      reason: "Error 105: la CURP no coincide con el NSS",
    },
  ],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.imss_movements.report({
    "movements": ["imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"],
    "rejected": [
        {
            "movement": "imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT",
            "reason": "Error 105: la CURP no coincide con el NSS",
        },
    ],
})["data"]
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->imssMovements->report([
    'movements' => ['imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT'],
    'rejected' => [
        [
            'movement' => 'imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT',
            'reason' => 'Error 105: la CURP no coincide con el NSS',
        ],
    ],
])['data'];
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	imssMovementList, err := client.ImssMovements.Report(ctx, &fiscalisto.ReportImssMovementsParams{
		Movements: []string{"imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"},
		Rejected: []fiscalisto.ReportImssMovementsParamsRejectedItem{
			{
				Movement: "imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT",
				Reason:   "Error 105: la CURP no coincide con el NSS",
			},
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *imssMovementList)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ReportImssMovementsParams;
import com.fiscalisto.model.ReportImssMovementsParamsRejectedItem;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssMovementList = fiscalisto.imssMovements().report(new ReportImssMovementsParams()
        .setMovements(List.of("imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT"))
        .setRejected(List.of(
                new ReportImssMovementsParamsRejectedItem()
                        .setMovement("imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT")
                        .setReason("Error 105: la CURP no coincide con el NSS")
        )));
System.out.println(imssMovementList);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var imssMovementList = await fiscalisto.ImssMovements.ReportAsync(new ReportImssMovementsParams
{
    Movements = new() { "imv_OufpKqnrvx9p6GhJkLzXcVbNmAsDfQwErT" },
    Rejected = new()
    {
        new()
        {
            Movement = "imv_OufpKqnrvx9p7HjKmLzXcVbNmAsDfQwErT",
            Reason = "Error 105: la CURP no coincide con el NSS",
        },
    },
});
```

### Variable salary

If an employee earns triple overtime, Sunday premium, rest days and holidays worked (`054`, `055`), commissions (`028`), other income (`038`) or punctuality or attendance bonuses above 10% of their SBC, that part is variable and is added to their SDI each bimester (articles 27, 30 and 34 of the Social Security Law): what the bimester's ordinary receipts paid, over their days of earned salary (the period's, without absences or disability). Double overtime doesn't count.

`GET /v1/variable_salaries?issuer=iss_…&bimester=2026-5` returns each employee's proposal (`variable_salary`): what integrated (`lines`), the days, the daily amount, their fixed and new SDI, and whether it changes (`changes`) or was already applied (`applied`). `effective_date` is the first day of the next bimester, when it applies, and `deadline` the fifth business day, when filing it in IDSE is due. To apply it:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/variable_salaries \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "bimester": "2026-5",
    "employees": ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const variableSalary = await fiscalisto.variableSalaries.apply({
  issuer: "iss_OufpKqnrvx9p",
  bimester: "2026-5",
  employees: ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

variable_salary = fiscalisto.variable_salaries.apply({
    "issuer": "iss_OufpKqnrvx9p",
    "bimester": "2026-5",
    "employees": ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$variableSalary = $fiscalisto->variableSalaries->apply([
    'issuer' => 'iss_OufpKqnrvx9p',
    'bimester' => '2026-5',
    'employees' => ['emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV'],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	variableSalary, err := client.VariableSalaries.Apply(ctx, &fiscalisto.ApplyVariableSalaryParams{
		Issuer:    fiscalisto.String("iss_OufpKqnrvx9p"),
		Bimester:  "2026-5",
		Employees: []string{"emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *variableSalary)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ApplyVariableSalaryParams;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var variableSalary = fiscalisto.variableSalaries().apply(new ApplyVariableSalaryParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setBimester("2026-5")
        .setEmployees(List.of("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")));
System.out.println(variableSalary);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var variableSalary = await fiscalisto.VariableSalaries.ApplyAsync(new ApplyVariableSalaryParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Bimester = "2026-5",
    Employees = new() { "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV" },
});
```

Each applied employee carries their variable part in `variable_integrated_daily_salary` from `variable_salary_from`, their receipts from that date contribute on the fixed plus the variable SDI, and their salary modification is left pending in [IMSS movements](#imss-movements). Receipts for earlier dates keep the SDI they had.

### Annual adjustment

`GET /v1/annual_adjustments?issuer=iss_…&year=2026` calculates each employee's annual ISR (`annual_adjustment`) as article 97 of the Income Tax Law requires: the article 152 tariff on the taxed part of the year's stamped receipts (`taxable_income`), less the employment subsidy that corresponded to them (`employment_subsidy`), against what was withheld (`tax_withheld`). A positive `balance` is owed by the employee; a negative one is in their favor. `excluded` says why it isn't calculated: `started` (hired after January 1), `left` (left before December 1), `income` (earned more than $400,000) `files_own` (files their own return) or `minimum` (earns the minimum wage: it is calculated, but a balance owed isn't withheld, since the minimum wage can't be deducted from, article 123 of the Constitution and 97 of the Federal Labor Law). `missing_months` are the months without a stamped receipt.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/annual_adjustments \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "year": 2026,
    "action": "apply",
    "employees": ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const annualAdjustment = await fiscalisto.annualAdjustments.update({
  issuer: "iss_OufpKqnrvx9p",
  year: 2026,
  action: "apply",
  employees: ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

annual_adjustment = fiscalisto.annual_adjustments.update({
    "issuer": "iss_OufpKqnrvx9p",
    "year": 2026,
    "action": "apply",
    "employees": ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$annualAdjustment = $fiscalisto->annualAdjustments->update([
    'issuer' => 'iss_OufpKqnrvx9p',
    'year' => 2026,
    'action' => 'apply',
    'employees' => ['emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV'],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	annualAdjustment, err := client.AnnualAdjustments.Update(ctx, &fiscalisto.UpdateAnnualAdjustmentParams{
		Issuer:    fiscalisto.String("iss_OufpKqnrvx9p"),
		Year:      2026,
		Action:    "apply",
		Employees: []string{"emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *annualAdjustment)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.UpdateAnnualAdjustmentParams;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var annualAdjustment = fiscalisto.annualAdjustments().update(new UpdateAnnualAdjustmentParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setYear(2026)
        .setAction("apply")
        .setEmployees(List.of("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")));
System.out.println(annualAdjustment);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var annualAdjustment = await fiscalisto.AnnualAdjustments.UpdateAsync(new UpdateAnnualAdjustmentParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Year = 2026,
    Action = "apply",
    Employees = new() { "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV" },
});
```

With `action: "apply"`, each employee's next ordinary receipt paid from January 1 of the following year (`applies_from`) carries the difference: owed, deduction `101` with key `AA2026` (up to their net pay; the rest, on the next receipt); in their favor, other payment `004` with `balance_compensation`. `remaining` is what no stamped receipt carries yet. `undo` removes it while no stamped receipt carries it, and `files_own_return` and `no_own_return` mark whether the employee files their own return.

### Payroll tax

`GET /v1/payroll_taxes?issuer=iss_…&month=2026-10` returns each state's payroll tax (impuesto sobre nómina, `payroll_tax`): what the receipts stamped with a payment date in the month paid (`paid`), grouped by the state where each employee works (`state`, the c_Estado of `ClaveEntFed`), less the perceptions it doesn't tax (`excluded`), times the state's 2026 rate (`rate`) and its surcharges (`surcharges`). `perceptions` lists the month's perceptions and whether they count toward the base. It is filed and paid on each state's finance portal.

By default the base leaves out the perceptions almost every state leaves out (`003`, `004`, `014`, `022` to `027`, `037`, `039`, `044` and `050`). `POST /v1/payroll_taxes/settings` changes them to match your state's law (`excluded_perception_types` replaces the list) and picks the rate option of the states that have one (`state_options`, by c_Estado; each state's choices come in `options`). Whatever you don't send stays as it was.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_taxes/settings \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "excluded_perception_types": ["003", "022", "023", "025", "027", "050"],
    "state_options": { "CMX": "micro" }
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollTaxSettings = await fiscalisto.payrollTaxes.updateSettings({
  issuer: "iss_OufpKqnrvx9p",
  excluded_perception_types: ["003", "022", "023", "025", "027", "050"],
  state_options: { CMX: "micro" },
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_tax_settings = fiscalisto.payroll_taxes.update_settings({
    "issuer": "iss_OufpKqnrvx9p",
    "excluded_perception_types": ["003", "022", "023", "025", "027", "050"],
    "state_options": {"CMX": "micro"},
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollTaxSettings = $fiscalisto->payrollTaxes->updateSettings([
    'issuer' => 'iss_OufpKqnrvx9p',
    'excluded_perception_types' => ['003', '022', '023', '025', '027', '050'],
    'state_options' => ['CMX' => 'micro'],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollTaxSettings, err := client.PayrollTaxes.UpdateSettings(ctx, &fiscalisto.UpdatePayrollTaxSettingsParams{
		Issuer:                  fiscalisto.String("iss_OufpKqnrvx9p"),
		ExcludedPerceptionTypes: []string{"003", "022", "023", "025", "027", "050"},
		StateOptions:            map[string]string{"CMX": "micro"},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollTaxSettings)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.UpdatePayrollTaxSettingsParams;
import java.util.List;
import java.util.Map;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollTaxSettings = fiscalisto.payrollTaxes().updateSettings(new UpdatePayrollTaxSettingsParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setExcludedPerceptionTypes(List.of("003", "022", "023", "025", "027", "050"))
        .setStateOptions(Map.of("CMX", "micro")));
System.out.println(payrollTaxSettings);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollTaxSettings = await fiscalisto.PayrollTaxes.UpdateSettingsAsync(new UpdatePayrollTaxSettingsParams
{
    Issuer = "iss_OufpKqnrvx9p",
    ExcludedPerceptionTypes = new() { "003", "022", "023", "025", "027", "050" },
    StateOptions = new() { ["CMX"] = "micro" },
});
```

### Payroll reports

`GET /v1/payroll_reports/accumulated` returns the year's totals (`year`, the current one by default) from the valid stamped receipts, ordinary and extraordinary, by payment date, like **Reportes de nómina** in the app: each perception, deduction and other payment (`concepts`) by its SAT code (`type`) and yours (`key`), with each month's amount in `months` (January at position 0), and each employee's totals (`employees`): taxed and exempt perceptions, ISR and IMSS withheld, other deductions, other payments, employment subsidy caused and net. With `employee`, only that employee's receipts.

`GET /v1/payroll_reports/cost` returns what the payroll costs month by month: what was paid (`paid`, perceptions and other payments without the employment subsidy) plus the employer's IMSS, SAR and Infonavit contributions and the payroll tax (`payroll_tax`), calculated as in [the month's employer contributions](https://fiscalisto.com/en/docs/api/contabilidad#employer-payroll-contributions). In a year whose rates aren't loaded yet, `rates_loaded` is `false` and those figures are `null`.

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/payroll_reports/accumulated?year=2026" \
  -H "Authorization: Bearer $FISCALISTO_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollAccumulated = await fiscalisto.payrollReports.accumulated({ year: 2026 });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_accumulated = fiscalisto.payroll_reports.accumulated({"year": 2026})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollAccumulated = $fiscalisto->payrollReports->accumulated(['year' => 2026]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollAccumulated, err := client.PayrollReports.Accumulated(ctx, &fiscalisto.GetPayrollAccumulatedParams{
		Year: fiscalisto.Int64(2026),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollAccumulated)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetPayrollAccumulatedParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollAccumulated = fiscalisto.payrollReports().accumulated(new GetPayrollAccumulatedParams().setYear(2026));
System.out.println(payrollAccumulated);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollAccumulated = await fiscalisto.PayrollReports.AccumulatedAsync(new GetPayrollAccumulatedParams { Year = 2026 });
```

```json
{
  "object": "payroll_accumulated",
  "year": 2026,
  "employee": null,
  "receipts": 2,
  "concepts": [
    {
      "kind": "percepcion",
      "type": "001",
      "key": "001",
      "concept": "Sueldo",
      "months": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18000, 0],
      "total": 18000,
      "taxed": 18000,
      "exempt": 0,
      "receipts": 2
    }
  ],
  "employees": [
    {
      "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "name": "ANA LÓPEZ PÉREZ",
      "perceptions": 18000,
      "isr_withheld": 2179.66,
      "imss_withheld": 450.12,
      "net": 15370.22
    }
  ]
}
```

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/payroll_reports/cost?year=2026" \
  -H "Authorization: Bearer $FISCALISTO_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollCost = await fiscalisto.payrollReports.cost({ year: 2026 });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_cost = fiscalisto.payroll_reports.cost({"year": 2026})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollCost = $fiscalisto->payrollReports->cost(['year' => 2026]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollCost, err := client.PayrollReports.Cost(ctx, &fiscalisto.GetPayrollCostParams{
		Year: fiscalisto.Int64(2026),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollCost)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetPayrollCostParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollCost = fiscalisto.payrollReports().cost(new GetPayrollCostParams().setYear(2026));
System.out.println(payrollCost);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollCost = await fiscalisto.PayrollReports.CostAsync(new GetPayrollCostParams { Year = 2026 });
```

```json
{
  "object": "payroll_cost",
  "year": 2026,
  "rates_loaded": true,
  "months": [
    {
      "month": "2026-11",
      "receipts": 2,
      "employees": 1,
      "paid": 18000,
      "imss": 1730.4,
      "sar": 1012.5,
      "infonavit": 900,
      "payroll_tax": 540,
      "total": 22182.9
    }
  ],
  "totals": { "paid": 18000, "imss": 1730.4, "sar": 1012.5, "infonavit": 900, "payroll_tax": 540, "total": 22182.9 }
}
```

### Payroll calendar

`GET /v1/payroll_calendar?issuer=iss_…` returns the issuer's payroll dates (`payroll_calendar`), from 31 days back to 90 ahead (`days_back` and `days_ahead`, up to 366). Each payroll run (`obligation` `pago`) comes on its payment date, with the employees that period pays, how many have their receipt stamped and the last day to stamp them (`payroll.stamp_by`, RMF rule 2.7.5.1). So do the payments the payroll owes, each with the article that sets its date in `basis`: IMSS contributions (`imss`, the 17th of the following month), RCV and Infonavit (`rcv_infonavit`, every two months), the payroll tax of each state where its employees work (`isn`), `aguinaldo`, `ptu`, `prima_riesgo`, `ajuste_anual` and, for a REPSE contractor, `icsoe` and `sisub` (every four months) and `renovacion_repse` (every three years). An IMSS payment date that falls on a non-business day or a Friday already comes moved to the next business day. `to_confirm` says what to confirm when it's owed only if something we don't know holds: profit sharing with no profit, a risk premium that didn't change, or a state's payroll tax day.

`POST /v1/payroll_calendar/mark` marks a payment paid (`paid` `true`) or unmarks it, with its `obligation` and `key` as the calendar gives them. A payroll run is done once its receipts are stamped. The day of the following month a state's payroll tax is paid goes in `due_days` of `POST /v1/payroll_taxes/settings`, by c_Estado. Mexico City (17), Jalisco (12) and the State of Mexico (10) already have their law's day.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_calendar/mark \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "obligation": "imss", "key": "2026-11", "paid": true }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollCalendarEvent = await fiscalisto.payrollCalendar.mark({
  obligation: "imss",
  key: "2026-11",
  paid: true,
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_calendar_event = fiscalisto.payroll_calendar.mark({
    "obligation": "imss",
    "key": "2026-11",
    "paid": True,
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollCalendarEvent = $fiscalisto->payrollCalendar->mark([
    'obligation' => 'imss',
    'key' => '2026-11',
    'paid' => true,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollCalendarEvent, err := client.PayrollCalendar.Mark(ctx, &fiscalisto.MarkPayrollCalendarEventParams{
		Obligation: "imss",
		Key:        "2026-11",
		Paid:       true,
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollCalendarEvent)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.MarkPayrollCalendarEventParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollCalendarEvent = fiscalisto.payrollCalendar().mark(new MarkPayrollCalendarEventParams()
        .setObligation("imss")
        .setKey("2026-11")
        .setPaid(true));
System.out.println(payrollCalendarEvent);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollCalendarEvent = await fiscalisto.PayrollCalendar.MarkAsync(new MarkPayrollCalendarEventParams
{
    Obligation = "imss",
    Key = "2026-11",
    Paid = true,
});
```

### Specialized services (REPSE)

A contractor of specialized services or works registered in REPSE (LFT arts. 15 and 15-A) files the ICSOE with IMSS (LSS art. 15-A) and the SISUB with Infonavit (Ley del Infonavit art. 29 Bis) every four months. `POST /v1/repse_contracts` registers each contract (`repse_contract`, id `rpc_…`) with its client (`client_tax_id`, `client_name`, `client_address`), the work site (`site_address`), its term (`start_date`, `end_date` `null` if open-ended) and who works on it (`workers`, each with its `employee` `emp_…` and since when). `number` has digits only, up to 20, as SISUB requires; a repeated one answers `parameter_invalid` on `number`. Addresses carry the state as c_Estado (`NLE`).

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/repse_contracts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "number": "2026001", "kind": "Prestación de servicios especializados", "contract_object": "Mantenimiento de maquinaria de planta", "service": "Mantenimiento industrial", "amount": 1250000, "start_date": "2026-01-01", "estimated_workers": 12, "client_tax_id": "ICV060329BY0", "client_name": "INDUSTRIAS DEL CENTRO", "client_address": { "street": "Av. Constitución", "exterior": "400", "zip": "64000", "municipality": "Monterrey", "state": "NLE" }, "site_address": { "street": "Carretera a Saltillo", "exterior": "km 12", "zip": "66350", "municipality": "Santa Catarina", "state": "NLE" }, "workers": [{ "employee": "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c", "start_date": "2026-01-01" }] }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const repseContract = await fiscalisto.repseContracts.create({
  number: "2026001",
  kind: "Prestación de servicios especializados",
  contract_object: "Mantenimiento de maquinaria de planta",
  service: "Mantenimiento industrial",
  amount: 1250000,
  start_date: "2026-01-01",
  estimated_workers: 12,
  client_tax_id: "ICV060329BY0",
  client_name: "INDUSTRIAS DEL CENTRO",
  client_address: {
    street: "Av. Constitución",
    exterior: "400",
    zip: "64000",
    municipality: "Monterrey",
    state: "NLE",
  },
  site_address: {
    street: "Carretera a Saltillo",
    exterior: "km 12",
    zip: "66350",
    municipality: "Santa Catarina",
    state: "NLE",
  },
  workers: [
    {
      employee: "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c",
      start_date: "2026-01-01",
    },
  ],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

repse_contract = fiscalisto.repse_contracts.create({
    "number": "2026001",
    "kind": "Prestación de servicios especializados",
    "contract_object": "Mantenimiento de maquinaria de planta",
    "service": "Mantenimiento industrial",
    "amount": 1250000,
    "start_date": "2026-01-01",
    "estimated_workers": 12,
    "client_tax_id": "ICV060329BY0",
    "client_name": "INDUSTRIAS DEL CENTRO",
    "client_address": {
        "street": "Av. Constitución",
        "exterior": "400",
        "zip": "64000",
        "municipality": "Monterrey",
        "state": "NLE",
    },
    "site_address": {
        "street": "Carretera a Saltillo",
        "exterior": "km 12",
        "zip": "66350",
        "municipality": "Santa Catarina",
        "state": "NLE",
    },
    "workers": [
        {
            "employee": "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c",
            "start_date": "2026-01-01",
        },
    ],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$repseContract = $fiscalisto->repseContracts->create([
    'number' => '2026001',
    'kind' => 'Prestación de servicios especializados',
    'contract_object' => 'Mantenimiento de maquinaria de planta',
    'service' => 'Mantenimiento industrial',
    'amount' => 1250000,
    'start_date' => '2026-01-01',
    'estimated_workers' => 12,
    'client_tax_id' => 'ICV060329BY0',
    'client_name' => 'INDUSTRIAS DEL CENTRO',
    'client_address' => [
        'street' => 'Av. Constitución',
        'exterior' => '400',
        'zip' => '64000',
        'municipality' => 'Monterrey',
        'state' => 'NLE',
    ],
    'site_address' => [
        'street' => 'Carretera a Saltillo',
        'exterior' => 'km 12',
        'zip' => '66350',
        'municipality' => 'Santa Catarina',
        'state' => 'NLE',
    ],
    'workers' => [
        [
            'employee' => 'emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c',
            'start_date' => '2026-01-01',
        ],
    ],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	repseContract, err := client.RepseContracts.Create(ctx, &fiscalisto.CreateRepseContractParams{
		Number:           "2026001",
		Kind:             "Prestación de servicios especializados",
		ContractObject:   "Mantenimiento de maquinaria de planta",
		Service:          "Mantenimiento industrial",
		Amount:           1250000,
		StartDate:        "2026-01-01",
		EstimatedWorkers: 12,
		ClientTaxID:      "ICV060329BY0",
		ClientName:       "INDUSTRIAS DEL CENTRO",
		ClientAddress: fiscalisto.CreateRepseContractParamsClientAddress{
			Street:       "Av. Constitución",
			Exterior:     fiscalisto.String("400"),
			Zip:          "64000",
			Municipality: "Monterrey",
			State:        "NLE",
		},
		SiteAddress: fiscalisto.CreateRepseContractParamsSiteAddress{
			Street:       "Carretera a Saltillo",
			Exterior:     fiscalisto.String("km 12"),
			Zip:          "66350",
			Municipality: "Santa Catarina",
			State:        "NLE",
		},
		Workers: []fiscalisto.CreateRepseContractParamsWorker{
			{
				Employee:  "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c",
				StartDate: "2026-01-01",
			},
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(repseContract.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateRepseContractParams;
import com.fiscalisto.model.CreateRepseContractParamsClientAddress;
import com.fiscalisto.model.CreateRepseContractParamsSiteAddress;
import com.fiscalisto.model.CreateRepseContractParamsWorker;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var repseContract = fiscalisto.repseContracts().create(new CreateRepseContractParams()
        .setNumber("2026001")
        .setKind("Prestación de servicios especializados")
        .setContractObject("Mantenimiento de maquinaria de planta")
        .setService("Mantenimiento industrial")
        .setAmount(1250000)
        .setStartDate("2026-01-01")
        .setEstimatedWorkers(12)
        .setClientTaxId("ICV060329BY0")
        .setClientName("INDUSTRIAS DEL CENTRO")
        .setClientAddress(new CreateRepseContractParamsClientAddress()
                .setStreet("Av. Constitución")
                .setExterior("400")
                .setZip("64000")
                .setMunicipality("Monterrey")
                .setState("NLE"))
        .setSiteAddress(new CreateRepseContractParamsSiteAddress()
                .setStreet("Carretera a Saltillo")
                .setExterior("km 12")
                .setZip("66350")
                .setMunicipality("Santa Catarina")
                .setState("NLE"))
        .setWorkers(List.of(
                new CreateRepseContractParamsWorker()
                        .setEmployee("emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c")
                        .setStartDate("2026-01-01")
        )));
System.out.println(repseContract.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var repseContract = await fiscalisto.RepseContracts.CreateAsync(new CreateRepseContractParams
{
    Number = "2026001",
    Kind = "Prestación de servicios especializados",
    ContractObject = "Mantenimiento de maquinaria de planta",
    Service = "Mantenimiento industrial",
    Amount = 1250000,
    StartDate = "2026-01-01",
    EstimatedWorkers = 12,
    ClientTaxId = "ICV060329BY0",
    ClientName = "INDUSTRIAS DEL CENTRO",
    ClientAddress = new()
    {
        Street = "Av. Constitución",
        Exterior = "400",
        Zip = "64000",
        Municipality = "Monterrey",
        State = "NLE",
    },
    SiteAddress = new()
    {
        Street = "Carretera a Saltillo",
        Exterior = "km 12",
        Zip = "66350",
        Municipality = "Santa Catarina",
        State = "NLE",
    },
    Workers = new()
    {
        new()
        {
            Employee = "emp_OufpKqnrvx9p7Gm2Kd9Rw4Tn1aZqXs6M3c",
            StartDate = "2026-01-01",
        },
    },
});
```

`POST /v1/repse_contracts/{id}` changes what you send; `workers` replaces the whole list. Give whoever leaves the contract an `end_date` instead of removing them, so they stay in the returns for the months they worked. `DELETE /v1/repse_contracts/{id}` archives it and takes it out of every return, past ones too. What SISUB asks of the obligated party that isn't in its tax details (REPSE folio, email, phone, address and, for a legal entity, representative, deed and commercial folio) goes in `POST /v1/repse_profile`. With `stps_registration_date`, the date the STPS granted or renewed the registration, `renewal` says from when to request the renewal (`opens_on`, three months before) and its last day in force (`last_day`, three years later, LFT art. 15), and the payroll calendar lists it as `renovacion_repse`.

`GET /v1/repse_returns/{period}` returns the four-month period's returns (`repse_return`): `2026-1` January to April, `2026-2` May to August and `2026-3` September to December, with its `due_date` (the 17th of the following month, or the next business day). `contracts` has each contract's workers with their NSS, CURP and last contribution base salary (the ICSOE), and `workers` each worker per two-month period with their earnings, the salary capped at 25 UMA, the 5% contribution and their credit's repayment (the SISUB), calculated from the stamped receipts. `files` has the CSVs to upload with the e.firma on each portal, and `problems` what's missing to file them. While a contract is in force, the payroll calendar gives their dates as `icsoe` and `sisub`.

```bash tab="cURL"
curl "https://api.fiscalisto.com/v1/repse_returns/2026-3" \
  -H "Authorization: Bearer $FISCALISTO_API_KEY"
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const repseReturn = await fiscalisto.repseReturns.get("2026-3");
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

repse_return = fiscalisto.repse_returns.get("2026-3")
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$repseReturn = $fiscalisto->repseReturns->get('2026-3');
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	repseReturn, err := client.RepseReturns.Get(ctx, "2026-3", nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *repseReturn)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var repseReturn = fiscalisto.repseReturns().get("2026-3");
System.out.println(repseReturn);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var repseReturn = await fiscalisto.RepseReturns.GetAsync("2026-3");
```

### Org chart

`GET /v1/payroll_org_chart?issuer=iss_…` returns the org chart of the issuer's current employees (`payroll_org_chart`). Each employee comes with their direct manager (`manager`, `null` at the top), their department (the Departamento on their receipts), their branch (`branch`, `null` is the head office) and how many people depend on them: directly (`direct_reports`) and down their whole chain (`total_reports`). `top` lists those at the top, the biggest team first. `departments` lists each department with the one above it (`parent`), its lead (`lead`), its people and those of its sub-departments. `vacancies` are positions without a person yet (`vac_…`): they sit under their manager and don't count as employees. `summary` says who sits at the top without a manager (`without_manager`), the managers with more than 10 direct reports (`wide_span`) and who has no department.

`POST /v1/payroll_org_chart/assign` changes the manager (`manager`), department or branch of up to 500 employees; what you don't send doesn't change. A manager who, up their chain, reports to one of them answers `parameter_invalid`, because they'd form a circle. `POST /v1/payroll_org_chart/departments` creates or changes a department by its name: `new_name` renames it on its employees and vacancies too, `parent` puts it inside another and `lead` sets its lead. `POST /v1/payroll_org_chart/departments/remove` removes one without people, and the ones inside it move up a level. Vacancies are opened with `POST /v1/payroll_org_chart/vacancies`, changed with `POST /v1/payroll_org_chart/vacancies/vac_…` and closed with `DELETE`. Each change answers with the chart as it now stands.

A vacancy carries the gross monthly salary it offers (`salary_min`, `salary_max`) and the state where the person will work (`state`, c_Estado); with them, `monthly_cost` says what it would cost the company each month: the salary, the employer's IMSS, SAR and Infonavit contributions (`employer_contributions`, first year with the statutory benefits and the issuer's risk premium) and the state's payroll tax (`payroll_tax`). One a key opens or changes stays in `status` `pending_approval`: a person with the «Aprobar la prenómina» permission approves or rejects it in the app, and gets a notice. Once `approved`, `POST /v1/payroll_org_chart/vacancies/vac_…/fill` fills it with an employee created with `POST /v1/employees`: they get the vacancy's manager, department and branch, and the vacancy leaves the chart. Their IMSS registration is still to do. `GET /v1/payroll_org_chart?as_of=2026-12-31` gives the chart as it stood at the end of a past day, with the managers, departments and branches people had then (recorded since November 21, 2026).

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/payroll_org_chart/assign \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employees": ["emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"],
    "manager": "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
    "department": "Operaciones"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollOrgChart = await fiscalisto.payrollOrgChart.assign({
  employees: ["emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"],
  manager: "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
  department: "Operaciones",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_org_chart = fiscalisto.payroll_org_chart.assign({
    "employees": ["emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"],
    "manager": "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
    "department": "Operaciones",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollOrgChart = $fiscalisto->payrollOrgChart->assign([
    'employees' => ['emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe'],
    'manager' => 'emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB',
    'department' => 'Operaciones',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollOrgChart, err := client.PayrollOrgChart.Assign(ctx, &fiscalisto.AssignPayrollOrgChartParams{
		Employees:  []string{"emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"},
		Manager:    fiscalisto.String("emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB"),
		Department: fiscalisto.String("Operaciones"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollOrgChart)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.AssignPayrollOrgChartParams;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollOrgChart = fiscalisto.payrollOrgChart().assign(new AssignPayrollOrgChartParams()
        .setEmployees(List.of("emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"))
        .setManager("emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB")
        .setDepartment("Operaciones"));
System.out.println(payrollOrgChart);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollOrgChart = await fiscalisto.PayrollOrgChart.AssignAsync(new AssignPayrollOrgChartParams
{
    Employees = new() { "emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe" },
    Manager = "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
    Department = "Operaciones",
});
```

### Careers page and candidates

`GET /v1/hiring?issuer=iss_…` returns the issuer's careers page (`hiring`), the same as Nómina › Empleos: its public address (`careers_url`), whether it's on (`enabled`), its text and contact email, its candidate stages (`stages`), what to do with someone who doesn't meet a requirement (`unmet_requirements`: `flag` receives the application flagged; `warn` also tells them before sending what they don't meet), its forms (`jbf_…`) and its vacancies with what they publish and how many candidates are at each stage. `POST /v1/hiring/settings` changes what you send. The contact email is also where candidates exercise their ARCO rights: without it the one in Datos fiscales is used and, without either, its vacancies don't take applications.

A form (`POST /v1/hiring/forms`, `POST /v1/hiring/forms/jbf_…` to change it, `DELETE` to archive it) carries whatever questions the company wants, in order: `text`, `longtext`, `number`, `date`, `select`, `multiselect`, `yesno`, `email`, `phone`, `url` or `file` (a PDF, JPG, PNG or Word file up to 10 MB), required or optional, with their checks (`rules`) and, if it's a requirement, the answers or the minimum that meet it (`requirement`). `nombre` and `correo` are always there. Don't ask what Mexico's Federal Labor Law doesn't allow hiring to depend on (article 133: age, gender, marital status, pregnancy, religion, health…).

An approved vacancy from the org chart is published with `POST /v1/payroll_org_chart/vacancies/vac_…/publish`: its description, requirements, contract type, workplace, whether it shows the salary, until when it takes applications and the form. Its page carries the data Google reads to show it in its job results.

`GET /v1/candidates` returns the applications (`cnd_…`), newest first (`vacancy` and `stage` filter them), each with its answers, `meets_requirements` and the requirements it doesn't meet; `GET /v1/candidates/cnd_…/files/cv` downloads its file. `POST /v1/candidates/cnd_…` moves it to another stage, rates it or adds a note. `POST /v1/candidates/cnd_…/hire`, with the employee already created with `POST /v1/employees`, fills the vacancy and takes it off the page. `DELETE /v1/candidates/cnd_…` deletes the application and its files, for example when the candidate asks.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/hiring/forms \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Operaciones",
    "questions": [
      { "id": "nombre", "label": "Nombre completo", "type": "text", "required": true },
      { "id": "correo", "label": "Correo", "type": "email", "required": true },
      { "id": "cv", "label": "Currículum (CV)", "type": "file", "required": true, "files": ["pdf", "doc"] },
      { "label": "Años de experiencia en logística", "type": "number", "required": true, "requirement": { "min": 2 } }
    ]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const jobForm = await fiscalisto.hiring.createForm({
  name: "Operaciones",
  questions: [
    {
      id: "nombre",
      label: "Nombre completo",
      type: "text",
      required: true,
    },
    {
      id: "correo",
      label: "Correo",
      type: "email",
      required: true,
    },
    {
      id: "cv",
      label: "Currículum (CV)",
      type: "file",
      required: true,
      files: ["pdf", "doc"],
    },
    {
      label: "Años de experiencia en logística",
      type: "number",
      required: true,
      requirement: { min: 2 },
    },
  ],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

job_form = fiscalisto.hiring.create_form({
    "name": "Operaciones",
    "questions": [
        {
            "id": "nombre",
            "label": "Nombre completo",
            "type": "text",
            "required": True,
        },
        {
            "id": "correo",
            "label": "Correo",
            "type": "email",
            "required": True,
        },
        {
            "id": "cv",
            "label": "Currículum (CV)",
            "type": "file",
            "required": True,
            "files": ["pdf", "doc"],
        },
        {
            "label": "Años de experiencia en logística",
            "type": "number",
            "required": True,
            "requirement": {"min": 2},
        },
    ],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$jobForm = $fiscalisto->hiring->createForm([
    'name' => 'Operaciones',
    'questions' => [
        [
            'id' => 'nombre',
            'label' => 'Nombre completo',
            'type' => 'text',
            'required' => true,
        ],
        [
            'id' => 'correo',
            'label' => 'Correo',
            'type' => 'email',
            'required' => true,
        ],
        [
            'id' => 'cv',
            'label' => 'Currículum (CV)',
            'type' => 'file',
            'required' => true,
            'files' => ['pdf', 'doc'],
        ],
        [
            'label' => 'Años de experiencia en logística',
            'type' => 'number',
            'required' => true,
            'requirement' => ['min' => 2],
        ],
    ],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	jobForm, err := client.Hiring.CreateForm(ctx, &fiscalisto.CreateJobFormParams{
		Name: "Operaciones",
		Questions: []fiscalisto.CreateJobFormParamsQuestion{
			{
				ID:       fiscalisto.String("nombre"),
				Label:    "Nombre completo",
				Type:     "text",
				Required: true,
			},
			{
				ID:       fiscalisto.String("correo"),
				Label:    "Correo",
				Type:     "email",
				Required: true,
			},
			{
				ID:       fiscalisto.String("cv"),
				Label:    "Currículum (CV)",
				Type:     "file",
				Required: true,
				Files:    []string{"pdf", "doc"},
			},
			{
				Label:    "Años de experiencia en logística",
				Type:     "number",
				Required: true,
				Requirement: &fiscalisto.CreateJobFormParamsQuestionRequirement{
					Min: fiscalisto.Float64(2),
				},
			},
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(jobForm.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateJobFormParams;
import com.fiscalisto.model.CreateJobFormParamsQuestion;
import com.fiscalisto.model.CreateJobFormParamsQuestionRequirement;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var jobForm = fiscalisto.hiring().createForm(new CreateJobFormParams()
        .setName("Operaciones")
        .setQuestions(List.of(
                new CreateJobFormParamsQuestion()
                        .setId("nombre")
                        .setLabel("Nombre completo")
                        .setType("text")
                        .setRequired(true),
                new CreateJobFormParamsQuestion()
                        .setId("correo")
                        .setLabel("Correo")
                        .setType("email")
                        .setRequired(true),
                new CreateJobFormParamsQuestion()
                        .setId("cv")
                        .setLabel("Currículum (CV)")
                        .setType("file")
                        .setRequired(true)
                        .setFiles(List.of("pdf", "doc")),
                new CreateJobFormParamsQuestion()
                        .setLabel("Años de experiencia en logística")
                        .setType("number")
                        .setRequired(true)
                        .setRequirement(new CreateJobFormParamsQuestionRequirement()
                                .setMin(2))
        )));
System.out.println(jobForm.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var jobForm = await fiscalisto.Hiring.CreateFormAsync(new CreateJobFormParams
{
    Name = "Operaciones",
    Questions = new()
    {
        new()
        {
            Id = "nombre",
            Label = "Nombre completo",
            Type = "text",
            Required = true,
        },
        new()
        {
            Id = "correo",
            Label = "Correo",
            Type = "email",
            Required = true,
        },
        new()
        {
            Id = "cv",
            Label = "Currículum (CV)",
            Type = "file",
            Required = true,
            Files = new() { "pdf", "doc" },
        },
        new()
        {
            Label = "Años de experiencia en logística",
            Type = "number",
            Required = true,
            Requirement = new() { Min = 2 },
        },
    },
});
```

### Training and DC-3 certificates

`GET /v1/training?issuer=iss_…` returns the issuer's training (`training`), the same as Nómina › Capacitación: who signs the certificates (with up to 50 workers, the employer or its legal representative; with more, the employer's and the workers' representatives on the joint committee, article 24, section II of the STPS Agreement of June 14, 2013), how many workers it counts (`workers`, from Nómina or by hand), the years of the training plan with each one's deadline for the STPS notice (`plan_years[].list_by`, 60 business days after it ends, article 26, section I), the certificates to renew (`renewals`) and how many are still to be delivered (`totals`). `POST /v1/training/settings` changes what you send: who signs, the joint committee (article 153-E of the Ley Federal del Trabajo), the plan dates (two years at most, article 153-H) and the National Occupations Catalog occupation of each position (`occupations`).

A course (`POST /v1/training_courses`, `trc_…`) carries what the DC-3 certificate asks for (article 24, section IV): its name, the thematic area from the STPS catalog (`thematic_area`, `1000` to `9000`), the hours, the period, who teaches it (`trainer_kind`: `internal`, `external` with its STPS registration, `supplier`, `foreign` or `stps`) and who took it (`employees`). `POST /v1/training_courses/trc_…/results` sets each person's result (`pending`, `passed`, `failed` or `sufficiency`, the proficiency exam) and score. `POST /v1/training_courses/trc_…/issue` issues the certificate of those who passed, each with the issuer's next folio; whatever is missing to issue it (the CURP, the occupation, who signs, the course ending) is in each participant's `blocker` (`trp_…`). `GET /v1/training_courses/trc_…/pdf` downloads the certificates in the DC-3 format, ready to sign, and `POST /v1/training_courses/trc_…/deliver` records that they were delivered: there are 20 business days from the course end (article 24, section III), and each participant carries `deliver_by` and `status` (`due`, `late`, `issued`, `delivered`). `DELETE /v1/training_courses/trc_…` deletes the course, or cancels it if someone already has their certificate, because the copies are kept for the STPS (article 26, section III).

`GET /v1/training/certificates?issuer=iss_…&from=…&to=…` returns the certificates of courses that ended between those dates with what the STPS notice asks for (name, CURP, occupation, position, education, course, thematic area, hours, dates and training provider), by folio. The notice is filed in the STPS system, which has no API. `GET /v1/employees/emp_…/training` returns an employee's occupation, education and courses, and `POST /v1/employees/emp_…/training` changes their occupation (when it isn't their position's) and education level.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/training_courses \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "name": "Manejo seguro de montacargas",
    "thematic_area": "6000",
    "hours": 8,
    "start_date": "2026-11-03",
    "end_date": "2026-11-04",
    "trainer_kind": "external",
    "trainer_name": "CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV",
    "trainer_registration": "CINO-123456-0013",
    "employees": ["emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"]
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const trainingCourse = await fiscalisto.trainingCourses.create({
  issuer: "iss_OufpKqnrvx9p",
  name: "Manejo seguro de montacargas",
  thematic_area: "6000",
  hours: 8,
  start_date: "2026-11-03",
  end_date: "2026-11-04",
  trainer_kind: "external",
  trainer_name: "CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV",
  trainer_registration: "CINO-123456-0013",
  employees: ["emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"],
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

training_course = fiscalisto.training_courses.create({
    "issuer": "iss_OufpKqnrvx9p",
    "name": "Manejo seguro de montacargas",
    "thematic_area": "6000",
    "hours": 8,
    "start_date": "2026-11-03",
    "end_date": "2026-11-04",
    "trainer_kind": "external",
    "trainer_name": "CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV",
    "trainer_registration": "CINO-123456-0013",
    "employees": ["emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"],
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$trainingCourse = $fiscalisto->trainingCourses->create([
    'issuer' => 'iss_OufpKqnrvx9p',
    'name' => 'Manejo seguro de montacargas',
    'thematic_area' => '6000',
    'hours' => 8,
    'start_date' => '2026-11-03',
    'end_date' => '2026-11-04',
    'trainer_kind' => 'external',
    'trainer_name' => 'CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV',
    'trainer_registration' => 'CINO-123456-0013',
    'employees' => ['emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe'],
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	trainingCourse, err := client.TrainingCourses.Create(ctx, &fiscalisto.CreateTrainingCourseParams{
		Issuer:              fiscalisto.String("iss_OufpKqnrvx9p"),
		Name:                "Manejo seguro de montacargas",
		ThematicArea:        "6000",
		Hours:               8,
		StartDate:           "2026-11-03",
		EndDate:             "2026-11-04",
		TrainerKind:         fiscalisto.String("external"),
		TrainerName:         fiscalisto.String("CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV"),
		TrainerRegistration: fiscalisto.String("CINO-123456-0013"),
		Employees:           []string{"emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe"},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(trainingCourse.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateTrainingCourseParams;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var trainingCourse = fiscalisto.trainingCourses().create(new CreateTrainingCourseParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setName("Manejo seguro de montacargas")
        .setThematicArea("6000")
        .setHours(8)
        .setStartDate("2026-11-03")
        .setEndDate("2026-11-04")
        .setTrainerKind("external")
        .setTrainerName("CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV")
        .setTrainerRegistration("CINO-123456-0013")
        .setEmployees(List.of("emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe")));
System.out.println(trainingCourse.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var trainingCourse = await fiscalisto.TrainingCourses.CreateAsync(new CreateTrainingCourseParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Name = "Manejo seguro de montacargas",
    ThematicArea = "6000",
    Hours = 8,
    StartDate = "2026-11-03",
    EndDate = "2026-11-04",
    TrainerKind = "external",
    TrainerName = "CAPACITACIÓN INDUSTRIAL DEL NORTE SA DE CV",
    TrainerRegistration = "CINO-123456-0013",
    Employees = new() { "emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe" },
});
```

### Workplace climate and NOM-035

`GET /v1/climate?issuer=iss_…` returns the issuer's workplace climate (`climate`), the same as Nómina › Clima laboral: the psychosocial risk prevention policy and how many read it (NOM-035-STPS-2018, numerals 5.1 and 5.7), each workplace (`centros`: the whole issuer or each branch) with the guide it gets by how many work there (`guide`: `II` from 16 to 50, `III` over 50, `null` up to 15, numeral 7.1) and when its next identification is due (`next_due`, every two years at least, numeral 7.9), how many Programa de intervención actions are pending and how many complaints await attention. `POST /v1/climate/policy` saves the policy text and who else takes complaints; with `publish: true` it publishes it on each worker's portal as a new version, which they're asked to read again.

A survey (`POST /v1/climate_surveys`, `cls_…`) is `kind: "nom035"`, the standard's guides at a workplace (`branch`, a `brn_…`, or none for the whole issuer), with Guide I to identify who lived through a severe traumatic event (`guide_i`, numeral 5.5) and, with Guide III, a random sample (`sample`); or `kind: "clima"`, your own survey with its `questions` (`scale` 1 to 5, `nps` 0 to 10 for the eNPS, `choice` or `text`). It stays a draft until `POST /v1/climate_surveys/cls_…/open` (or `open: true` when creating it), which invites whoever works there today and puts it on their portal; a workplace has only one open NOM-035 at a time. Answers only come from the employee portal and never with a name: `GET /v1/climate_surveys/cls_…` returns the results from 5 answers (`results.hidden` before), with the NOM-035 the final score and each category's and domain's with its risk level and whether it calls for a Programa de intervención (`needs_program`, from `medio` up, numeral 8.3), and with the climate survey each question with its average, its counts and the eNPS. `invites` says who was asked and whether they answered, not what. `POST /v1/climate_surveys/cls_…/close` closes it, and a closed NOM-035 counts as the workplace's identification. `POST /v1/climate_surveys/cls_…/report` saves what the report asks for besides the results (numeral 7.7). `DELETE /v1/climate_surveys/cls_…` deletes a survey without answers; with answers it's kept (numeral 5.8).

`GET /v1/climate_surveys/cls_…/traumatic_events` returns, by name, whoever answered «Sí» in Guide I and whether they need a clinical assessment, because the employer must refer them (numeral 5.5); `POST /v1/climate_surveys/cls_…/referrals` records where and when. The Programa de intervención (`/v1/climate_actions`, `cla_…`, numerals 8.4 and 8.5) carries each action with the area it addresses (the `key` of a category or domain), its level (`primer`, `segundo` or `tercer`), the owner, the date and, once done, how it went (`evaluation`). `GET /v1/climate_complaints` returns the complaints from the portal's mailbox (`clq_…`, numeral 8.1 b)), with a name only if the sender signed it, and `POST /v1/climate_complaints/clq_…` records their status and what was done.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/climate_surveys \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "kind": "nom035",
    "branch": "brn_OufpKqnrvx9p2",
    "closes_on": "2026-11-30",
    "open": true
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const climateSurvey = await fiscalisto.climateSurveys.create({
  issuer: "iss_OufpKqnrvx9p",
  kind: "nom035",
  branch: "brn_OufpKqnrvx9p2",
  closes_on: "2026-11-30",
  open: true,
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

climate_survey = fiscalisto.climate_surveys.create({
    "issuer": "iss_OufpKqnrvx9p",
    "kind": "nom035",
    "branch": "brn_OufpKqnrvx9p2",
    "closes_on": "2026-11-30",
    "open": True,
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$climateSurvey = $fiscalisto->climateSurveys->create([
    'issuer' => 'iss_OufpKqnrvx9p',
    'kind' => 'nom035',
    'branch' => 'brn_OufpKqnrvx9p2',
    'closes_on' => '2026-11-30',
    'open' => true,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	climateSurvey, err := client.ClimateSurveys.Create(ctx, &fiscalisto.CreateClimateSurveyParams{
		Issuer:   fiscalisto.String("iss_OufpKqnrvx9p"),
		Kind:     "nom035",
		Branch:   fiscalisto.String("brn_OufpKqnrvx9p2"),
		ClosesOn: fiscalisto.String("2026-11-30"),
		Open:     fiscalisto.Bool(true),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(climateSurvey.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateClimateSurveyParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var climateSurvey = fiscalisto.climateSurveys().create(new CreateClimateSurveyParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setKind("nom035")
        .setBranch("brn_OufpKqnrvx9p2")
        .setClosesOn("2026-11-30")
        .setOpen(true));
System.out.println(climateSurvey.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var climateSurvey = await fiscalisto.ClimateSurveys.CreateAsync(new CreateClimateSurveyParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Kind = "nom035",
    Branch = "brn_OufpKqnrvx9p2",
    ClosesOn = "2026-11-30",
    Open = true,
});
```

### Performance reviews

A review cycle (`POST /v1/review_cycles`, `rvc_…`) is the same as Nómina › Desempeño: the people being reviewed, who reviews them, their objectives and each one's result. When it's created, everyone working at the issuer today joins, or only those in a branch (`branch`) or a department (`department`), and each one gets their boss from the [org chart](#org-chart) (`manager`). `rules` says how it's scored: the scale (`scale.max`, 1 to 5 by default, with each point's name in `labels`), who reviews (`raters`: `self`, `manager`, `peer`, `report`) and how much each one weighs (`rater_weights`, which don't have to add up to 100: only those who review count), how much objectives weigh against competencies (`objectives_weight`), the minimum number of answers for peers and direct reports to count (`anonymous_min`) and the cuts of the 9-box grid (`box_cuts`). `competencies` are what's rated, five examples if you don't send them. No law requires performance reviews, so each company decides all of it.

While it's a draft (`status: "draft"`), `POST /v1/review_cycles/rvc_…/participants` says who is reviewed, `POST /v1/review_cycles/rvc_…/peers` which peers review each person, and `POST /v1/review_objectives` (`rvo_…`) sets their objectives: with `target` and `actual` it gives their progress (`achievement`, in %), with `lower_better` for a goal that is a maximum, and `weight` is how much it counts against the others. `POST /v1/review_cycles/rvc_…/open` creates each evaluation that's due and puts it in the employee portal of whoever answers it, with a notice (`review` in [employee notifications](#employee-notifications)); from then on `rules` and `competencies` no longer change, and someone with no boss gets no manager evaluation. Evaluations are answered only from the portal, and those from peers and direct reports are pooled without names.

`GET /v1/review_cycles/rvc_…/results/emp_…` gives one person's result (`review_result`): the competencies (`competencies_score`, each type of reviewer's average with its weight, and each competency with `by_relation`), the objectives (`objectives_score`, what the boss scored on each one with its weight), the result (`final`) and the comments. A group with fewer than `anonymous_min` answers doesn't count and shows in `hidden`. `POST /v1/review_cycles/rvc_…/calibrations` saves the calibrated score (`calibrated`, with its reason in `note`) and the potential (`potential`, 1 to 3); each person's `result` is the calibrated one if there is one. `POST /v1/review_cycles/rvc_…/close` saves each person's result and, with `share_results`, shows it in their portal. `DELETE /v1/review_cycles/rvc_…` deletes a cycle nobody has answered; with answers, close it. An objective the boss already scored can't change.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/review_cycles \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "issuer": "iss_OufpKqnrvx9p",
    "title": "Evaluación 2026",
    "period_start": "2026-01-01",
    "period_end": "2026-12-31",
    "share_results": true
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const reviewCycle = await fiscalisto.reviewCycles.create({
  issuer: "iss_OufpKqnrvx9p",
  title: "Evaluación 2026",
  period_start: "2026-01-01",
  period_end: "2026-12-31",
  share_results: true,
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

review_cycle = fiscalisto.review_cycles.create({
    "issuer": "iss_OufpKqnrvx9p",
    "title": "Evaluación 2026",
    "period_start": "2026-01-01",
    "period_end": "2026-12-31",
    "share_results": True,
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$reviewCycle = $fiscalisto->reviewCycles->create([
    'issuer' => 'iss_OufpKqnrvx9p',
    'title' => 'Evaluación 2026',
    'period_start' => '2026-01-01',
    'period_end' => '2026-12-31',
    'share_results' => true,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	reviewCycle, err := client.ReviewCycles.Create(ctx, &fiscalisto.CreateReviewCycleParams{
		Issuer:       fiscalisto.String("iss_OufpKqnrvx9p"),
		Title:        "Evaluación 2026",
		PeriodStart:  fiscalisto.String("2026-01-01"),
		PeriodEnd:    fiscalisto.String("2026-12-31"),
		ShareResults: fiscalisto.Bool(true),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(reviewCycle.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateReviewCycleParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var reviewCycle = fiscalisto.reviewCycles().create(new CreateReviewCycleParams()
        .setIssuer("iss_OufpKqnrvx9p")
        .setTitle("Evaluación 2026")
        .setPeriodStart("2026-01-01")
        .setPeriodEnd("2026-12-31")
        .setShareResults(true));
System.out.println(reviewCycle.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var reviewCycle = await fiscalisto.ReviewCycles.CreateAsync(new CreateReviewCycleParams
{
    Issuer = "iss_OufpKqnrvx9p",
    Title = "Evaluación 2026",
    PeriodStart = "2026-01-01",
    PeriodEnd = "2026-12-31",
    ShareResults = true,
});
```

## Each employee's deductions

Deductions that repeat on every receipt are registered once on the employee (`employee_deduction`, `edd_…`) and Fiscalisto calculates them on every ordinary receipt, through the API and on screen:

| `kind` | Deduction | `mode` and what `value` is |
|---|---|---|
| `infonavit` | `010`, with the $15 damage insurance once per bimester | `percent_sbc` (% of the SBC per calendar day), `fixed_month` (fixed monthly amount) or `vsm` (factor times the UMI), as the retention notice says |
| `fonacot` | `011` | `fixed_month`: the card's monthly retention, per day of each month |
| `pension` | `007`, before the others | `percent_net` (% of perceptions minus ISR and IMSS), `percent_gross` or `fixed_month`, as the court order says |
| `prestamo`, `anticipo` | `004`, `012` | `fixed_period`: each receipt's installment, until `total` is paid |
| `caja` | `018` | `fixed_period` |
| `sindical` | `019` | `percent_salary` or `fixed_period` |

The LFT limits apply (articles 97, 110 and 111): someone on the minimum wage only loses alimony, Infonavit and Fonacot; a loan or the savings fund don't pass 30% of what they earn above the minimum, and a loan can't exceed one month of salary or charge interest. If not everything fits, the receipt carries what fits and the rest stays in the balance (`balance`). `extraordinary: true` also takes alimony from the Christmas bonus, profit sharing and severance.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/employee_deductions \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "kind": "infonavit",
    "mode": "fixed_month",
    "value": 1300,
    "reference": "1234567890",
    "start_date": "2026-01-01"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const employeeDeduction = await fiscalisto.employeeDeductions.create({
  employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  kind: "infonavit",
  mode: "fixed_month",
  value: 1300,
  reference: "1234567890",
  start_date: "2026-01-01",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

employee_deduction = fiscalisto.employee_deductions.create({
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "kind": "infonavit",
    "mode": "fixed_month",
    "value": 1300,
    "reference": "1234567890",
    "start_date": "2026-01-01",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$employeeDeduction = $fiscalisto->employeeDeductions->create([
    'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'kind' => 'infonavit',
    'mode' => 'fixed_month',
    'value' => 1300,
    'reference' => '1234567890',
    'start_date' => '2026-01-01',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	employeeDeduction, err := client.EmployeeDeductions.Create(ctx, &fiscalisto.CreateEmployeeDeductionParams{
		Employee:  "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
		Kind:      "infonavit",
		Mode:      "fixed_month",
		Value:     1300,
		Reference: fiscalisto.String("1234567890"),
		StartDate: "2026-01-01",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(employeeDeduction.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateEmployeeDeductionParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeDeduction = fiscalisto.employeeDeductions().create(new CreateEmployeeDeductionParams()
        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setKind("infonavit")
        .setMode("fixed_month")
        .setValue(1300)
        .setReference("1234567890")
        .setStartDate("2026-01-01"));
System.out.println(employeeDeduction.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeDeduction = await fiscalisto.EmployeeDeductions.CreateAsync(new CreateEmployeeDeductionParams
{
    Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Kind = "infonavit",
    Mode = "fixed_month",
    Value = 1300,
    Reference = "1234567890",
    StartDate = "2026-01-01",
});
```

`GET /v1/employee_deductions?employee=emp_…` (or `?issuer=iss_…`) lists them with what was deducted so far (`paid`); `POST /v1/employee_deductions/{id}` changes one and `DELETE` removes it: stamped receipts keep it. On the receipt each one is one more entry in `deductions`, with its type and key (`010`, `010SD` the Infonavit insurance, `011`, `007`…).

## Each employee's vacations

`GET /v1/employees/{id}/vacations` returns the employee's vacation control (`employee_vacations`), like **Nómina › Empleados › Vacaciones**: the days of each completed year of service (LFT article 76), the days taken, the days left (`remaining_days`), the last day to grant them (`grant_by`, six months after the anniversary, article 81) and when they prescribe (`prescribes_on`, one year later, article 516). `status` is `pending`, `late` (past the deadline), `prescribed` or `taken`. `pending_days` adds up the ones that haven't prescribed; `current_year` is the year in course, with the days taken in advance (`taken_in_advance`) and its proportional part to date (`accrued_days`). `?as_of=YYYY-MM-DD` calculates it at another date; without it, today or their termination date.

The days taken (`taken`) are the `incidents.vacation_days` of their stamped, non-canceled receipts, at the end date of their period, and come off the oldest year that hasn't prescribed. For the balance they had before Fiscalisto, `POST /v1/employees/{id}/vacations` with `opening_date`, `opening_pending_days` (days from completed years) and `opening_taken_days` (taken in the year in course); receipts before that date no longer count and `opening_date: null` removes it:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/employees/emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV/vacations \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "opening_date": "2026-05-01",
    "opening_pending_days": 10,
    "opening_taken_days": 0
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const employeeVacations = await fiscalisto.employees.updateVacations("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", {
  opening_date: "2026-05-01",
  opening_pending_days: 10,
  opening_taken_days: 0,
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

employee_vacations = fiscalisto.employees.update_vacations("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", {
    "opening_date": "2026-05-01",
    "opening_pending_days": 10,
    "opening_taken_days": 0,
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$employeeVacations = $fiscalisto->employees->updateVacations('emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV', [
    'opening_date' => '2026-05-01',
    'opening_pending_days' => 10,
    'opening_taken_days' => 0,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	employeeVacations, err := client.Employees.UpdateVacations(ctx, "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", &fiscalisto.UpdateEmployeeVacationsParams{
		OpeningDate:        fiscalisto.String("2026-05-01"),
		OpeningPendingDays: fiscalisto.Float64(10),
		OpeningTakenDays:   fiscalisto.Float64(0),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *employeeVacations)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.UpdateEmployeeVacationsParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeVacations = fiscalisto.employees().updateVacations("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", new UpdateEmployeeVacationsParams()
        .setOpeningDate("2026-05-01")
        .setOpeningPendingDays(10)
        .setOpeningTakenDays(0));
System.out.println(employeeVacations);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeVacations = await fiscalisto.Employees.UpdateVacationsAsync("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", new UpdateEmployeeVacationsParams
{
    OpeningDate = "2026-05-01",
    OpeningPendingDays = 10,
    OpeningTakenDays = 0,
});
```

The severance uses this control: if you send neither `vacation_days_taken` nor `vacation_days_owed`, it pays the days pending from past years and the proportional part of the year in course less what was taken in advance.

### Constancia de vacaciones

`GET /v1/employees/{id}/vacations/certificate` returns as a PDF the certificate article 81 of the LFT requires every year: their seniority at the last anniversary, the days they're owed with their prima vacacional, when to enjoy them and the days still pending from past years with the date they prescribe, with space for the signatures. With `enjoy_from` and `enjoy_to` (YYYY-MM-DD, both) it states the dates they'll enjoy them; without them, that it will be within the six months after the anniversary. Before their first anniversary it says when they complete it and how many days they'll get. `as_of` dates it another day.

### Pay statement

`GET /v1/employees/{id}/pay_statement?year=2026` returns as a PDF what the employee was paid that year, from their vigente payroll receipts by payment date: each perception with its taxed and exempt part, the deductions (ISR withheld, IMSS and others), the other payments with the subsidio para el empleo caused, and the net. It summarizes their payroll CFDI, which are the proof of what was paid and withheld (LISR art. 99 fr. III); it doesn't replace them. `year` goes as YYYY, from 2014. The employee downloads it from their portal too.

### Portal del empleado

`GET /v1/employees/{id}/portal` returns the employee's portal (`employee_portal`): their personal link (`url`, no account) where they see, download and sign their recibos as received and ask for vacation days; how many phones open it (`phones`) and the recibos they signed (`signed_receipts`, with `uuid` and `signed_at`). `POST /v1/employees/{id}/portal` with `action` creates it (`enable`), makes a new one (`renew`: the old one stops working) or turns it off (`disable`); `send_email: true` emails it to them.

What the employee asks for arrives as a `vacation_request` (`vrq_…`), with the working days between `from` and `to` (no Sundays or statutory rest days). `GET /v1/vacation_requests` lists them (`employee`, `status`), and `POST /v1/vacation_requests/{id}/approve` (with `days` if different, and `note`) or `/reject` (with `note`, which the employee sees) decides them. Approved days are suggested in the Incidencias of the period's recibo; they are never added on their own:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/vacation_requests/vrq_OufpKqnrvx9p3RxmD1RIDg5/approve \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "days": 4,
    "note": "Que disfrute"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const vacationRequest = await fiscalisto.vacationRequests.approve("vrq_OufpKqnrvx9p3RxmD1RIDg5", { days: 4, note: "Que disfrute" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

vacation_request = fiscalisto.vacation_requests.approve("vrq_OufpKqnrvx9p3RxmD1RIDg5", {"days": 4, "note": "Que disfrute"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$vacationRequest = $fiscalisto->vacationRequests->approve('vrq_OufpKqnrvx9p3RxmD1RIDg5', ['days' => 4, 'note' => 'Que disfrute']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	vacationRequest, err := client.VacationRequests.Approve(ctx, "vrq_OufpKqnrvx9p3RxmD1RIDg5", &fiscalisto.ApproveVacationRequestParams{
		Days: fiscalisto.Float64(4),
		Note: fiscalisto.String("Que disfrute"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(vacationRequest.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ApproveVacationRequestParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var vacationRequest = fiscalisto.vacationRequests().approve("vrq_OufpKqnrvx9p3RxmD1RIDg5", new ApproveVacationRequestParams().setDays(4).setNote("Que disfrute"));
System.out.println(vacationRequest.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var vacationRequest = await fiscalisto.VacationRequests.ApproveAsync("vrq_OufpKqnrvx9p3RxmD1RIDg5", new ApproveVacationRequestParams
{
    Days = 4,
    Note = "Que disfrute",
});
```

#### Employee notifications

The employee can install their link on their phone as the **Mi nómina** app and turn on notifications: they get one with each new recibo, when one is canceled, with the answer to their vacation request and, if a recibo is still not signed, a reminder. Employees who didn't turn them on get them by email. The portal has `push_phones` (the phones with notifications) and `notices`, their last 10 notifications with `kind`, `channel` (how it reached them: `push`, `email`, `off`, `none`, `skipped` or `stale`; `null` while it is waiting to go out) and `sent_at`. Notifications never show amounts, because they appear on the lock screen.

`GET /v1/employee_notice_settings` says which notifications the issuer's employees get and `POST /v1/employee_notice_settings` changes it: `receipt`, `receipt_canceled`, `vacation`, `survey` (when a [workplace climate](#workplace-climate-and-nom-035) survey opens for them), `review` (when a [performance review cycle](#performance-reviews) opens with evaluations for them to do), `sign_reminder_days` (the days without signing before reminding them, once; `0`, never), `email_fallback` (by email to whoever has no notifications) and `quiet_hours` (anything between 21:00 and 7:00, Central Mexico time, arrives at 7:00). Whatever you don't send stays as it was, and each employee can turn off their own from their link:

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/employee_notice_settings \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sign_reminder_days": 5,
    "quiet_hours": true
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const employeeNoticeSettings = await fiscalisto.employeeNoticeSettings.update({ sign_reminder_days: 5, quiet_hours: true });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

employee_notice_settings = fiscalisto.employee_notice_settings.update({"sign_reminder_days": 5, "quiet_hours": True})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$employeeNoticeSettings = $fiscalisto->employeeNoticeSettings->update([
    'sign_reminder_days' => 5,
    'quiet_hours' => true,
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	employeeNoticeSettings, err := client.EmployeeNoticeSettings.Update(ctx, &fiscalisto.UpdateEmployeeNoticeSettingsParams{
		SignReminderDays: fiscalisto.Int64(5),
		QuietHours:       fiscalisto.Bool(true),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *employeeNoticeSettings)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.UpdateEmployeeNoticeSettingsParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeNoticeSettings = fiscalisto.employeeNoticeSettings().update(new UpdateEmployeeNoticeSettingsParams()
        .setSignReminderDays(5)
        .setQuietHours(true));
System.out.println(employeeNoticeSettings);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var employeeNoticeSettings = await fiscalisto.EmployeeNoticeSettings.UpdateAsync(new UpdateEmployeeNoticeSettingsParams
{
    SignReminderDays = 5,
    QuietHours = true,
});
```
## Attendance

The electronic work-hours record the LFT requires (art. 132, mandatory from January 1, 2027) is the same one as **Nómina › Asistencia** in the app: each employee marks their entrada and salida with their own link (no account) by scanning the code at the door, or with their NIP on the checador. `GET /v1/attendance` gives the period (`from` and `to`, up to 92 days) per employee: minutes worked against their schedule, `absences`, late arrivals, days without a salida, marks with notes to review, and overtime split into double (`overtime_double_minutes`) and triple (`overtime_triple_minutes`) by week, as each year's law says. With `employee` it also brings each day (`days`) and each mark (`marks`), including the voided ones with their reason.

The ordinary week drops from 48 hours in 2026 to 40 in 2030 (LFT art. 59 and transitorio segundo of the DOF 01-05-2026 decree): `ordinary_week_hours` says the one that applies at the end of the period, or the company's if it set a shorter one (`weekly_hours`, in **Horario y reglas**). What's worked past it in the week is overtime even when it's in the schedule: `week_excess_minutes` (per employee and per day) says how many of the double and triple minutes come from there, for example 120 a week for a 48-hour schedule in 2027.

```bash tab="cURL"
curl -G https://api.fiscalisto.com/v1/attendance \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -d from=2027-01-01 \
  -d to=2027-01-15
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const attendanceReport = await fiscalisto.attendance.get({ from: "2027-01-01", to: "2027-01-15" });
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

attendance_report = fiscalisto.attendance.get({"from": "2027-01-01", "to": "2027-01-15"})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$attendanceReport = $fiscalisto->attendance->get(['from' => '2027-01-01', 'to' => '2027-01-15']);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	attendanceReport, err := client.Attendance.Get(ctx, &fiscalisto.GetAttendanceParams{
		From: "2027-01-01",
		To:   "2027-01-15",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *attendanceReport)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.GetAttendanceParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceReport = fiscalisto.attendance().get(new GetAttendanceParams().setFrom("2027-01-01").setTo("2027-01-15"));
System.out.println(attendanceReport);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceReport = await fiscalisto.Attendance.GetAsync(new GetAttendanceParams
{
    From = "2027-01-01",
    To = "2027-01-15",
});
```

If you already have another time clock, send its marks with `POST /v1/attendance/marks`: `employee`, `kind` (`in` or `out`), `at` with its time zone and, if you want, `reason`. They are kept with `method` `api` and the employee sees them in their link. The same mark of the same employee within 60 seconds isn't duplicated.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/attendance/marks \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "kind": "in",
    "at": "2027-01-04T09:02:00-06:00",
    "reason": "Reloj checador de la planta"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const attendanceMark = await fiscalisto.attendance.createMark({
  employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  kind: "in",
  at: "2027-01-04T09:02:00-06:00",
  reason: "Reloj checador de la planta",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

attendance_mark = fiscalisto.attendance.create_mark({
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "kind": "in",
    "at": "2027-01-04T09:02:00-06:00",
    "reason": "Reloj checador de la planta",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$attendanceMark = $fiscalisto->attendance->createMark([
    'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'kind' => 'in',
    'at' => '2027-01-04T09:02:00-06:00',
    'reason' => 'Reloj checador de la planta',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	attendanceMark, err := client.Attendance.CreateMark(ctx, &fiscalisto.CreateAttendanceMarkParams{
		Employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
		Kind:     "in",
		At:       "2027-01-04T09:02:00-06:00",
		Reason:   fiscalisto.String("Reloj checador de la planta"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(attendanceMark.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateAttendanceMarkParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceMark = fiscalisto.attendance().createMark(new CreateAttendanceMarkParams()
        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setKind("in")
        .setAt("2027-01-04T09:02:00-06:00")
        .setReason("Reloj checador de la planta"));
System.out.println(attendanceMark.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceMark = await fiscalisto.Attendance.CreateMarkAsync(new CreateAttendanceMarkParams
{
    Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Kind = "in",
    At = "2027-01-04T09:02:00-06:00",
    Reason = "Reloj checador de la planta",
});
```

A wrong mark is voided with `POST /v1/attendance/marks/{id}/void` and its `reason`: it stops counting and stays crossed out with who and when, never deleted. The period's absences and disability days go in the receipt as `absences` and `disability_days`; double and triple overtime is paid in the receipt's [incidents](#incidents).

How overtime reaches payroll is `overtime_policy` in the report: `approval` (it needs authorization, the default), `all` (all of it counts) or `none` (no overtime: the extra time stays in the record and never counts). With `approval`, staying late isn't enough: it counts only up to what the company authorized for that day. Authorize it before or after with `POST /v1/attendance/overtime`: `employee`, `date` and `minutes` (`null` takes the decision away); `rejected: true` with a `comment` rejects all of that day's overtime. The report keeps all the extra time (`overtime_minutes`) apart from what nobody authorized (`unapproved_overtime_minutes`) and from what was rejected (`rejected_overtime_minutes`): those stay in the record but not in the double or triple hours.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/attendance/overtime \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "date": "2027-01-08",
    "minutes": 120,
    "comment": "Cierre de inventario"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const attendanceOvertime = await fiscalisto.attendance.approveOvertime({
  employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  date: "2027-01-08",
  minutes: 120,
  comment: "Cierre de inventario",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

attendance_overtime = fiscalisto.attendance.approve_overtime({
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "date": "2027-01-08",
    "minutes": 120,
    "comment": "Cierre de inventario",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$attendanceOvertime = $fiscalisto->attendance->approveOvertime([
    'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'date' => '2027-01-08',
    'minutes' => 120,
    'comment' => 'Cierre de inventario',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	attendanceOvertime, err := client.Attendance.ApproveOvertime(ctx, &fiscalisto.ApproveAttendanceOvertimeParams{
		Employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
		Date:     "2027-01-08",
		Minutes:  fiscalisto.Int64(120),
		Comment:  fiscalisto.String("Cierre de inventario"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *attendanceOvertime)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.ApproveAttendanceOvertimeParams;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceOvertime = fiscalisto.attendance().approveOvertime(new ApproveAttendanceOvertimeParams()
        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setDate("2027-01-08")
        .setMinutes(120)
        .setComment("Cierre de inventario"));
System.out.println(attendanceOvertime);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceOvertime = await fiscalisto.Attendance.ApproveOvertimeAsync(new ApproveAttendanceOvertimeParams
{
    Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Date = "2027-01-08",
    Minutes = 120,
    Comment = "Cierre de inventario",
});
```

### Shifts and shift rotations

For people who don't work the same hours every week. A shift (`ats_…`, `POST /v1/attendance/shifts`) has a `name`, its `segments` (one, or two or three in a split shift: the time between segments isn't working time), `break_minutes` and `break_paid` (the break counts as working time when the worker can't leave the premises, LFT art. 64). A segment may cross midnight (`22:00` to `06:00`) and counts on the day it starts. Each shift brings its legal `jornada` (art. 60): `diurna` between 6:00 and 20:00, `nocturna` between 20:00 and 6:00, and `mixta` with less than 3 h 30 min of night (with more it's nocturna). If it exceeds the art. 61 maximum (8 h, 7 h and 7 h 30 min) or lacks the half-hour break of art. 63, `warnings` says so, and it's saved anyway: art. 58 lets the hours be distributed by agreement.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/attendance/shifts \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Nocturno",
    "segments": [{ "start": "22:00", "end": "06:00" }],
    "break_minutes": 30,
    "break_paid": true,
    "color": "violet"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const attendanceShift = await fiscalisto.attendance.createShift({
  name: "Nocturno",
  segments: [{ start: "22:00", end: "06:00" }],
  break_minutes: 30,
  break_paid: true,
  color: "violet",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

attendance_shift = fiscalisto.attendance.create_shift({
    "name": "Nocturno",
    "segments": [{"start": "22:00", "end": "06:00"}],
    "break_minutes": 30,
    "break_paid": True,
    "color": "violet",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$attendanceShift = $fiscalisto->attendance->createShift([
    'name' => 'Nocturno',
    'segments' => [['start' => '22:00', 'end' => '06:00']],
    'break_minutes' => 30,
    'break_paid' => true,
    'color' => 'violet',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	attendanceShift, err := client.Attendance.CreateShift(ctx, &fiscalisto.CreateAttendanceShiftParams{
		Name: "Nocturno",
		Segments: []fiscalisto.CreateAttendanceShiftParamsSegment{
			{Start: "22:00", End: "06:00"},
		},
		BreakMinutes: fiscalisto.Int64(30),
		BreakPaid:    fiscalisto.Bool(true),
		Color:        fiscalisto.String("violet"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(attendanceShift.ID)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.CreateAttendanceShiftParams;
import com.fiscalisto.model.CreateAttendanceShiftParamsSegment;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceShift = fiscalisto.attendance().createShift(new CreateAttendanceShiftParams()
        .setName("Nocturno")
        .setSegments(List.of(
                new CreateAttendanceShiftParamsSegment()
                        .setStart("22:00")
                        .setEnd("06:00")
        ))
        .setBreakMinutes(30)
        .setBreakPaid(true)
        .setColor("violet"));
System.out.println(attendanceShift.getId());
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceShift = await fiscalisto.Attendance.CreateShiftAsync(new CreateAttendanceShiftParams
{
    Name = "Nocturno",
    Segments = new() { new() { Start = "22:00", End = "06:00" } },
    BreakMinutes = 30,
    BreakPaid = true,
    Color = "violet",
});
```

A shift rotation (`atr_…`, `POST /v1/attendance/rotations`) is a cycle of shifts and rest days that repeats: `days` in order, each one an `ats_…` or `null` for a rest day, 1 to 56 days (a 4×4 is four days of a shift and four `null`). If the cycle lets more than six working days go by without rest, `warning` says so (art. 69). Each employee gets their rotation in the app (Asistencia › Personas) or with `guardar_asistencia_persona` in the MCP, with the date their day 1 falls on. `POST /v1/attendance/shifts/{id}` and `POST /v1/attendance/rotations/{id}` change what you send; `archived: true` archives them.

`GET /v1/attendance/calendar` gives each employee's shift each day of a `month` (`YYYY-MM`) and where it comes from (`source`): `calendar` (a change put on the calendar), `rotation` (their rotation) or `week` (their weekly schedule), in that order. A shift swap or an extra rest day is put with `POST /v1/attendance/calendar`: `employees`, `dates` (up to 62) and `shift` (`null` for a rest day); with `clear: true` those days go back to their rotation or schedule.

```bash tab="cURL"
curl https://api.fiscalisto.com/v1/attendance/calendar \
  -H "Authorization: Bearer $FISCALISTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "employees": ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
    "dates": ["2027-01-02", "2027-01-03"],
    "shift": "ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "comment": "Cubre el turno de noche"
  }'
```

```ts tab="TypeScript"
import { Fiscalisto } from "fiscalisto";

// The key comes from FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const attendanceCalendarChange = await fiscalisto.attendance.setCalendar({
  employees: ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
  dates: ["2027-01-02", "2027-01-03"],
  shift: "ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  comment: "Cubre el turno de noche",
});
```

```python tab="Python"
from fiscalisto import Fiscalisto

# The key comes from FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

attendance_calendar_change = fiscalisto.attendance.set_calendar({
    "employees": ["emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"],
    "dates": ["2027-01-02", "2027-01-03"],
    "shift": "ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "comment": "Cubre el turno de noche",
})
```

```php tab="PHP"
<?php

use Fiscalisto\Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$attendanceCalendarChange = $fiscalisto->attendance->setCalendar([
    'employees' => ['emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV'],
    'dates' => ['2027-01-02', '2027-01-03'],
    'shift' => 'ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'comment' => 'Cubre el turno de noche',
]);
```

```go tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// The key comes from FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	attendanceCalendarChange, err := client.Attendance.SetCalendar(ctx, &fiscalisto.SetAttendanceCalendarParams{
		Employees: []string{"emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"},
		Dates:     []string{"2027-01-02", "2027-01-03"},
		Shift:     fiscalisto.String("ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"),
		Comment:   fiscalisto.String("Cubre el turno de noche"),
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *attendanceCalendarChange)
}
```

```java tab="Java"
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.model.SetAttendanceCalendarParams;
import java.util.List;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceCalendarChange = fiscalisto.attendance().setCalendar(new SetAttendanceCalendarParams()
        .setEmployees(List.of("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"))
        .setDates(List.of("2027-01-02", "2027-01-03"))
        .setShift("ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setComment("Cubre el turno de noche"));
System.out.println(attendanceCalendarChange);
```

```csharp tab="C#"
using Fiscalisto;

// The key comes from FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var attendanceCalendarChange = await fiscalisto.Attendance.SetCalendarAsync(new SetAttendanceCalendarParams
{
    Employees = new() { "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV" },
    Dates = new() { "2027-01-02", "2027-01-03" },
    Shift = "ats_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Comment = "Cubre el turno de noche",
});
```

In the report, each day brings its `jornada` and `scheduled.shift`, and `daily_jornada` says from when a day gives overtime: `agreed` (the default) past each person's agreed schedule (art. 58), or `law` past the legal jornada for their shift (art. 61). Marks made without a connection that arrived later have `offline` in `flags`, with `at` at the time they were made; `code_time` says the checador code was from another time. The company decides how many hours later it accepts them (72 by default, 0 to not accept them) in Asistencia › Horario y reglas.

## What it doesn't do

- Calculate commissions and disability payments: Fiscalisto calculates salary, ISR with subsidy and IMSS, its incidents, [each employee's deductions](#each-employees-deductions) and the [Christmas bonus, profit sharing and severance](#christmas-bonus-profit-sharing-and-severance); the rest is stamped [exactly as your system calculated it](#extraordinary-payroll).
- Send the money or report to IMSS for you: the bank file is uploaded and authorized on your portal, and the IDSE and SUA ones are uploaded with your IMSS certificate.
- Check what only SAT can check: that the employee's RFC is registered, that an entity belongs to the SNCF or that the seniority matches its records. The PAC checks it when stamping and its error comes back in the response.
- Show on the PDF the details of overtime, disabilities, severance or retirement: they go in full in the XML, and the PDF lists the perceptions, deductions and other payments with their amounts.
