# Cross-check what was declared with what was invoiced

`GET https://api.fiscalisto.com/v1/accounting/cross_checks`

Each month of the year already due: the transferred, creditable and withheld VAT and the income for ISR the issuer declared (from GET /v1/sat_declarations, after POST /v1/sat_declarations/refresh) against what its CFDIs say. Up to $2 of difference is rounding (tax returns are in whole pesos). A figure the return doesn't carry in a recognizable line is unreadable with declared null, never 0. Also the VAT in its favor and the regime it invoices under. Free: it doesn't query SAT.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `year` | query |  | The fiscal year. By default, the current one. |
| `issuer` | query |  | The issuer (iss_…). It can be left out if the key or the account has only one. |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const crossChecks = await fiscalisto.accounting.crossChecks();
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

cross_checks = fiscalisto.accounting.cross_checks()
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$crossChecks = $fiscalisto->accounting->crossChecks();
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var crossChecks = await fiscalisto.Accounting.CrossChecksAsync();
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	crossChecks, err := client.Accounting.CrossChecks(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *crossChecks)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var crossChecks = fiscalisto.accounting().crossChecks();
System.out.println(crossChecks);
```

## Response 200

OK.

A `CrossChecks` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"cross_checks"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer. |
| `year` | integer | yes | The fiscal year. (from -9007199254740991 to 9007199254740991) |
| `months` | array of object | yes | Each month whose monthly return is already due (day 17 of the next month), with its cross-checks. A month with a complementary return takes, per tax, the most recent one that includes it. |
| `months[].month` | string | yes | The month (YYYY-MM). |
| `months[].status` | `matches`, `differs`, `not_filed`, `unreadable` | yes | The worst of its cross-checks: differs (doesn't match), unreadable (a figure couldn't be read), not_filed (no monthly return) or matches. |
| `months[].checks` | array of object | yes | One cross-check per figure. |
| `months[].checks[].key` | `vat_charged`, `vat_creditable`, `vat_withheld`, `isr_income`, `isr_withheld_salaries`, `isr_withheld_suppliers`, `vat_withheld_suppliers` | yes | Which figure: vat_charged (IVA transferred), vat_creditable (creditable IVA), vat_withheld (IVA withheld from it), isr_income (income for ISR: nominal for a persona moral, collected for the rest) and, only in months it withheld, isr_withheld_salaries (ISR withheld on wages and assimilated income, against its payroll receipts), isr_withheld_suppliers (ISR withheld on fees and rent, against the received invoices it paid) or vat_withheld_suppliers (IVA withheld from suppliers). |
| `months[].checks[].status` | `matches`, `differs`, `not_filed`, `unreadable` | yes | matches (up to $2 difference), differs, not_filed (there is no return for the month, or for a withholding no return for the month includes it) or unreadable (the return doesn't have the figure on a recognizable line). |
| `months[].checks[].declared` | number or null | yes | What was declared, in pesos; null if there is no return or it couldn't be read. |
| `months[].checks[].declared_without_cfdi` | number | yes | Of declared, what the return itself says didn't come from invoices: in isr_income the additional nominal income (collected without an invoice, interest) and in vat_charged the 16% IVA above the SAT's preload. It is compared separately; 0 if there is none. |
| `months[].checks[].invoiced` | number | yes | What the month's CFDIs say, with the same calculations as Impuestos. |
| `months[].checks[].difference` | number or null | yes | declared minus declared_without_cfdi minus invoiced; null if declared is null. |
| `months[].checks[].operation_number` | string or null | yes | The operation number of the return the figure came from. |
| `vat_balance_in_favor` | object | yes | The IVA in favor the year's returns show and what later months credited. An estimate from the returns read, not the SAT's account. |
| `vat_balance_in_favor.periods` | array of object | yes | Each month with IVA in favor. |
| `vat_balance_in_favor.periods[].month` | string | yes | The month whose return shows IVA in favor. |
| `vat_balance_in_favor.periods[].amount` | number | yes | That month's IVA in favor. |
| `vat_balance_in_favor.periods[].operation_number` | string | yes | That return's operation number. |
| `vat_balance_in_favor.total` | number | yes | The sum of the year's IVA in favor. |
| `vat_balance_in_favor.credited` | number | yes | What the year's returns credited from balances in favor of earlier periods. |
| `vat_balance_in_favor.remaining` | number | yes | total minus credited, never below 0: what would be left to credit or claim as a refund. |
| `tax_regimes` | object | yes | The issuer's tax regimes (registered, from its constancia) and which ones it invoiced with in the year. |
| `tax_regimes.registered` | array of string | yes | The tax regimes on its constancia (c_RegimenFiscal), entered in the app. |
| `tax_regimes.invoiced` | array of object | yes | Each tax regime it invoiced with in the year (the issuer's RegimenFiscal). |
| `tax_regimes.invoiced[].tax_regime` | string | yes | The tax regime (c_RegimenFiscal). |
| `tax_regimes.invoiced[].invoices` | integer | yes | How many CFDIs carry it (income, expense and payment, without canceled ones). (from -9007199254740991 to 9007199254740991) |
| `tax_regimes.invoiced[].first_date` | string | yes | The date of the first one (YYYY-MM-DD). |
| `tax_regimes.invoiced[].last_date` | string | yes | The date of the last one (YYYY-MM-DD). |
| `tax_regimes.invoiced[].registered` | boolean or null | yes | Whether the tax regime is on its constancia; null if the constancia's regimes weren't entered. |

```json
{
  "object": "cross_checks",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "year": 2026,
  "months": [
    {
      "month": "2026-09",
      "status": "differs",
      "checks": [
        {
          "key": "vat_charged",
          "status": "differs",
          "declared": 16000,
          "declared_without_cfdi": 0,
          "invoiced": 17600,
          "difference": -1600,
          "operation_number": "260930001234"
        },
        {
          "key": "vat_creditable",
          "status": "matches",
          "declared": 4800,
          "declared_without_cfdi": 0,
          "invoiced": 4800.4,
          "difference": -0.4,
          "operation_number": "260930001234"
        },
        {
          "key": "vat_withheld",
          "status": "matches",
          "declared": 0,
          "declared_without_cfdi": 0,
          "invoiced": 0,
          "difference": 0,
          "operation_number": "260930001234"
        },
        {
          "key": "isr_income",
          "status": "unreadable",
          "declared": null,
          "declared_without_cfdi": 0,
          "invoiced": 110000,
          "difference": null,
          "operation_number": "260930001234"
        },
        {
          "key": "isr_withheld_salaries",
          "status": "matches",
          "declared": 8450,
          "declared_without_cfdi": 0,
          "invoiced": 8449.6,
          "difference": 0.4,
          "operation_number": "260930001234"
        }
      ]
    }
  ],
  "vat_balance_in_favor": {
    "periods": [
      {
        "month": "2026-02",
        "amount": 3000,
        "operation_number": "260317004567"
      }
    ],
    "total": 3000,
    "credited": 1200,
    "remaining": 1800
  },
  "tax_regimes": {
    "registered": [
      "601"
    ],
    "invoiced": [
      {
        "tax_regime": "601",
        "invoices": 214,
        "first_date": "2026-01-03",
        "last_date": "2026-10-24",
        "registered": true
      }
    ]
  }
}
```

## Errors

- `feature_not_in_plan` (403): 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.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): 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.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
