API Reference

Get a Constancia de Situación Fiscal from SAT with an e.firma or the SAT password

Send a taxpayer's e.firma or SAT password (CIEC) and get the Constancia de Situación Fiscal SAT issues today: the PDF, plus the fiscal address, regimes, activities, and obligations it prints.

POST /v1/csf/generate

Get a taxpayer's Constancia de Situación Fiscal (CSF) from SAT, issued today. Send the taxpayer's e.firma or SAT password (CIEC) and get back SAT's PDF together with what it prints: name, fiscal address, tax regimes, economic activities, and tax obligations. Completes in 6 to 10 seconds.

Use it when you act for the taxpayer: an accounting firm keeping its clients' constancias current, a payroll or invoicing platform that already holds its customers' e.firma or SAT password, or an onboarding flow that asks for one of them instead of a PDF that may be stale or edited. To check a constancia someone sent you, without their credentials, use /csf/verify.

Either one lets you act as the taxpayer at SAT, and the e.firma stands in for their handwritten signature. They are used for this one request and then dropped: they are never stored, and the private key and the passwords never reach a log. Send them only for a taxpayer who has authorized you to.

Request body

Either the three parts of the e.firma, as SAT delivered them, or the RFC and the SAT password. A seal certificate (CSD) is not an e.firma and is refused.

Field Type Required Description
certificate file or string For the e.firma The e.firma certificate (.cer), uploaded as a file (multipart/form-data) or sent as base64 in a JSON body. It must be current.
private_key file or string For the e.firma The private key (.key) that goes with the certificate, as a file or base64.
password string For the e.firma The private key's password.
rfc string For the password The taxpayer's RFC.
ciec string For the password The password the taxpayer signs in to SAT's site with (Contraseña, or CIEC), up to 16 characters. Used when no certificate or private_key is sent.

Example request

curl bash
curl -X POST https://rfccheck.com/v1/csf/generate \
  -H "x-api-key: rfc_your_api_key" \
  -F [email protected] \
  -F [email protected] \
  -F password="$EFIRMA_PASSWORD"

A JSON body works too, with both files as base64: {"certificate": "MIIGEjCC...", "private_key": "MIIFDjBA...", "password": "..."}.

With the SAT password instead:

curl bash
curl -X POST https://rfccheck.com/v1/csf/generate \
  -H "x-api-key: rfc_your_api_key" \
  --form-string rfc=ACME010101AAA \
  --form-string ciec="$SAT_PASSWORD"

SAT's password login asks for a captcha, which is read for you. A password SAT refuses is sent only once: SAT locks the account after a few wrong ones.

Response (200)

200 OK json
{
  "rfc": "ACME010101AAA",
  "id_cif": "10010100002",
  "found": true,
  "message": "SAT issued this constancia. The PDF is in pdf_base64.",
  "issued_at": "2026-11-24T13:03:10",
  "data": {
    "person_type": "moral",
    "name": "ACME CONSULTORES",
    "trade_name": "ACME",
    "capital_regime": "SOCIEDAD ANONIMA DE CAPITAL VARIABLE",
    "start_date": "2001-01-01",
    "status": "ACTIVO",
    "status_date": "2001-01-01",
    "address": {
      "zip": "06600",
      "street_type": "CALLE",
      "street": "AVENIDA DE EJEMPLO",
      "exterior_number": "200",
      "interior_number": null,
      "neighborhood": "COLONIA DE EJEMPLO",
      "locality": "CUAUHTEMOC",
      "municipality": "CUAUHTEMOC",
      "state": "CIUDAD DE MEXICO",
      "between_street": "CALLE UNO",
      "and_street": "CALLE DOS"
    },
    "economic_activities": [
      {
        "order": 1,
        "activity": "Servicios de consultoría en computación",
        "percentage": 100,
        "start_date": "2001-01-01",
        "end_date": null
      }
    ],
    "regimes": [
      {
        "name": "Régimen General de Ley Personas Morales",
        "start_date": "2001-01-01",
        "end_date": null
      }
    ],
    "obligations": [
      {
        "description": "Pago definitivo mensual de IVA.",
        "due": "A más tardar el día 17 del mes inmediato posterior al periodo que corresponda.",
        "start_date": "2001-01-01",
        "end_date": null
      }
    ]
  },
  "pdf_base64": "JVBERi0xLjQKJ..."
}
Field Description
rfc The RFC the e.firma belongs to.
id_cif The idCIF printed on the constancia.
issued_at When SAT issued the constancia, in Mexico City time.
data What the constancia prints, in the same shape as document.data in /csf/verify: identity, fiscal address, economic activities, regimes, and obligations. A persona física has curp and the name in parts; a persona moral has capital_regime. Null in the rare case the PDF cannot be read; pdf_base64 is still there.
pdf_base64 SAT's PDF, base64-encoded: the same constancia the taxpayer would download from SAT, with its QR codes and seal. About 170 KB.

To see which state, municipality, and colonias a zip code covers, use /geo/zip on MexCheck, with this same API key.

found

found Meaning
true SAT issued the constancia: it is in pdf_base64 and data.
null SAT could not issue it right now. Every other field but rfc and message is null. Retry later; it is not charged.

Errors

A problem with the credentials is a 422 and is not charged. Nothing is sent to SAT until the certificate, the key, and the password fit together:

422 Unprocessable Entity json
{
  "error": "invalid_fields",
  "fields": ["password"],
  "message": "password does not open this private_key."
}
  • certificate: not a certificate from SAT, a seal certificate (CSD) rather than an e.firma, or an e.firma that has expired. The taxpayer renews an expired e.firma with SAT.
  • private_key: not a .key file, or the key of another certificate. Send the .key SAT issued with this .cer: a renewed e.firma comes with a new key.
  • password: the password does not open the key.
  • rfc or ciec: missing, an RFC that is not well formed, or a password longer than SAT's 16 characters.

When the parts fit but SAT refuses the e.firma, because it was revoked or a renewal replaced it, the error is efirma_rejected, with SAT's reason:

422 Unprocessable Entity json
{
  "error": "efirma_rejected",
  "message": "SAT says this e.firma has been revoked. Not charged."
}

When SAT refuses the RFC and password, the error is ciec_rejected, with SAT's reason. Check the password with the taxpayer before sending it again.

422 Unprocessable Entity json
{
  "error": "ciec_rejected",
  "message": "SAT did not accept this RFC and password (SAT: \"...\"). Not charged."
}