Skip to content

FISCALISTO / API / REFERENCE

File to pay the payroll at the bank · Payroll

Open in ChatGPTOpen in ClaudeOpen in Cursor
POST
/v1/payroll_bank_files

The disbursement file that pays each employee's net from your bank's portal: BBVA (Net Cash), Banamex (BancaNet, layout D), Banorte (Banorte en su Empresa), Santander (Enlace) or a SPEI CSV for any bank. It takes the stamped (and not canceled) payroll receipts with that payment date, adds them up per employee and pays the CLABE on their record (clabe on the employee): within the same bank by account, to another one by SPEI. It doesn't charge or move money: you upload it to the bank and authorize it there. Whoever can't be paid (no CLABE, another bank on Santander) goes in excluded with the reason. Upload the first one as a test: each portal validates it before loading anything.

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
issuer?string

Issuer (iss_…). If the key has a single issuer or the account has only one, it can be left out.

Pattern^iss_
payment_date*string

The receipts' payment date (FechaPago): the payroll receipts stamped with that date are paid, added up per employee. It's also the day the bank applies the file.

Pattern^\d{4}-\d{2}-\d{2}$
layout?string

The bank's format: bbva (Net Cash), banamex (BancaNet, layout D), banorte (Banorte en su Empresa), santander (Enlace, Santander accounts only) or spei (CSV for any bank). By default, that of account's bank.

One of"bbva""banamex""banorte""santander""spei"
account?string

The CLABE of the issuer's debit account. By default, the one used last time in the app, or its first bank account.

Pattern^\d{18}$
sequence?integer

The day's file (1 to 99): a second file on the same day carries another number. 1 by default.

Range1 <= value <= 99
client_number?string

Banamex: your BancaNet customer number (12 digits).

Pattern^\d{1,12}$
issuer_number?string

Banorte: your issuer number (5 digits).

Pattern^\d{1,5}$

Response body

OK.

application/json
  1. response

The file to pay payroll from the bank's portal (it costs nothing).

object*string

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

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

issuer*string

The issuer (iss_…).

layout*string

The bank's format: bbva, banamex, banorte, santander or spei (CSV).

One of"bbva""banamex""banorte""santander""spei"
payment_date*string

Payment date (FechaPago), YYYY-MM-DD. The last day of the period by default.

account*|

The CLABE of the account to debit.

file_name*string

The name the bank's portal expects it with.

content_type*string

text/plain for the banks' portals, text/csv for spei.

One of"text/plain""text/csv"
content*string

The file as text, with lines ending in CR LF.

content_base64*string

The same file in Windows-1252 (ANSI), in base64: save it as is to upload it.

total*number

Total in the receipt's currency (Total).

count*integer

How many payments it carries.

Range-9007199254740991 <= value <= 9007199254740991
payments*array<>

Each payment in the file, in the order it goes.

excluded*array<>

Who isn't in the file and why (no CLABE, another bank…).

Errors

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

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_bank_files' \  -H 'Authorization: Bearer fk_test_…' \  -H 'Idempotency-Key: pedido-A-1042' \  -H 'Content-Type: application/json' \  -d '{  "payment_date": "2026-10-31",  "layout": "bbva"}'
{  "object": "payroll_bank_file",  "livemode": false,  "issuer": "iss_OufpKqnrvx9p",  "layout": "bbva",  "payment_date": "2026-10-31",  "account": "012180001122334451",  "file_name": "nomina-bbva-20261031-01.txt",  "content_type": "text/plain",  "content": "",  "content_base64": "",  "total": 5000.37,  "count": 1,  "payments": [    {      "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",      "number": "9",      "name": "MARIA OLIVIA MARTINEZ SAGAZ",      "tax_id": "MASO451221PM4",      "amount": 5000.37,      "clabe": "012180001234567899",      "spei": false,      "receipts": [        "N-118"      ]    }  ],  "excluded": []}

Was this page helpful?