# Validate a customer's tax data

`POST https://api.fiscalisto.com/v1/tax_ids/validate`

Before stamping: whether the RFC, name, regime, postal code and use will pass. Without cif_id it checks what can be checked without SAT (format, regime for that type of person, postal code in the catalog, use for the regime, name without «S.A. de C.V.») and SAT's lists. With the idCIF of the constancia it reads SAT's record and compares the name, postal code and regime, as the PAC will. It doesn't use stamps.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | 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). |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tax_id` | string | yes | The customer's RFC. (up to 20 characters) |
| `legal_name` | string |  | The name or razón social you'll put on the invoice. (up to 300 characters) |
| `tax_system` | string |  | Their tax regime (c_RegimenFiscal), like 601 or 612. |
| `zip` | string |  | The postal code of their tax address. |
| `use` | string |  | The CFDI use (c_UsoCFDI), like G03. |
| `cif_id` | string |  | The idCIF of their constancia de situación fiscal (11 digits, top left, next to the QR). With it everything is compared with what SAT has. |

Example:

```json
{
  "tax_id": "ICV060329BY0",
  "legal_name": "Inmobiliaria CVA, S.A. de C.V.",
  "tax_system": "601",
  "zip": "33800",
  "use": "G03",
  "cif_id": "12345678901"
}
```

## With the TypeScript SDK

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

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

const taxIdValidation = await fiscalisto.taxIds.validate({
  tax_id: "ICV060329BY0",
  legal_name: "Inmobiliaria CVA, S.A. de C.V.",
  tax_system: "601",
  zip: "33800",
  use: "G03",
  cif_id: "12345678901",
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

tax_id_validation = fiscalisto.tax_ids.validate({
    "tax_id": "ICV060329BY0",
    "legal_name": "Inmobiliaria CVA, S.A. de C.V.",
    "tax_system": "601",
    "zip": "33800",
    "use": "G03",
    "cif_id": "12345678901",
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$taxIdValidation = $fiscalisto->taxIds->validate([
    'tax_id' => 'ICV060329BY0',
    'legal_name' => 'Inmobiliaria CVA, S.A. de C.V.',
    'tax_system' => '601',
    'zip' => '33800',
    'use' => 'G03',
    'cif_id' => '12345678901',
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var taxIdValidation = await fiscalisto.TaxIds.ValidateAsync(new ValidateTaxIdParams
{
    TaxId = "ICV060329BY0",
    LegalName = "Inmobiliaria CVA, S.A. de C.V.",
    TaxSystem = "601",
    Zip = "33800",
    Use = "G03",
    CifId = "12345678901",
}, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## 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()

	taxIDValidation, err := client.TaxIds.Validate(ctx, &fiscalisto.ValidateTaxIdParams{
		TaxID:     "ICV060329BY0",
		LegalName: fiscalisto.String("Inmobiliaria CVA, S.A. de C.V."),
		TaxSystem: fiscalisto.String("601"),
		Zip:       fiscalisto.String("33800"),
		Use:       fiscalisto.String("G03"),
		CifID:     fiscalisto.String("12345678901"),
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *taxIDValidation)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.ValidateTaxIdParams;

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

var taxIdValidation = fiscalisto.taxIds().validate(new ValidateTaxIdParams()
        .setTaxId("ICV060329BY0")
        .setLegalName("Inmobiliaria CVA, S.A. de C.V.")
        .setTaxSystem("601")
        .setZip("33800")
        .setUse("G03")
        .setCifId("12345678901"), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(taxIdValidation);
```

## Response 200

OK.

A `TaxIdValidation` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"tax_id_validation"` | yes | What kind of object it is («invoice», «customer»…). |
| `tax_id` | string | yes | The RFC checked. |
| `kind` | `company`, `person`, `generic` | yes | company (persona moral, 12 characters), person (persona física, 13) or generic (XAXX010101000, XEXX010101000). |
| `valid` | boolean | yes | true if there are no errors: with what you sent, the SAT shouldn't reject the invoice over the customer's details. |
| `checked_with_sat` | boolean | yes | true if it was compared with the SAT's registry (you sent cif_id and the SAT answered). |
| `errors` | array of object | yes | What would make the SAT reject the invoice. Each with the field (param), a code, the explanation and, when possible, the correct value (suggestion). |
| `errors[].param` | string | yes | The field: tax_id, legal_name, tax_system, zip, use or cif_id. |
| `errors[].code` | string | yes | What failed, for your code: tax_id_format, tax_id_date, legal_name_capital_regime, legal_name_mismatch, tax_system_person, tax_system_mismatch, zip_unknown, zip_mismatch, use_tax_system, cif_id_not_found… |
| `errors[].message` | string | yes | The explanation, to show your user. |
| `errors[].suggestion` | string or null | yes | The correct value when it is known (the SAT's with cif_id, or the name without the capital regime); null otherwise. |
| `warnings` | array of object | yes | What doesn't prevent stamping but is worth checking: the check digit, uppercase, whether the RFC is on the SAT lists. |
| `warnings[].param` | string | yes | The field. |
| `warnings[].code` | string | yes | tax_id_check_digit, legal_name_format, tax_id_listed_69b or tax_id_listed_69. |
| `warnings[].message` | string | yes | The explanation. |
| `warnings[].suggestion` | string or null | yes | The suggested value, or null. |
| `sat_record` | object or null | yes | What the SAT has in the constancia (with cif_id): name, postal code and current tax regimes. null without cif_id. |
| `sat_record.legal_name` | string or null | yes | The name or razón social, as the SAT has it. |
| `sat_record.zip` | string or null | yes | The postal code of their tax address. |
| `sat_record.tax_systems` | array of string | yes | Their current tax regimes (c_RegimenFiscal). |
| `sat_error` | string or null | yes | Whether the SAT didn't answer in time (with cif_id): retry in a few minutes. null if it answered or wasn't checked. |
| `sat_lists` | object or null | yes | Whether the RFC appears on the SAT lists. null with a generic or misspelled RFC. |
| `sat_lists.object` | `"sat_list_check"` | yes | What kind of object it is («invoice», «customer»…). |
| `sat_lists.tax_id` | string | yes | The RFC checked. |
| `sat_lists.name` | string or null | yes | The name it appears with on the SAT lists (null if it doesn't appear). |
| `sat_lists.listed` | boolean | yes | true if the RFC appears on any list, even if it has rebutted. |
| `sat_lists.risk` | `high`, `medium`, `none`, `unknown` | yes | high: 69-B or 69-B Bis as presumed or definitive (the SAT says it simulates operations; its invoices can't be deducted). medium: an art. 69 list (not located, firm or enforceable debts, canceled, sentences, CSD without effect). none: it doesn't appear on any, with all lists up to date, or it already rebutted or has a favorable ruling. unknown: it doesn't appear, but some list couldn't be updated (see lists_unavailable): don't treat it as clean. |
| `sat_lists.verified` | boolean | yes | true if every list was read successfully in the last two days. With false, not appearing doesn't mean it is clean. |
| `sat_lists.lists` | array of object | yes | Each list it appears on; empty if it doesn't appear on any. |
| `sat_lists.lists[].list` | `69`, `69b`, `69b_bis` | yes | 69b: art. 69-B (simulated operations). 69b_bis: art. 69-B Bis (tax losses). 69: art. 69 (not located, debts, canceled). |
| `sat_lists.lists[].source` | string | yes | The SAT file it comes from (code). |
| `sat_lists.lists[].source_name` | string | yes | The SAT file's name, for display. |
| `sat_lists.lists[].situation` | string or null | yes | Its status according to the SAT: Presunto, Definitivo, Desvirtuado, Sentencia favorable; in art. 69, the case (null if the file doesn't include it). |
| `sat_lists.lists[].published_on` | string or null | yes | Publication date at the SAT or in the DOF (null if it isn't included). |
| `sat_lists.lists[].details` | object or null | yes | Everything else the SAT publishes for that RFC (official letters, dates, amounts), as is; null if nothing. |
| `sat_lists.lists_updated_at` | string (date-time) or null | yes | When the lists were last updated (every day at 00:00 Mexico City time). |
| `sat_lists.lists_unavailable` | array of string | yes | The lists that couldn't be confirmed (their last update failed, is missing or is more than two days old). Empty if all are up to date. |

```json
{
  "object": "tax_id_validation",
  "tax_id": "ICV060329BY0",
  "kind": "company",
  "valid": false,
  "checked_with_sat": true,
  "errors": [
    {
      "param": "legal_name",
      "code": "legal_name_capital_regime",
      "message": "Sin «S.A. de C.V.»: en CFDI 4.0 el nombre va sin régimen de capital, como en la constancia.",
      "suggestion": "INMOBILIARIA CVA"
    },
    {
      "param": "zip",
      "code": "zip_mismatch",
      "message": "El código postal no es el del domicilio fiscal que tiene el SAT.",
      "suggestion": "33826"
    }
  ],
  "warnings": [],
  "sat_record": {
    "legal_name": "INMOBILIARIA CVA",
    "zip": "33826",
    "tax_systems": [
      "601"
    ]
  },
  "sat_error": null,
  "sat_lists": {
    "object": "sat_list_check",
    "tax_id": "ICV060329BY0",
    "name": null,
    "listed": false,
    "risk": "none",
    "verified": true,
    "lists": [],
    "lists_updated_at": "2026-10-24T00:12:40-06:00",
    "lists_unavailable": []
  }
}
```

## Errors

- `daily_limit` (429): You reached today's limit of something not paid with stamps. Retry-After says how many seconds until midnight in Mexico City.
- `insufficient_balance` (402): 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.

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