FISCALISTO / API / REFERENCE
Stamp a whole payroll (batch) · Payroll
A whole payroll run in one request: up to 1,000 receipts of one issuer, stamped in the background one after another, without the stamps-per-second limit of a single request. In one of two ways, never mixed: receipts (employee ids; Fiscalisto calculates each receipt with the batch's period) or external_receipts (the receipts your system calculated, as in POST /v1/payroll_receipts/external, with reference instead of metadata). Everything that can be checked beforehand is checked beforehand: if something fails, none is stamped and the error says which receipt (param receipts.3.employee). What's only known when stamping (a period already paid, SAT rejecting an RFC) stays on that receipt, with its error. One receipt per employee and period: sending the run again, even with another Idempotency-Key, returns the receipts it already has. Answers 202; listen for payroll_batch.completed or look up the batch.
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
issuer?stringIssuer (iss_…). If the key has a single issuer or the account has only one, it can be left out.
^iss_name?stringThe batch's name, for you (Quincena 20).
length <= 120period?The pay period: first and last day (FechaInicialPago, FechaFinalPago) and, if it isn't the last one, the payment day (FechaPago). It applies to every receipt in receipts that doesn't carry its own.
send_email?booleanSend each employee their receipt by email (those with an email). Only with receipts.
receipts?array<>The receipts Fiscalisto calculates: one employee (emp_…) in each, as in POST /v1/payroll_receipts.
1 <= items <= 1000external_receipts?array<>The receipts your payroll system calculated, stamped as they are. Instead of receipts.
1 <= items <= 1000OK. Repeating the request with the same Idempotency-Key answers the same, with the same status and the idempotent-replayed: true header.
application/json- response
A whole payroll (up to 1,000 receipts) stamped in the background.
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_…).
name*stringThe batch's name, for you.
calculation*stringfiscalisto: Fiscalisto calculated each receipt (receipts); external: the amounts from your system were stamped (external_receipts).
"fiscalisto""external"status*stringprocessing: stamping. completed: no receipts are left to stamp.
"processing""completed"total*integerHow many receipts the batch has.
-9007199254740991 <= value <= 9007199254740991stamped*integerHow many receipts were stamped.
-9007199254740991 <= value <= 9007199254740991failed*integerHow many weren't stamped (each with its error).
-9007199254740991 <= value <= 9007199254740991processing*integerHow many are left to stamp.
-9007199254740991 <= value <= 9007199254740991created_at*|When it was created, ISO 8601 with Mexico City time (-06:00).
completed_at*|When it finished.
receipts?array<>Each employee's receipt, in the order you sent them (not included in lists).
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 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).
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.
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_batches' \ -H 'Authorization: Bearer fk_test_…' \ -H 'Idempotency-Key: nomina-2026-q20' \ -H 'Content-Type: application/json' \ -d '{ "name": "Semana 2026-43", "period": { "start": "2026-10-17", "end": "2026-10-23" }, "send_email": true, "receipts": [ { "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "reference": "s43-9" }, { "employee": "emp_OufpKqnrvx9p4TyuI2OPAsDfGhJkLzXcVb", "reference": "s43-12", "days": 5 } ]}'{ "id": "pyb_OufpKqnrvx9p6tQ2wE8rYu4iOp7aSd3fGh", "object": "payroll_batch", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Semana 2026-43", "calculation": "fiscalisto", "status": "processing", "total": 2, "stamped": 0, "failed": 0, "processing": 2, "created_at": "2026-10-23T09:00:12-06:00", "completed_at": null, "receipts": [ { "index": 0, "reference": "s43-9", "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV", "tax_id": "MASO451221PM4", "name": "MARIA OLIVIA MARTINEZ SAGAZ", "status": "processing", "invoice": null, "uuid": null, "total": null, "error": null }, { "index": 1, "reference": "s43-12", "employee": "emp_OufpKqnrvx9p4TyuI2OPAsDfGhJkLzXcVb", "tax_id": "GORA800101AB1", "name": "ANA GOMEZ RUIZ", "status": "processing", "invoice": null, "uuid": null, "total": null, "error": null } ]}Was this page helpful?