FISCALISTO / API
Customer tax data
Check a customer's RFC, name, regime, postal code and CFDI use before stamping, or send them a link so they give it themselves with their constancia.
Almost every SAT rejection comes from the customer's data: a name with «S.A. de C.V.», a postal code that isn't the one on their constancia, a regime that doesn't apply to them. There are two ways to have them right before stamping.
Check the data you already have
POST /v1/tax_ids/validate checks the data without stamping (only comparing it with the constancia at SAT uses timbres, below), and tells you what's wrong and what value to correct it with:
curl https://api.fiscalisto.com/v1/tax_ids/validate \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tax_id": "EKU9003173C9", "legal_name": "Escuela Kemper Urgate, S.A. de C.V.", "tax_system": "601", "zip": "42501", "use": "G03" }'{
"object": "tax_id_validation",
"tax_id": "EKU9003173C9",
"kind": "company",
"valid": false,
"checked_with_sat": false,
"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": "ESCUELA KEMPER URGATE"
}
],
"warnings": [],
"sat_record": null,
"sat_error": null,
"sat_lists": { "object": "sat_list_check", "listed": false, "risk": "none" }
}On its own, it checks what can be known without asking SAT: the RFC's format and date, the name, that the regime is a company's or an individual's according to the RFC, that the postal code exists, that the CFDI use fits the regime, the generic RFCs and whether the RFC is on SAT's lists (that comes in warnings). Each problem carries param, a stable code for your code, a message to show your user and, when possible, suggestion with the right value.
Compare them with the constancia
If you also send cif_id, the idCIF printed on the constancia de situación fiscal (top right, next to the QR code), Fiscalisto queries SAT's record and compares name, postal code and regime with what you sent. Then checked_with_sat is true and sat_record carries what SAT says:
"sat_record": { "legal_name": "ESCUELA KEMPER URGATE", "zip": "42501", "tax_systems": ["601"] }Each query to SAT counts toward the daily limit and, in production, every 10 constancias queried in a month use one timbre (the month's first takes one that covers 10; free in test mode). The same constancia queried twice within 24 hours counts once. If SAT is slow or doesn't answer, the check arrives without it, with the reason in sat_error, and you can repeat it later.
Ask the customer for their data
If you don't have the data, or don't trust what you were given, ask for it with a link. Your customer opens it in Fiscalisto, uploads their constancia (or types their data) and before it's accepted it's checked as above. You get a webhook.
curl https://api.fiscalisto.com/v1/customer_data_requests \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reference": "Pedido 1042", "description": "Para facturar su pedido 1042", "expires_in_days": 7 }'{
"id": "cdr_…",
"object": "customer_data_request",
"status": "open",
"url": "https://fiscalisto.com/datos/…",
"reference": "Pedido 1042",
"expires_at": "2026-10-31T12:00:00-06:00",
"submission": null
}Send url to your customer however you like: in your email, on your order page or by WhatsApp. You can also show it inside your page, with fiscalisto.js or @fiscalisto/react, like self-invoicing. reference is your customer or order id and description a line on what the data is for; the customer sees both above the form, and reference comes back to you in the event. The link works for 60 days unless you say otherwise.
When the customer sends their data, the customer_data_request.completed event arrives with the full request. submission holds the data and customer, the issuer's customer (cus_…) you can now invoice:
"submission": {
"tax_id": "PEPJ800101AB1",
"legal_name": "JUAN PÉREZ LÓPEZ",
"tax_system": "612",
"zip": "06600",
"use": "G03",
"email": "juan@correo.mx",
"source": "constancia",
"customer": "cus_…",
"applied": true
}A new customer is saved straight into the issuer's catalog (applied: true). If the RFC was already one of its customers and the data changes, it isn't overwritten on its own: applied is false and you decide whether to update it with POST /v1/customers/{id}. That way a link can't change who invoices are sent to.
| Route | What it does |
|---|---|
POST /v1/customer_data_requests | Creates a link |
GET /v1/customer_data_requests | The issuer's links, newest to oldest |
GET /v1/customer_data_requests/{id} | One link, with what the customer sent |
DELETE /v1/customer_data_requests/{id} | The link stops working (a completed one can't be cancelled) |
status is open, completed, expired or canceled; url only comes while the link is open.
Was this page helpful?
Inventory
Track stock of your products: each invoice takes out what it sells, and you see what's in each warehouse, the stock ledger and its adjustments.
Invoicing recipes
The most common invoices ready to copy: from your catalog, on credit (PPD), in dollars, with withholdings, global to the general public and in batch.