Skip to content

FISCALISTO / API / REFERENCE

Calculate the tax discrepancy · SAT compliance

Open in ChatGPTOpen in ClaudeOpen in Cursor
GET
/v1/tax_discrepancy

Like «Discrepancia fiscal» (personas físicas, art. 91 LISR): expenses with CFDIs in their name and deposits into their accounts for the year, minus transfers between their accounts, loans and refunds, against the declared income; what's left is what SAT would presume is income. An issuer that's a persona moral answers parameter_invalid. It doesn't use stamps.

Authorization

bearerAuth
headerAuthorizationBearer <key>

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

Query parameters

issuer?string

The issuer (iss_…). It can be left out if the key or the account has only one.

year?integer

The fiscal year (by default, last year).

declared_income?number

The income from your annual return, if you have income Fiscalisto doesn't see (rents, interest, another employer): it replaces the income it calculates.

Response body

OK.

application/json
  1. response

A persona física's tax discrepancy in a year (art. 91 LISR): what they spent and received in their accounts against what they declared.

object*string

Always tax_discrepancy.

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_…), a persona física.

tax_id*string

Their RFC (13 characters).

year*integer

The fiscal year.

Range-9007199254740991 <= value <= 9007199254740991
spending*number

Expenses with CFDIs in their name (received, without canceled ones, minus credit notes).

deposits*number

Deposits into their accounts (from the bank statements in Conciliación).

own_transfers*number

Transfers between their accounts, which the law leaves out (art. 91 LISR).

loans*number

Loans they classified.

refunds*number

Refunds they classified.

outflows*number

Outlays: expenses plus deposits, minus transfers.

declared_income*number

The declared income that is subtracted.

declared_income_source*string

Where it comes from: tax_returns (their tax returns), payroll (their payroll receipts), declared_income (the one you sent) or none.

One of"tax_returns""payroll""declared_income""none"
discrepancy*number

Outlays minus loans, refunds and declared income, if positive: what the SAT would presume is income.

unclassified_deposits*number

Unclassified deposits in Conciliación («Por aclarar»): each one explained lowers the discrepancy.

loans_to_report*boolean

Whether their loans exceed $600,000 in the year: they only count if reported on their annual return (art. 90 LISR).

bank_statements*boolean

Whether there are bank statements for the year; without them only expenses with CFDIs count.

months*array<>

The calculation month by month.

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

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

curl -X GET 'https://api.fiscalisto.com/v1/tax_discrepancy' \  -H 'Authorization: Bearer fk_test_…'
{  "object": "tax_discrepancy",  "livemode": false,  "issuer": "iss_OufpKqnrvx9p",  "tax_id": "MASO451221PM4",  "year": 2025,  "spending": 210000,  "deposits": 390000,  "own_transfers": 120000,  "loans": 0,  "refunds": 0,  "outflows": 480000,  "declared_income": 480000,  "declared_income_source": "tax_returns",  "discrepancy": 0,  "unclassified_deposits": 60000,  "loans_to_report": false,  "bank_statements": true,  "months": [    {      "month": "2025-01",      "spending": 17500,      "deposits": 32500,      "own_transfers": 10000,      "loans": 0,      "declared_income": 40000    }  ]}

Was this page helpful?