# Check a receipt calculated by your system, without stamping

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

The same checks as when stamping, without stamping or using stamps: returns the receipt as it would be stamped, the warnings and the unsealed XML (unsigned_xml), with its amounts as they are. If something fails, payroll_invalid with errors[].

## 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 |
| --- | --- | --- | --- |
| `issuer` | string |  | The receipt's issuer (employer); without it, the only issuer in your account in this mode. |
| `type` | `O`, `E` | yes | TipoNomina: O ordinary (frequency 01–10) or E extraordinary (frequency 99). |
| `periodicity` | string | yes | PeriodicidadPago (c_PeriodicidadPago). (up to 2 characters) |
| `period` | object | yes | 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 | NumDiasPagados: from 0.001 to 36160, up to 3 decimals. |
| `employer` | object |  | The employer (Emisor of the complement): employer registration and CURP if it is a persona física. |
| `employer.registration` | string or null |  | Employer registration. Without the field: the issuer's when the contract is 01–08. null: without employer registration. |
| `employer.curp` | string or null |  | CURP of the persona física employer. Without the field: the one saved on the issuer. |
| `employer.origin_tax_id` | string |  | RfcPatronOrigen. (up to 13 characters) |
| `employer.sncf` | object |  | EntidadSNCF, only for entities that belong to the SNCF. |
| `employer.sncf.resource_origin` | string | yes | OrigenRecurso: IP, IF or IM. (up to 2 characters) |
| `employer.sncf.own_resource_amount` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `employee` | object | yes | The employee (Receptor and Nomina/Receptor) with the data from your payroll system; it doesn't use or change Fiscalisto's employees. |
| `employee.tax_id` | string | yes | Employee's RFC. XAXX010101000 if deceased: with their name and CURP. (up to 13 characters) |
| `employee.name` | string | yes | Name. (up to 300 characters) |
| `employee.zip` | string | yes | Postal code of the tax address, 5 digits, as on the constancia de situación fiscal. An issuer's is the place of issue (LugarExpedicion) of its CFDIs. (up to 5 characters) |
| `employee.curp` | string | yes | CURP, 18 characters. (up to 18 characters) |
| `employee.number` | string | yes | NumEmpleado. (up to 15 characters) |
| `employee.email` | string or null |  | For send_email; it doesn't go in the XML. |
| `employee.social_security_number` | string |  | Social security number (NumSeguridadSocial), 11 digits. (up to 15 characters) |
| `employee.start_date` | string |  | FechaInicioRelLaboral. |
| `employee.seniority` | string |  | Seniority (P52W or P1Y2M3D). Without the field and with employer registration: weeks from start_date to the end of the period (days if under a week, P3D). (up to 20 characters) |
| `employee.contract_type` | string | yes | Contract type (TipoContrato), c_TipoContrato. 01 by default, permanent. (up to 2 characters) |
| `employee.regime_type` | string | yes | Regime type (TipoRegimen): 02 wages and salaries. (up to 2 characters) |
| `employee.unionized` | boolean |  | true if they're unionized (Sindicalizado). |
| `employee.workday_type` | string |  | Shift type (TipoJornada), c_TipoJornada. 01 by default, day shift. (up to 2 characters) |
| `employee.risk_class` | string |  | The position's risk class with IMSS (RiesgoPuesto), 1 to 5. 1 by default. (up to 2 characters) |
| `employee.department` | string |  | Department (Departamento). (up to 100 characters) |
| `employee.position` | string |  | Position (Puesto). (up to 100 characters) |
| `employee.contribution_base_salary` | number |  | SalarioBaseCotApor. |
| `employee.integrated_daily_salary` | number |  | SalarioDiarioIntegrado. |
| `employee.state` | string | yes | ClaveEntFed (c_Estado): JAL, CMX, NLE… (up to 3 characters) |
| `employee.bank` | string |  | Bank (c_Banco); it doesn't go with a CLABE. (up to 3 characters) |
| `employee.bank_account` | string |  | CuentaBancaria: 18-digit CLABE, card or account. (up to 18 characters) |
| `employee.subcontracting` | array of object |  | SubContratacion: the percentage adds up to 100. (up to 50) |
| `employee.subcontracting[].tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. (up to 13 characters) |
| `employee.subcontracting[].percentage` | number | yes | PorcentajeTiempo. |
| `perceptions` | array of object |  | Earnings (Percepcion): wages and the rest, taxable and exempt. (up to 500) |
| `perceptions[].type` | string | yes | TipoPercepcion (c_TipoPercepcion): 001 wages, 002 year-end bonus… (up to 3 characters) |
| `perceptions[].key` | string | yes | Employer's code (3 to 15 characters). (up to 15 characters) |
| `perceptions[].concept` | string | yes | Payment concept (ConceptoPago), c_TipoContribuyenteSujetoRetencion. (up to 100 characters) |
| `perceptions[].taxed` | number | yes | ImporteGravado. |
| `perceptions[].exempt` | number | yes | ImporteExento. |
| `perceptions[].overtime` | array of object |  | HorasExtra: only with earning 019. (up to 100) |
| `perceptions[].overtime[].days` | number | yes | Days with overtime (Dias). |
| `perceptions[].overtime[].hours_type` | string | yes | c_TipoHoras: 01 double, 02 triple, 03 single. (up to 2 characters) |
| `perceptions[].overtime[].hours` | number | yes | Overtime hours (HorasExtra). |
| `perceptions[].overtime[].amount_paid` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `perceptions[].stock_options` | object |  | AccionesOTitulos: only with earning 045. |
| `perceptions[].stock_options.market_value` | number | yes | Market value (ValorMercado). |
| `perceptions[].stock_options.grant_price` | number | yes | Price when granted (PrecioAlOtorgarse). |
| `separation` | object |  | SeparacionIndemnizacion: with earnings 022, 023 or 025. |
| `separation.total_paid` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `separation.years_of_service` | number | yes | NumAñosServicio. |
| `separation.last_monthly_salary` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `separation.accumulable_income` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `separation.non_accumulable_income` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `retirement` | object |  | JubilacionPensionRetiro: with earnings 039 or 044. |
| `retirement.total_one_payment` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `retirement.total_installment` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `retirement.daily_amount` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `retirement.accumulable_income` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `retirement.non_accumulable_income` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `deductions` | array of object |  | Deductions (Deduccion): ISR, IMSS contributions and the rest. (up to 500) |
| `deductions[].type` | string | yes | TipoDeduccion (c_TipoDeduccion): 001 IMSS, 002 ISR, 010 Infonavit… (up to 3 characters) |
| `deductions[].key` | string | yes | The .key file in base64 (it can carry the data: prefix). (up to 15 characters) |
| `deductions[].concept` | string | yes | Concept of the outflows (IntegracEgresos/ConceptoS), up to 100 characters. (up to 100 characters) |
| `deductions[].amount` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `other_payments` | array of object |  | Other payments (OtroPago): employment subsidy. (up to 100) |
| `other_payments[].type` | string | yes | TipoOtroPago (c_TipoOtroPago): 002 employment subsidy… (up to 3 characters) |
| `other_payments[].key` | string | yes | The .key file in base64 (it can carry the data: prefix). (up to 15 characters) |
| `other_payments[].concept` | string | yes | Payment concept (ConceptoPago), c_TipoContribuyenteSujetoRetencion. (up to 100 characters) |
| `other_payments[].amount` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `other_payments[].subsidy_caused` | number |  | SubsidioCausado: only with 002. |
| `other_payments[].balance_compensation` | object |  | CompensacionSaldosAFavor: only with 004. |
| `other_payments[].balance_compensation.balance` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `other_payments[].balance_compensation.year` | number | yes | Year (Ejercicio). |
| `other_payments[].balance_compensation.remaining` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `disabilities` | array of object |  | Incapacidades: with earning 014 or deduction 006. (up to 100) |
| `disabilities[].days` | number | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. |
| `disabilities[].type` | string | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. (up to 2 characters) |
| `disabilities[].amount` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals` | object | yes | The totals your system calculated: Fiscalisto compares them to the cent with the lines and rejects the receipt if they don't match. |
| `totals.perceptions` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.deductions` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.other_payments` | number | yes | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.net` | number | yes | Net: earnings plus other payments minus deductions. |
| `totals.salaries` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.separation` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.retirement` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.taxed` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.exempt` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.taxes_withheld` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `totals.other_deductions` | number |  | Pesos with up to 2 decimals, as they are stamped: Fiscalisto doesn't round them. |
| `references` | object |  | Your ids: the employee and the payroll run. payroll_run_id is mandatory on an extraordinary receipt. |
| `references.employee_id` | string |  | The employee's id in your system. (up to 100 characters) |
| `references.payroll_run_id` | string |  | The payroll run's id in your system. (up to 100 characters) |
| `replaces` | string |  | The valid receipt (inv_… or UUID) this one replaces: relation 04, and it is canceled with reason 01. |
| `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
{
  "issuer": "iss_OufpKqnrvx9p",
  "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"
  },
  "metadata": {
    "corrida": "2026-Q19"
  }
}
```

## With the TypeScript SDK

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

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

const externalPayrollReceiptPreview = await fiscalisto.payrollReceipts.previewExternal({
  issuer: "iss_OufpKqnrvx9p",
  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",
  },
  metadata: { corrida: "2026-Q19" },
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

external_payroll_receipt_preview = fiscalisto.payroll_receipts.preview_external({
    "issuer": "iss_OufpKqnrvx9p",
    "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",
    },
    "metadata": {"corrida": "2026-Q19"},
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$externalPayrollReceiptPreview = $fiscalisto->payrollReceipts->previewExternal([
    'issuer' => 'iss_OufpKqnrvx9p',
    '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',
    ],
    'metadata' => ['corrida' => '2026-Q19'],
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var externalPayrollReceiptPreview = await fiscalisto.PayrollReceipts.PreviewExternalAsync(new ExternalPayrollReceiptCreate
{
    Issuer = "iss_OufpKqnrvx9p",
    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",
    },
    Metadata = new() { ["corrida"] = "2026-Q19" },
}, 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()

	externalPayrollReceiptPreview, err := client.PayrollReceipts.PreviewExternal(ctx, &fiscalisto.ExternalPayrollReceiptCreate{
		Issuer:      fiscalisto.String("iss_OufpKqnrvx9p"),
		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"),
		},
		Metadata: map[string]string{"corrida": "2026-Q19"},
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *externalPayrollReceiptPreview)
}
```

## With the Java SDK

```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;

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

var externalPayrollReceiptPreview = fiscalisto.payrollReceipts().previewExternal(new ExternalPayrollReceiptCreate()
        .setIssuer("iss_OufpKqnrvx9p")
        .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"))
        .setMetadata(Map.of("corrida", "2026-Q19")), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(externalPayrollReceiptPreview);
```

## Response 200

OK.

A `ExternalPayrollReceiptPreview` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"payroll_receipt_preview"` | yes | What kind of object it is («invoice», «customer»…). |
| `calculation` | `"external"` | yes | external: the amounts are the ones your system calculated. |
| `issuer` | string | yes | The issuer (iss_…). |
| `customer` | object | yes | The employee as the CFDI recipient (Receptor). |
| `customer.tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `customer.legal_name` | string | yes | Name or razón social exactly as on the constancia de situación fiscal, without the capital regime (without «S.A. de C.V.»). |
| `customer.zip` | string | yes | Postal code of the customer's tax address (DomicilioFiscalReceptor), 5 digits. |
| `payroll` | object | yes | The payroll complement 1.2 as stamped: type, period, employer, employee, earnings, deductions, other payments, their nodes and the totals. |
| `payroll.type` | `O`, `E` | yes | TipoNomina: O ordinary, E extraordinary. |
| `payroll.calculation` | `fiscalisto`, `external` | yes | fiscalisto: Fiscalisto calculated it (POST /v1/payroll_receipts); external: your payroll system calculated it and it was stamped as is (POST /v1/payroll_receipts/external). |
| `payroll.periodicity` | string | yes | Pay frequency (PeriodicidadPago): 02 weekly, 03 every 14 days, 04 every two weeks (the default), 05 monthly. |
| `payroll.period` | object | yes | Period paid: FechaInicialPago, FechaFinalPago and FechaPago. |
| `payroll.period.start` | string | yes | First day of the period (FechaInicialPago), YYYY-MM-DD. |
| `payroll.period.end` | string | yes | Last day of the period (FechaFinalPago), YYYY-MM-DD. |
| `payroll.period.payment_date` | string | yes | Payment date (FechaPago), YYYY-MM-DD. The last day of the period by default. |
| `payroll.days` | number | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. |
| `payroll.references` | object or null | yes | Your payroll system's ids (external receipts only). |
| `payroll.references.employee_id` | string or null | yes | The employee's id in your payroll system. |
| `payroll.references.payroll_run_id` | string or null | yes | The payroll run's id in your system. |
| `payroll.employer` | object | yes | The employer (Emisor of the complement): employer registration and CURP if it is a persona física. |
| `payroll.employer.employer_registration` | string or null | yes | Employer registration with IMSS (RegistroPatronal), 11 characters. Required to stamp payroll. |
| `payroll.employer.curp` | string or null | yes | CURP, 18 characters. |
| `payroll.employer.origin_tax_id` | string |  | Origin employer's RFC (RfcPatronOrigen). |
| `payroll.employer.sncf` | object |  | SNCF entity (EntidadSNCF). |
| `payroll.employer.sncf.resource_origin` | string | yes | Source of funds (OrigenRecurso): IP, IF or IM. |
| `payroll.employer.sncf.own_resource_amount` | number or null | yes | Own funds amount (MontoRecursoPropio), with IM. |
| `payroll.employee` | object | yes | The employee (Nomina/Receptor), as stamped. |
| `payroll.employee.id` | string or null | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `payroll.employee.number` | string | yes | Employee number (NumEmpleado). |
| `payroll.employee.curp` | string | yes | CURP, 18 characters. |
| `payroll.employee.social_security_number` | string or null | yes | Social security number (NumSeguridadSocial), 11 digits. |
| `payroll.employee.start_date` | string or null | yes | Start date of the employment relationship (FechaInicioRelLaboral), YYYY-MM-DD. |
| `payroll.employee.seniority` | string or null | yes | Seniority (P52W, P1Y2M3D). |
| `payroll.employee.contract_type` | string | yes | Contract type (TipoContrato), c_TipoContrato. 01 by default, permanent. |
| `payroll.employee.unionized` | boolean or null | yes | true if they're unionized (Sindicalizado). |
| `payroll.employee.workday_type` | string or null | yes | Shift type (TipoJornada), c_TipoJornada. 01 by default, day shift. |
| `payroll.employee.regime_type` | string | yes | Regime type (TipoRegimen): 02 wages and salaries. |
| `payroll.employee.department` | string or null | yes | Department (Departamento). |
| `payroll.employee.position` | string or null | yes | Position (Puesto). |
| `payroll.employee.risk_class` | string or null | yes | The position's risk class with IMSS (RiesgoPuesto), 1 to 5. 1 by default. |
| `payroll.employee.contribution_base_salary` | number or null | yes | Contribution base salary (SalarioBaseCotApor). |
| `payroll.employee.integrated_daily_salary` | number or null | yes | Integrated daily salary (SalarioDiarioIntegrado): not lower than the daily salary. |
| `payroll.employee.state` | string | yes | State where they work (ClaveEntFed): JAL, CMX, NLE… |
| `payroll.employee.bank` | string |  | Bank (Banco), c_Banco. |
| `payroll.employee.bank_account` | string |  | Bank account or CLABE (CuentaBancaria). |
| `payroll.employee.subcontracting` | array of object |  | Subcontracting (SubContratacion). |
| `payroll.employee.subcontracting[].tax_id` | string | yes | RFC (Rfc), 12 characters for a persona moral and 13 for a persona física. |
| `payroll.employee.subcontracting[].percentage` | number | yes | Time percentage (PorcentajeTiempo). |
| `payroll.perceptions` | array of object | yes | Earnings (Percepcion): wages and the rest, taxable and exempt. |
| `payroll.perceptions[].type` | string | yes | Earning type (TipoPercepcion), c_TipoPercepcion: 001 wages… |
| `payroll.perceptions[].key` | string | yes | Employer's code (Clave). |
| `payroll.perceptions[].concept` | string | yes | Concept (Concepto). |
| `payroll.perceptions[].taxed` | number | yes | Taxable amount (ImporteGravado). |
| `payroll.perceptions[].exempt` | number | yes | Exempt amount (ImporteExento). |
| `payroll.perceptions[].overtime` | array of object |  | Overtime (HorasExtra), with earning 019. |
| `payroll.perceptions[].overtime[].days` | integer | yes | Days with overtime (Dias). (from -9007199254740991 to 9007199254740991) |
| `payroll.perceptions[].overtime[].hours_type` | string | yes | c_TipoHoras: 01 double, 02 triple, 03 single. |
| `payroll.perceptions[].overtime[].hours` | integer | yes | Overtime hours (HorasExtra). (from -9007199254740991 to 9007199254740991) |
| `payroll.perceptions[].overtime[].amount_paid` | number | yes | Amount paid (ImportePagado). |
| `payroll.perceptions[].stock_options` | object |  | Shares or securities (AccionesOTitulos), with earning 045. |
| `payroll.perceptions[].stock_options.market_value` | number | yes | Market value (ValorMercado). |
| `payroll.perceptions[].stock_options.grant_price` | number | yes | Price when granted (PrecioAlOtorgarse). |
| `payroll.deductions` | array of object | yes | Deductions (Deduccion): ISR, IMSS contributions and the rest. |
| `payroll.deductions[].type` | string | yes | Deduction type (TipoDeduccion), c_TipoDeduccion: 001 IMSS, 002 ISR… |
| `payroll.deductions[].key` | string | yes | Employer's code (Clave). |
| `payroll.deductions[].concept` | string | yes | Concept (Concepto). |
| `payroll.deductions[].amount` | number | yes | Amount (Importe). |
| `payroll.other_payments` | array of object | yes | Other payments (OtroPago): employment subsidy. |
| `payroll.other_payments[].type` | string | yes | Other payment type (TipoOtroPago), c_TipoOtroPago: 002 employment subsidy. |
| `payroll.other_payments[].key` | string | yes | Employer's code (Clave). |
| `payroll.other_payments[].concept` | string | yes | Concept (Concepto). |
| `payroll.other_payments[].amount` | number | yes | Amount paid (Importe). |
| `payroll.other_payments[].subsidy_caused` | number |  | Subsidy accrued (SubsidioCausado). |
| `payroll.other_payments[].subsidy_applied` | number |  | Of the subsidy accrued, the ISR it avoided (not in the XML). |
| `payroll.other_payments[].balance_compensation` | object |  | Offset of the balance in favor (CompensacionSaldosAFavor), with 004. |
| `payroll.other_payments[].balance_compensation.balance` | number | yes | Balance in favor (SaldoAFavor). |
| `payroll.other_payments[].balance_compensation.year` | integer | yes | Year of the balance in favor (Año). (from -9007199254740991 to 9007199254740991) |
| `payroll.other_payments[].balance_compensation.remaining` | number | yes | Remainder of the balance in favor (RemanenteSalFav). |
| `payroll.separation` | object |  | SeparacionIndemnizacion (earnings 022, 023, 025). |
| `payroll.separation.total_paid` | number | yes | Total paid (TotalPagado). |
| `payroll.separation.years_of_service` | integer | yes | Years of service (NumAñosServicio). (from -9007199254740991 to 9007199254740991) |
| `payroll.separation.last_monthly_salary` | number | yes | Last ordinary monthly salary (UltimoSueldoMensOrd). |
| `payroll.separation.accumulable_income` | number | yes | Cumulative income (IngresoAcumulable). |
| `payroll.separation.non_accumulable_income` | number | yes | Non-cumulative income (IngresoNoAcumulable). |
| `payroll.retirement` | object |  | JubilacionPensionRetiro (earnings 039, 044). |
| `payroll.retirement.total_one_payment` | number |  | Total in a single payment (TotalUnaExhibicion). |
| `payroll.retirement.total_installment` | number |  | Total in installments (TotalParcialidad). |
| `payroll.retirement.daily_amount` | number |  | Daily amount (MontoDiario). |
| `payroll.retirement.accumulable_income` | number | yes | Cumulative income (IngresoAcumulable). |
| `payroll.retirement.non_accumulable_income` | number | yes | Non-cumulative income (IngresoNoAcumulable). |
| `payroll.disabilities` | array of object |  | Disabilities (earning 014 or deduction 006). |
| `payroll.disabilities[].days` | integer | yes | Days paid (NumDiasPagados). By default, all the period's days that apply to them. (from -9007199254740991 to 9007199254740991) |
| `payroll.disabilities[].type` | string | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `payroll.disabilities[].amount` | number or null | yes | Amount. |
| `payroll.imss_days` | object |  | On a receipt Fiscalisto calculated: the IMSS days. |
| `payroll.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) |
| `payroll.imss_days.absences` | integer | yes | Absences on the receipt. (from -9007199254740991 to 9007199254740991) |
| `payroll.imss_days.disability_days` | integer | yes | Sick-leave days on the receipt. (from -9007199254740991 to 9007199254740991) |
| `payroll.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) |
| `payroll.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) |
| `payroll.totals` | object | yes | Totals: earnings, deductions, other payments and net pay. |
| `payroll.totals.salaries` | number | yes | Total wages, salaries and assimilated income (TotalSueldos). |
| `payroll.totals.taxed` | number | yes | Total taxable (TotalGravado). |
| `payroll.totals.exempt` | number | yes | Total exempt (TotalExento). |
| `payroll.totals.separation` | number | yes | Total separation and severance (TotalSeparacionIndemnizacion). |
| `payroll.totals.retirement` | number | yes | Total retirement, pension or withdrawal (TotalJubilacionPensionRetiro). |
| `payroll.totals.perceptions` | number | yes | Total earnings (TotalPercepciones). |
| `payroll.totals.other_deductions` | number | yes | Other deductions (TotalOtrasDeducciones). |
| `payroll.totals.taxes_withheld` | number | yes | Taxes withheld (TotalImpuestosRetenidos). |
| `payroll.totals.deductions` | number | yes | Total deductions (TotalDeducciones). |
| `payroll.totals.other_payments` | number | yes | Total other payments (TotalOtrosPagos). |
| `payroll.totals.subtotal` | number | yes | Receipt subtotal: earnings plus other payments. |
| `payroll.totals.net` | number | yes | Net pay for the employee. |
| `subtotal` | number | yes | SubTotal: earnings plus other payments. |
| `discount` | number | yes | Descuento: the deductions. |
| `total` | number | yes | Total: the net pay. |
| `warnings` | array of object | yes | What the SAT could flag; it doesn't prevent stamping. |
| `warnings[].param` | string | yes | The request field. |
| `warnings[].code` | string | yes | Withholding key (CveRetenc), c_CveRetenc: 01 professional services, 05 leasing, 14 dividends, 16 interest, 18 payments abroad… Keys 06 and 14 to 24 carry their complement, as SAT's catalog asks (share_sale with 06 and 19, dividends with 14, distributable_remainder with 15, interest, trust_lease, foreign_payment, prize, trust, retirement_plan, mortgage_interest, financial_derivatives); 01, 02, 04 and 05 carry foreign_payment when the recipient is foreign; 26 (technology platforms) carries platform, and its totals and taxes are calculated from the operations. 27 and 28 can't be issued here. |
| `warnings[].message` | string | yes | What happened and how to fix it, for a person. |
| `unsigned_xml` | string | yes | The XML that would be sent to the PAC, without seal or stamp: its amounts are exactly the ones you sent. |

```json
{
  "object": "payroll_receipt_preview",
  "calculation": "external",
  "issuer": "iss_OufpKqnrvx9p",
  "customer": {
    "tax_id": "MASO451221PM4",
    "legal_name": "MARIA OLIVIA MARTINEZ SAGAZ",
    "zip": "80290"
  },
  "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
    }
  },
  "subtotal": 9600,
  "discount": 2913.87,
  "total": 6686.13,
  "warnings": [],
  "unsigned_xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><cfdi:Comprobante Version=\"4.0\" … TipoDeComprobante=\"N\" SubTotal=\"9600.00\" Descuento=\"2913.87\" Total=\"6686.13\" …><cfdi:Complemento><nomina12:Nomina Version=\"1.2\" TipoNomina=\"O\" FechaPago=\"2026-10-15\" FechaInicialPago=\"2026-10-01\" FechaFinalPago=\"2026-10-15\" NumDiasPagados=\"15\" TotalPercepciones=\"9600.00\" TotalDeducciones=\"2913.87\" TotalOtrosPagos=\"0.00\">…</nomina12:Nomina></cfdi:Complemento></cfdi:Comprobante>"
}
```

## 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_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.
