FISCALISTO / API / REFERENCE
Stamp a payroll receipt · Payroll
Ordinary payroll (Nómina 1.2): Fiscalisto calculates the wage, ISR with the employment subsidy and the employee's IMSS for the period, with its incidents (incidents: overtime, Sundays, vacation and bonuses), like the app: aguinaldo, PTU and settlements are calculated by POST /v1/payroll_receipts/extraordinary; commissions, Infonavit or loans are calculated by your system and stamped with POST /v1/payroll_receipts/external (asking for them here answers payroll_calculation_unsupported). Review the receipt first with POST /v1/payroll_receipts/preview and send its confirmation_token: that way only the receipt you reviewed is stamped (if it changed, 409 payroll_calculation_changed). It's kept as a type N invoice (GET /v1/invoices/{id}). The issuer needs employer_registration.
An issuer that already stamps. In production, with its digital seal (CSD) current:
POST /v1/issuers/{id}/certificates. In test mode it stamps with SAT's test CSD.The
Idempotency-Keyheader, a new one for each call (for example, the order's id in your system). If the response is lost, repeat the call with the same one and it isn't done twice: Idempotency.
bearerAuthAuthorizationBearer <key>Your secret key: fk_test_… in test mode, fk_live_… in production. Desarrolladores › Llaves.
Idempotency-Key*stringA new one per CFDI (8 to 255 characters; your order id works). If the response is lost, repeat the request with the same value: it answers the same and never stamps twice.
8 <= length <= 255application/json- body
employee*stringThe employee (emp_…).
1 <= lengthperiod*The pay period: first and last day (FechaInicialPago, FechaFinalPago) and, if it isn't the last one, the payment day (FechaPago).
days?numberDays paid (NumDiasPagados). By default, all the period's days that apply to them.
0 < value <= 31absences?integerAbsences 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).
0 <= value <= 31disability_days?integerDays 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).
0 <= value <= 31incidents?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.
replaces?stringThe 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.
1 <= lengthsend_email?booleantrue 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.
confirmation_token?stringThe confirmation_token from POST /v1/payroll_receipts/preview: it stamps only if the receipt calculated now is exactly the one you reviewed (if not, 409 payroll_calculation_changed and it doesn't stamp). Without it, it stamps the one it calculates at that moment.
length <= 200OK. Repeating the request with the same Idempotency-Key answers the same, with the same status and the idempotent-replayed: true header.
application/json- response
An issued CFDI 4.0: income or global invoice, delivery note, credit note (E), payment complement (P) or payroll receipt (N).
id*stringObject identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
issuer*stringThe issuer (iss_…).
branch*|The branch (brn_…) it was stamped from, or null (the issuer's tax address). Its payments and credit notes follow it.
cost_center*|Its cost center (ccn_…), or null. The one sent when creating it, or the one set or changed later with POST /v1/invoices/{id}.
type*stringReceipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll.
"I""E""P""T""N"status*stringprocessing: the PAC hasn't answered (it resolves on its own; listen for invoice.stamped). valid: stamped. pending: stamped, without the UUID yet (it resolves on its own, like processing). A cancellation waiting on the customer doesn't change status: it stays valid, with cancellation.status pending. rejected: the SAT or the PAC didn't accept it (see error). canceled: canceled.
"processing""pending""valid""rejected""canceled"uuid*|Tax folio the SAT assigns (UUID of the Timbre Fiscal Digital), in uppercase.
series*|The series (Serie) it was stamped with, or null.
folio*|Internal folio. On a rejected one it is the one attempted: it isn't used up, and the series' next CFDI uses it.
date*|Issue date (Fecha), Mexico City time.
customer*The customer (Receptor) as it ended up in the CFDI: RFC, name, tax regime and postal code (and foreign if they are abroad).
use*|CFDI use (UsoCFDI), a c_UsoCFDI key. G03 by default, or S01 with regime 616.
payment_form*|Payment form (FormaPago), a c_FormaPago key: 01 cash, 03 transfer, 04 credit card, 28 debit, 99 to be defined… Required with PUE; with PPD it's 99.
payment_method*|Payment method (MetodoPago): PUE (a single payment, the default) or PPD (in installments or deferred, collected with payment complements).
payment_terms*|Payment terms (CondicionesDePago), up to 1,000 characters without «|»: «Crédito a 30 días», «50 % anticipo». They go in the XML and the PDF; income and expense receipts only. They don't change when it is due (due_date uses the customer's credit days).
notes*|Note for the customer: it appears on the PDF, not in the XML. Changed after stamping with POST /v1/invoices/{id} (the XML doesn't change; the next PDF carries it).
currency*stringCurrency, an ISO 4217 key from c_Moneda (MXN, USD, EUR…). MXN by default.
exchange_rate*|Exchange rate to pesos (TipoCambio). Required if the currency isn't MXN; use the DOF's from the previous day.
items*array<>Line items (Conceptos), at least one.
subtotal*|Sum of the amounts before taxes and discounts (SubTotal).
discount*|Discount (Descuento).
taxes*|The receipt's taxes summed by type: IVA and IEPS transferred, IVA and ISR withheld and local taxes; null on a payment complement.
total*|Total in the receipt's currency (Total).
payment_status*|Whether it has been collected (Cuentas por cobrar): paid, partial (payment complements or credit notes for part of it) or unpaid. A PUE is paid, except with paid_later until POST /v1/invoices/{id}/mark_paid. null if it isn't income or isn't valid.
amount_due*|What is left to collect, in its currency, or null.
amount_paid*|What was collected: valid payment complements and credit notes, or everything if it is a paid PUE. null if it doesn't apply.
paid_on*|A PUE that was pending collection (paid_later or mark_unpaid): the day the customer paid (YYYY-MM-DD), the one given to POST /v1/invoices/{id}/mark_paid or that of the deposit reconciled with it. null if there is no recorded payment date (a PUE paid when stamped), if it hasn't been paid or if it is PPD (its payments are in its complements).
due_date*|While it is still to be collected (unpaid or partial): the day it is due (YYYY-MM-DD), its date plus the credit days on the customer's record (or their customer group's) or, without them, the empresa's (30 if you didn't change them); a PUE with paid_later, the last day of its month. These are the days Cuentas por cobrar and the collection reminders use. null if it was already paid or doesn't apply.
related*|Related CFDIs (CfdiRelacionados): relation type from c_TipoRelacion and the UUIDs.
payment?|Only on a payment complement (type P).
payroll?Only on a payroll receipt (type N).
global?Only on a global invoice.
cancellation*|The cancellation, if requested: status, reason, replacement and when.
email*|The email send: to whom, cc to whom and when (null if it hasn't been sent).
error*|Why the SAT or the PAC didn't accept it: message, SAT code and original text.
recurring_invoice*|The recurring invoice (rin_…) that stamped it on its own, or null if it was stamped with a call.
tickets*array<string>The tickets (tkt_…) it invoices: the one your customer invoiced through autofactura, the one your team invoiced from the ticket's page, or the ones associated with it. Empty otherwise; a global invoice's tickets are in GET /v1/tickets with status=global.
origin*|What stamped the invoice; null if it was stamped outside Fiscalisto.
created_at*|When it was created, ISO 8601 with Mexico City time (-06:00).
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.
warnings?array<string>Warnings about the invoice (only in the response that stamps it or, with 202, the one that leaves it processing): it is stamped as sent.
email_error?stringWhy the email couldn't be sent; the receipt was stamped.
substitutes?The invoice this one replaced and whether it was canceled.
advance_application?The advance payment's application: method, application note and its status.
This mixes the two ways of issuing a payroll receipt:
POST /v1/payroll_receiptscalculates it from an employee (emp_…);POST /v1/payroll_receipts/externalstamps the amounts your payroll system calculated. Use the matching endpoint.Stamping requires the Idempotency-Key header (8 to 255 characters, a new one per document), so a retry never stamps twice.
The issuer is archived and no longer stamps. Its documents can still be read and canceled.
The issuer can't do that yet: the message says what it's missing (its CSD, or one in force when stamping; its RFC and tax details for viáticos). Upload it and repeat the request with the same Idempotency-Key.
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.
POST /v1/payroll_receiptsonly 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) withPOST /v1/payroll_receipts/extraordinary; pensions, bonuses and the rest are calculated by your payroll system and stamped withPOST /v1/payroll_receipts/external.paramsays which field asked for it.The account has no live stamps left: to stamp, check RFCs against SAT's lists, look up constancias, request SAT downloads or fetch declarations, the compliance opinion or the mailbox from SAT. Buy a pack in Desarrolladores › Timbres y pagos, or turn on auto-recharge. Never happens in test mode.
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 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_approvalsand wait for a person to approve it in the app.You sent a preview's confirmation_token, but the receipt calculated now is different (another receipt of the employee that month, a salary change, updated tables). Nothing was stamped: preview it again and send its new token.
Another request with the same Idempotency-Key is still running. Repeat it in a moment with the same key: it will answer the same.
The invoice breaks a SAT rule Fiscalisto checks before sending it to the PAC. No stamp was used.
message_essays which rule and how to fix it.The PAC or the SAT didn't accept it.
sat_codehas their code (CFDI40xxx) andmessage_eswhat to fix. No stamp was used.The payroll receipt can't be calculated or stamped with that data (period, days, the issuer's employer registration…).
message_essays which; for an externally calculated receipt,errorslists every problem with itsparam.- daily_limit429
You reached today's limit of something not paid with stamps. Retry-After says how many seconds until midnight in Mexico City.
Too many stamps in a row for the same issuer. Wait what Retry-After says; for many invoices use
POST /v1/invoice_batches, for a payroll runPOST /v1/payroll_batches.
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' \ -H 'Authorization: Bearer fk_test_…' \ -H 'Idempotency-Key: nomina-2026-42-empleado-9' \ -H 'Content-Type: application/json' \ -d '{ "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "period": { "start": "2026-10-10", "end": "2026-10-16" }, "send_email": true, "metadata": { "corrida": "2026-42" }}'{ "id": "inv_OufpKqnrvx9p8Nm3kR6tYp1wQz4xCv7bNs", "object": "invoice", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "branch": null, "cost_center": null, "type": "N", "status": "valid", "uuid": "52378E0C-799A-4E53-85DC-795C6A488776", "series": null, "folio": "8", "date": "2026-10-16T10:15:42", "customer": { "tax_id": "MASO451221PM4", "legal_name": "MARIA OLIVIA MARTINEZ SAGAZ", "tax_system": "605", "zip": "80290" }, "use": "CN01", "payment_form": null, "payment_method": "PUE", "payment_terms": null, "notes": null, "currency": "MXN", "exchange_rate": null, "items": [ { "description": "Pago de nómina", "product_key": "84111505", "unit_key": "ACT", "quantity": 1, "unit_price": 2240, "discount": 93.36, "taxability": "01", "iva": "0" } ], "subtotal": 2240, "discount": 93.36, "taxes": { "iva": 0, "ieps": 0, "iva_withheld": 0, "isr_withheld": 0, "local_transferred": 0, "local_withheld": 0 }, "total": 2146.64, "payment_status": null, "amount_due": null, "amount_paid": null, "paid_on": null, "due_date": null, "related": null, "cancellation": null, "email": { "to": "maria.martinez@example.com", "cc": null, "sent_at": "2026-10-16T10:15:44-06:00" }, "error": null, "recurring_invoice": null, "tickets": [], "origin": { "type": "api", "name": "Tienda en línea" }, "created_at": "2026-10-24T10:15:42-06:00", "metadata": { "corrida": "2026-42" }, "payroll": { "type": "O", "calculation": "fiscalisto", "periodicity": "02", "period": { "start": "2026-10-10", "end": "2026-10-16", "payment_date": "2026-10-16" }, "days": 7, "references": null, "employer": { "employer_registration": "Y5412345109", "curp": null }, "employee": { "id": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "curp": "MASO451221MSLRGL08", "start_date": "2024-03-04", "contract_type": "01", "unionized": false, "workday_type": "01", "regime_type": "02", "number": "9", "department": null, "position": null, "state": "SIN", "social_security_number": "12345678903", "risk_class": "1", "contribution_base_salary": 334.66, "integrated_daily_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 } ], "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 } }}Was this page helpful?
Reject a vacation request POST
Rejects it; note (why) is required and the employee sees it.
Net to gross POST
The daily salary and the SDI whose ordinary receipt for a full period pays the net you ask for, with today's ISR and IMSS, like «Calcular desde el neto» on each employee in the app. With employee it takes their pay frequency and benefits; without it, those you send or the legal ones. Without absences, incidents or deductions like Infonavit or loans. It saves nothing: to use it, update the employee.