# Calculate a receipt without stamping

`POST https://api.fiscalisto.com/v1/payroll_receipts/preview`

The receipt as it would be stamped (perceptions with their incidents, ISR with the employment subsidy, IMSS contributions and the net), without stamping or using stamps, with the confirmation_token that stamps it as is and the warnings about what it doesn't include (a settlement, the year's values not loaded yet).

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge). |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `employee` | string | yes | The employee (emp_…). |
| `period` | object | yes | The pay period: first and last day (FechaInicialPago, FechaFinalPago) and, if it isn't the last one, the payment day (FechaPago). |
| `period.start` | string | yes | First day of the period (FechaInicialPago), YYYY-MM-DD. |
| `period.end` | string | yes | Last day of the period (FechaFinalPago), YYYY-MM-DD. |
| `period.payment_date` | string |  | Payment date (FechaPago), YYYY-MM-DD. The last day of the period by default. |
| `days` | number |  | Days paid (NumDiasPagados). By default, all the period's days that apply to them. (greater than 0 and up to 31) |
| `absences` | integer |  | Absences in the period (unpaid days), from 0 to 31: they aren't paid (they come out of days) and contribute to IMSS only for illness and maternity, up to 7 per month (LSS art. 31 fr. I). (from 0 to 31) |
| `disability_days` | integer |  | Days of disability IMSS issued in the period, from 0 to 31: they aren't paid (they come out of days) and don't generate the worker's IMSS contributions (LSS art. 31 fr. IV). (from 0 to 31) |
| `incidents` | object |  | The period's incidents, as in Nómina › Emitir recibos: overtime, Sundays, rest days and holidays worked, vacation, bonuses and commissions. Fiscalisto calculates their amounts, their exempt part and the ISR with the wage. |
| `incidents.double_hours` | integer |  | Double overtime hours (paid double), whole hours: up to 9 per week in 2026 and 2027, 10 in 2028, 11 in 2029 and 12 from 2030 (LFT arts. 66 and fourth transitory article of the decree DOF 01-05-2026). Half exempt, up to 5 UMA per week; all if they earn the minimum wage (LISR art. 93 fr. I). (from 0 to 200) |
| `incidents.triple_hours` | integer |  | Triple overtime hours, those beyond the week's double ones (LFT art. 68). Taxed. (from 0 to 200) |
| `incidents.overtime_days` | integer |  | Days the overtime was worked (HorasExtra node); one per 3 hours if you don't send it. (from 1 to 31) |
| `incidents.sundays` | integer |  | Sundays worked: Sunday premium of 25% of the daily salary for each one (LFT art. 71), exempt up to 1 UMA per Sunday. (from 0 to 5) |
| `incidents.rest_days_worked` | integer |  | Weekly rest days worked without resting another in its place: double salary for each one besides the day (LFT art. 73). Exempt together with overtime: half, up to 5 UMA per week between both; all if they earn the minimum wage (LISR art. 93 fr. I). (from 0 to 5) |
| `incidents.holidays_worked` | integer |  | Mandatory rest days worked (January 1, May 1, September 16, December 25, the Mondays of art. 74 and election day): double salary for each one besides the day (LFT art. 75), exempt like rest_days_worked. (from 0 to 31) |
| `incidents.vacation_days` | number |  | Vacation days taken in the period (paid as wages within days): their vacation premium with the employee's percentage, exempt up to 15 UMA in the year. (from 0 to 31) |
| `incidents.disability_pay` | object |  | If the company pays the receipt's disability_days: perception 014 with its Incapacidad node. Exempt as social welfare up to the limit of 7 UMA per year (art. 93 of the LISR); that of a work risk, all of it. |
| `incidents.disability_pay.type` | `01`, `02`, `03`, `04` | yes | Disability type (c_TipoIncapacidad): 01 work risk, 02 general illness, 03 maternity, 04 leave for medical care of children with cancer. |
| `incidents.disability_pay.rate` | number | yes | What the company pays for each day of disability, as a fraction of the daily salary: 1 all of it; 0.4 what tops up the 60% IMSS pays. (from 0 to 1) |
| `incidents.retroactive` | object |  | Back pay for a raise: the salary difference for the days already paid at the previous one, as perception 001 (key RET), taxed, paying ISR with the period's wage (art. 96 of the LISR). The IMSS contributions on the difference are covered by the salary change with its date in SUA; the receipt doesn't withhold the worker's part (art. 38 of the LSS). |
| `incidents.retroactive.from` | string | yes | Day the raise applies from (YYYY-MM-DD), before the period and up to a year before. |
| `incidents.retroactive.previous_salary` | number | yes | The employee's daily salary before the raise. The current one is the employee's: change it first with PATCH /v1/employees/{id}. (greater than 0 and up to 1000000) |
| `incidents.retroactive.days` | number |  | Days paid at the previous salary since from. If you don't send it, those of the periods already paid since that day. (greater than 0 and up to 366) |
| `incidents.bonuses` | array of object |  | The period's bonuses, commissions and incentives, taxed. (up to 10) |
| `incidents.bonuses[].type` | `010`, `049`, `028`, `038` | yes | 010 punctuality bonus, 049 attendance bonus, 028 commissions, 038 other bonus (c_TipoPercepcion). |
| `incidents.bonuses[].amount` | number | yes | Amount. (greater than 0 and up to 10000000) |
| `incidents.bonuses[].concept` | string |  | Payment concept (ConceptoPago), c_TipoContribuyenteSujetoRetencion. (up to 100 characters) |
| `replaces` | string |  | The current receipt (inv_… or UUID) this one corrects, calculated by Fiscalisto for the same employee: the new one is calculated with the employee's data as it is now, goes related with 04 and the previous one is canceled with reason 01. For a receipt your system calculated use POST /v1/payroll_receipts/external with replaces. |
| `send_email` | boolean |  | true to send the PDF and the XML by email when stamping, with Fiscalisto's design. Not sent by default. |
| `metadata` | object |  | Your own data: up to 50 keys of 40 characters with text values of up to 500. They don't go into the CFDI; they come back in the object and in webhooks. |

Example:

```json
{
  "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  "period": {
    "start": "2026-10-10",
    "end": "2026-10-16"
  }
}
```

## With the TypeScript SDK

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

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollReceiptPreview = await fiscalisto.payrollReceipts.preview({
  employee: "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  period: { start: "2026-10-10", end: "2026-10-16" },
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_receipt_preview = fiscalisto.payroll_receipts.preview({
    "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    "period": {"start": "2026-10-10", "end": "2026-10-16"},
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollReceiptPreview = $fiscalisto->payrollReceipts->preview([
    'employee' => 'emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV',
    'period' => [
        'start' => '2026-10-10',
        'end' => '2026-10-16',
    ],
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollReceiptPreview = await fiscalisto.PayrollReceipts.PreviewAsync(new PreviewPayrollReceiptParams
{
    Employee = "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
    Period = new() { Start = "2026-10-10", End = "2026-10-16" },
}, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de 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_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
		Period: fiscalisto.PreviewPayrollReceiptParamsPeriod{
			Start: "2026-10-10",
			End:   "2026-10-16",
		},
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollReceiptPreview)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.PreviewPayrollReceiptParams;
import com.fiscalisto.model.PreviewPayrollReceiptParamsPeriod;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollReceiptPreview = fiscalisto.payrollReceipts().preview(new PreviewPayrollReceiptParams()
        .setEmployee("emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV")
        .setPeriod(new PreviewPayrollReceiptParamsPeriod()
                .setStart("2026-10-10")
                .setEnd("2026-10-16")), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(payrollReceiptPreview);
```

## Response 200

OK.

A `PayrollReceiptPreview` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"payroll_receipt_preview"` | yes | What kind of object it is («invoice», «customer»…). |
| `confirmation_token` | string | yes | Send it in POST /v1/payroll_receipts to stamp exactly this receipt: if a different one is calculated when stamping, it answers 409 payroll_calculation_changed without stamping. |
| `warnings` | array of object | yes | What the receipt doesn't include or soon can't be calculated; it doesn't prevent stamping. |
| `warnings[].code` | string | yes | finiquito_not_included: the employee left in the period and the receipt doesn't include their final settlement; absences_over_monthly_limit: with this receipt they pass 7 absences in the month and the extra ones are contributed as days worked (to stop contributing, file their termination notice); payroll_rates_pending: the values (ISR, subsidy, minimum wage, UMA) for an upcoming date aren't loaded yet; net_changed_vs_previous: the net changes 10% or more (and at least $100) against the employee's previous ordinary receipt; salary_changed_vs_previous: their integrated daily salary changed since that receipt (file the change with the IMSS); low_net: deductions leave them less than 30% of their earnings. |
| `warnings[].message` | string | yes | What happened and how to fix it, for a person. |
| `employee` | string | yes | The employee (emp_…). |
| `periodicity` | string | yes | Pay frequency (PeriodicidadPago): 02 weekly, 03 every 14 days, 04 every two weeks (the default), 05 monthly. |
| `period` | object | yes | The pay period: first and last day and the pay day (FechaInicialPago, FechaFinalPago and FechaPago). |
| `period.start` | string | yes | First day of the period (FechaInicialPago), YYYY-MM-DD. |
| `period.end` | string | yes | Last day of the period (FechaFinalPago), YYYY-MM-DD. |
| `period.payment_date` | string | yes | Payment date (FechaPago), YYYY-MM-DD. The last day of the period by default. |
| `days` | number | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. |
| `imss_days` | object | yes | The days the employee's IMSS contributions were calculated for. |
| `imss_days.calendar_days` | integer | yes | Calendar days of the period they worked for the employer: IMSS contributions accrue per calendar month (LSS art. 39), not per days paid. (from -9007199254740991 to 9007199254740991) |
| `imss_days.absences` | integer | yes | Absences on the receipt. (from -9007199254740991 to 9007199254740991) |
| `imss_days.disability_days` | integer | yes | Sick-leave days on the receipt. (from -9007199254740991 to 9007199254740991) |
| `imss_days.sickness_and_maternity` | integer | yes | Days contributed for sickness and maternity (surplus, cash benefits, pensioners' medical expenses): the period without the sick leave; absences count (LSS art. 31 fr. I). (from -9007199254740991 to 9007199254740991) |
| `imss_days.disability_and_old_age` | integer | yes | Days contributed for disability and life and for old-age and severance retirement: also without the absences, up to 7 per month. (from -9007199254740991 to 9007199254740991) |
| `contribution_base_salary` | number | yes | Contribution base salary (SalarioBaseCotApor). |
| `perceptions` | array of object | yes | Earnings (Percepcion): wages and the rest, taxable and exempt. |
| `perceptions[].type` | string | yes | Earning type (TipoPercepcion), c_TipoPercepcion: 001 wages… |
| `perceptions[].key` | string | yes | Employer's code (Clave). |
| `perceptions[].concept` | string | yes | Concept (Concepto). |
| `perceptions[].taxed` | number | yes | Taxable amount (ImporteGravado). |
| `perceptions[].exempt` | number | yes | Exempt amount (ImporteExento). |
| `perceptions[].overtime` | array of object |  | Overtime (HorasExtra), with earning 019. |
| `perceptions[].overtime[].days` | integer | yes | Days with overtime (Dias). (from -9007199254740991 to 9007199254740991) |
| `perceptions[].overtime[].hours_type` | string | yes | c_TipoHoras: 01 double, 02 triple, 03 single. |
| `perceptions[].overtime[].hours` | integer | yes | Overtime hours (HorasExtra). (from -9007199254740991 to 9007199254740991) |
| `perceptions[].overtime[].amount_paid` | number | yes | Amount paid (ImportePagado). |
| `perceptions[].stock_options` | object |  | Shares or securities (AccionesOTitulos), with earning 045. |
| `perceptions[].stock_options.market_value` | number | yes | Market value (ValorMercado). |
| `perceptions[].stock_options.grant_price` | number | yes | Price when granted (PrecioAlOtorgarse). |
| `deductions` | array of object | yes | Deductions (Deduccion): ISR, IMSS contributions and the rest. |
| `deductions[].type` | string | yes | Deduction type (TipoDeduccion), c_TipoDeduccion: 001 IMSS, 002 ISR… |
| `deductions[].key` | string | yes | Employer's code (Clave). |
| `deductions[].concept` | string | yes | Concept (Concepto). |
| `deductions[].amount` | number | yes | Amount (Importe). |
| `other_payments` | array of object | yes | Other payments (OtroPago): employment subsidy. |
| `other_payments[].type` | string | yes | Other payment type (TipoOtroPago), c_TipoOtroPago: 002 employment subsidy. |
| `other_payments[].key` | string | yes | Employer's code (Clave). |
| `other_payments[].concept` | string | yes | Concept (Concepto). |
| `other_payments[].amount` | number | yes | Amount paid (Importe). |
| `other_payments[].subsidy_caused` | number |  | Subsidy accrued (SubsidioCausado). |
| `other_payments[].subsidy_applied` | number |  | Of the subsidy accrued, the ISR it avoided (not in the XML). |
| `other_payments[].balance_compensation` | object |  | Offset of the balance in favor (CompensacionSaldosAFavor), with 004. |
| `other_payments[].balance_compensation.balance` | number | yes | Balance in favor (SaldoAFavor). |
| `other_payments[].balance_compensation.year` | integer | yes | Year of the balance in favor (Año). (from -9007199254740991 to 9007199254740991) |
| `other_payments[].balance_compensation.remaining` | number | yes | Remainder of the balance in favor (RemanenteSalFav). |
| `isr` | object | yes | The period's ISR calculation: base, table, subsidy and result. |
| `isr.tariff` | number | yes | ISR according to the period's tax table. |
| `isr.subsidy` | number | yes | Employment subsidy accrued. |
| `isr.withheld` | number | yes | ISR withheld (table minus subsidy, not below 0). |
| `isr.exempt_minimum` | boolean | yes | true if they earn the minimum wage: no ISR is withheld. |
| `isr.adjustment` | object |  | The end-of-month adjustment: reversed subsidy and the ISR it withholds. |
| `isr.adjustment.reversed` | number | yes | The employment subsidy reversed in the adjustment. |
| `isr.adjustment.isr` | number | yes | The ISR withheld after the adjustment. |
| `totals` | object | yes | Totals: earnings, deductions, other payments and net pay. |
| `totals.salaries` | number | yes | Total wages, salaries and assimilated income (TotalSueldos). |
| `totals.taxed` | number | yes | Total taxable (TotalGravado). |
| `totals.exempt` | number | yes | Total exempt (TotalExento). |
| `totals.separation` | number | yes | Total separation and severance (TotalSeparacionIndemnizacion). |
| `totals.retirement` | number | yes | Total retirement, pension or withdrawal (TotalJubilacionPensionRetiro). |
| `totals.perceptions` | number | yes | Total earnings (TotalPercepciones). |
| `totals.other_deductions` | number | yes | Other deductions (TotalOtrasDeducciones). |
| `totals.taxes_withheld` | number | yes | Taxes withheld (TotalImpuestosRetenidos). |
| `totals.deductions` | number | yes | Total deductions (TotalDeducciones). |
| `totals.other_payments` | number | yes | Total other payments (TotalOtrosPagos). |
| `totals.subtotal` | number | yes | Receipt subtotal: earnings plus other payments. |
| `totals.net` | number | yes | Net pay for the employee. |
| `explanation` | array of object | yes | How each ISR, employment subsidy and IMSS line was calculated: base, rate or tariff row, the arithmetic and the article of the law. They are the receipt's own figures, not a recalculation. |
| `explanation[].id` | string | yes | isr, subsidio, isr_ajuste (the subsidy's month-end adjustment) or imss_eym_excedente, imss_eym_dinero, imss_gmp, imss_iv, imss_cv (each employee IMSS quota). |
| `explanation[].kind` | `isr`, `subsidio`, `imss` | yes | isr: the tax; subsidio: the subsidio para el empleo; imss: one of the worker's IMSS quotas. |
| `explanation[].concept` | string | yes | The line as the receipt names it (in Spanish). |
| `explanation[].amount` | number | yes | What the receipt has on that line. |
| `explanation[].summary` | string | yes | What the line is and why it came out like this, in one sentence (in Spanish). |
| `explanation[].steps` | array of object | yes | The base, the rate or tariff row and the arithmetic, in order; the last step is the amount. |
| `explanation[].steps[].label` | string | yes | Which figure it is (in Spanish): the base, the rate, the days… |
| `explanation[].steps[].value` | number | yes | The figure, in the unit given by unit. |
| `explanation[].steps[].unit` | `mxn`, `pct`, `days` | yes | mxn: pesos; pct: rate (0.01125 is 1.125%); days: days. |
| `explanation[].steps[].formula` | string |  | The arithmetic with the receipt's figures. |
| `explanation[].law` | array of object | yes | The legal basis of each figure. |
| `explanation[].law[].ref` | string | yes | Law and article: «LISR art. 96», «LSS art. 147». |
| `explanation[].law[].says` | string | yes | What it says that matters here (in Spanish). |

```json
{
  "object": "payroll_receipt_preview",
  "confirmation_token": "9f2c4e0a7b1d3c5e8f6a2b4d6c8e0f1a3b5d7c9e1f2a4b6c8d0e2f4a6b8c0d2e",
  "warnings": [],
  "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
  "periodicity": "02",
  "period": {
    "start": "2026-10-10",
    "end": "2026-10-16",
    "payment_date": "2026-10-16"
  },
  "days": 7,
  "imss_days": {
    "calendar_days": 7,
    "absences": 0,
    "disability_days": 0,
    "sickness_and_maternity": 7,
    "disability_and_old_age": 7
  },
  "contribution_base_salary": 334.66,
  "perceptions": [
    {
      "type": "001",
      "key": "001",
      "concept": "Sueldo",
      "taxed": 2240,
      "exempt": 0
    }
  ],
  "deductions": [
    {
      "type": "001",
      "key": "001",
      "concept": "Cuotas IMSS",
      "amount": 55.63
    },
    {
      "type": "002",
      "key": "002",
      "concept": "ISR",
      "amount": 37.73
    }
  ],
  "other_payments": [
    {
      "type": "002",
      "key": "002",
      "concept": "Subsidio para el empleo del Decreto que otorga el subsidio para el empleo (DOF 1 de mayo de 2024)",
      "amount": 0,
      "subsidy_caused": 123.34,
      "subsidy_applied": 123.34
    }
  ],
  "isr": {
    "tariff": 161.07,
    "subsidy": 123.34,
    "withheld": 37.73,
    "exempt_minimum": false
  },
  "totals": {
    "salaries": 2240,
    "taxed": 2240,
    "exempt": 0,
    "separation": 0,
    "retirement": 0,
    "perceptions": 2240,
    "other_deductions": 55.63,
    "taxes_withheld": 37.73,
    "deductions": 93.36,
    "other_payments": 0,
    "subtotal": 2240,
    "net": 2146.64
  },
  "explanation": [
    {
      "id": "isr",
      "kind": "isr",
      "concept": "ISR",
      "amount": 37.73,
      "summary": "Tarifa de 7 días del art. 96 (Anexo 8 RMF 2026, rubro B, fracción II) sobre $2,240.00 gravados, menos el subsidio para el empleo.",
      "steps": [
        {
          "label": "Ingresos gravados del periodo",
          "value": 2240,
          "unit": "mxn"
        },
        {
          "label": "Límite inferior de su renglón de la tarifa",
          "value": 1650.68,
          "unit": "mxn"
        },
        {
          "label": "Excedente del límite inferior",
          "value": 589.32,
          "unit": "mxn",
          "formula": "$2,240.00 − $1,650.68"
        },
        {
          "label": "Porcentaje sobre el excedente",
          "value": 0.1088,
          "unit": "pct"
        },
        {
          "label": "Impuesto marginal",
          "value": 64.12,
          "unit": "mxn",
          "formula": "$589.32 × 10.88%"
        },
        {
          "label": "Cuota fija",
          "value": 96.95,
          "unit": "mxn"
        },
        {
          "label": "ISR según la tarifa",
          "value": 161.07,
          "unit": "mxn",
          "formula": "$64.12 + $96.95"
        },
        {
          "label": "Menos subsidio para el empleo aplicado",
          "value": 123.34,
          "unit": "mxn"
        },
        {
          "label": "ISR retenido",
          "value": 37.73,
          "unit": "mxn",
          "formula": "$161.07 − $123.34"
        }
      ],
      "law": [
        {
          "ref": "LISR art. 94",
          "says": "El sueldo y las demás prestaciones de la relación laboral son ingresos por salarios."
        },
        {
          "ref": "LISR art. 96",
          "says": "Quien paga salarios retiene el ISR aplicando la tarifa a los ingresos gravados del periodo; no se retiene a quien en el mes solo percibe un salario mínimo."
        },
        {
          "ref": "Decreto del subsidio para el empleo, art. Segundo (DOF 01-05-2024, reformado DOF 31-12-2025)",
          "says": "Subsidio de 15.02% de la UMA mensual para quien gana hasta $11,492.66 al mes; en pagos menores a un mes, entre 30.4 por los días del periodo, sin pasar del monto mensual; se aplica solo contra el ISR del mes."
        }
      ]
    }
  ]
}
```

## Errors

- `calculation_mode_ambiguous` (400): This mixes the two ways of issuing a payroll receipt: POST /v1/payroll_receipts calculates it from an employee (emp_…); POST /v1/payroll_receipts/external stamps the amounts your payroll system calculated. Use the matching endpoint.
- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.
- `payroll_approval_required` (409): The issuer requires the payroll run (prenómina) to be approved before stamping, and this receipt isn't in the period's approved run with these amounts and payment date (not requested, awaiting approval, rejected, or the receipt changed). Nothing was stamped: request it with POST /v1/payroll_approvals and wait for a person to approve it in the app.
- `payroll_calculation_unsupported` (400): POST /v1/payroll_receipts only calculates ordinary payroll (salary, ISR with the employment subsidy and the employee's IMSS quotas). Fiscalisto calculates the aguinaldo, PTU and severance (finiquito or liquidación) with POST /v1/payroll_receipts/extraordinary; pensions, bonuses and the rest are calculated by your payroll system and stamped with POST /v1/payroll_receipts/external. `param` says which field asked for it.
- `payroll_invalid` (422): The payroll receipt can't be calculated or stamped with that data (period, days, the issuer's employer registration…). `message_es` says which; for an externally calculated receipt, `errors` lists every problem with its `param`.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
