Skip to content

FISCALISTO / API / REFERENCE

Check a receipt calculated by your system, without stamping · Payroll

Open in ChatGPTOpen in ClaudeOpen in Cursor
POST
/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[].

Authorization

bearerAuth
headerAuthorizationBearer <key>

Your secret key: fk_test_… in test mode, fk_live_… in production. Desarrolladores › Llaves.

Headers

Idempotency-Key?string

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).

Length1 <= length <= 255

Request body

application/json
  1. body

A payroll receipt your system calculated, with all its concepts and amounts: it is stamped as is.

issuer?string

The receipt's issuer (employer); without it, the only issuer in your account in this mode.

Length1 <= length
type*string

TipoNomina: O ordinary (frequency 01–10) or E extraordinary (frequency 99).

One of"O""E"
periodicity*string

PeriodicidadPago (c_PeriodicidadPago).

Lengthlength <= 2
period*

FechaInicialPago, FechaFinalPago and FechaPago.

days*number

NumDiasPagados: from 0.001 to 36160, up to 3 decimals.

employer?

The employer (Emisor of the complement): employer registration and CURP if it is a persona física.

employee*

The employee (Receptor and Nomina/Receptor) with the data from your payroll system; it doesn't use or change Fiscalisto's employees.

perceptions?array<>

Earnings (Percepcion): wages and the rest, taxable and exempt.

Itemsitems <= 500
separation?

SeparacionIndemnizacion: with earnings 022, 023 or 025.

retirement?

JubilacionPensionRetiro: with earnings 039 or 044.

deductions?array<>

Deductions (Deduccion): ISR, IMSS contributions and the rest.

Itemsitems <= 500
other_payments?array<>

Other payments (OtroPago): employment subsidy.

Itemsitems <= 100
disabilities?array<>

Incapacidades: with earning 014 or deduction 006.

Itemsitems <= 100
totals*

The totals your system calculated: Fiscalisto compares them to the cent with the lines and rejects the receipt if they don't match.

references?

Your ids: the employee and the payroll run. payroll_run_id is mandatory on an extraordinary receipt.

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?

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.

Response body

OK.

application/json
  1. response

A receipt calculated by your system, checked and not stamped: what would be stamped, as is.

object*string

What kind of object it is («invoice», «customer»…).

calculation*string

external: the amounts are the ones your system calculated.

issuer*string

The issuer (iss_…).

customer*

The employee as the CFDI recipient (Receptor).

payroll*

The payroll receipt 1.2: employee, period, earnings, deductions and other payments.

subtotal*number

SubTotal: earnings plus other payments.

discount*number

Descuento: the deductions.

total*number

Total: the net pay.

warnings*array<>

What the SAT could flag; it doesn't prevent stamping.

unsigned_xml*string

The XML that would be sent to the PAC, without seal or stamp: its amounts are exactly the ones you sent.

Errors

  • 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.

  • The issuer is archived and no longer stamps. Its documents can still be read and canceled.

  • The account has several issuers and the request doesn't say which: send issuer (iss_…).

  • The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

  • 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.

  • 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.

  • This key can't use that issuer.

  • There is no such issuer in the account (or it belongs to the other mode).

  • There's no object with that id (or it belongs to another issuer or the other mode).

  • 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.

Plus those of any call (key, fields, limits): Errors. They all carry code, message and, when it's about a field, param.

curl -X POST 'https://api.fiscalisto.com/v1/payroll_receipts/external/preview' \  -H 'Authorization: Bearer fk_test_…' \  -H 'Idempotency-Key: pedido-A-1042' \  -H 'Content-Type: application/json' \  -d '{  "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"  }}'
{  "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>"}

Was this page helpful?