Get Started

# Test mode

Build and test an integration without real personal data: test API keys answer every check with fictional people, companies, and documents, never reach a registry, and are never billed.

A test API key calls the same URLs as a live one and gets answers in the same shape, from fictional people, companies, and documents. Use it to build and test your integration, in development and in CI, without sending anyone's real data.

## Get a test key

In the dashboard, open API Keys, tick "Test key", and create it. A test key starts with rfc_test_ and goes in the same x-api-key header. An AI assistant connected through the MCP server can create one with create_api_key and test: true.

Request with a test key

```bash
curl -X POST https://mexcheck.com/v1/rfc/validate \
  -H "x-api-key: rfc_test_your_test_key" \
  -H "Content-Type: application/json" \
  -d '{"rfc": "PUDJ800101AA1"}'
```

## What a test key does

- It never reaches SAT, RENAPO, INE, or CFE, and it is never billed: it needs no plan or balance, and its requests are not counted in your usage.
- Every response carries the header x-test-mode: true.
- Input is checked by the live endpoint's own rules, so a malformed request gets the same 422 it would get live.
- The test identifiers below return their fictional records. Any other well-formed identifier returns the endpoint's "not found" answer, and one identifier per registry answers as if the registry were down (found or valid null), to test your retries.
- A webhook_url gets the test answer as a POST, as it would live: 202 first, then the result.
- A file sent to /v1/csf/verify or /v1/cfe/verify is not read: any file answers as the sample constancia or receipt.
- The zip code endpoints (/v1/geo/zip, /v1/geo/zip-search) read public data, so they answer from the real catalogue, free.
- The commerce registry and the voter ID card, liveness, and session endpoints have no test mode yet: they answer 403 with error test_mode_unsupported.

The test RFCs carry a wrong check digit, so none of them can belong to a real taxpayer. None of these records describes a real person or company.

## RFC

For /v1/rfc/validate, /profile, /find-zip, /verify, /sat-lists, and /verify-batch.


| RFC | Answers |
| --- | --- |
| `PUDJ800101AA1` | Registered persona física JUAN PRUEBA DEMO, zip 06600, CURP PUDJ800101HDFRMN06, with certificates. |
| `EDE100101AA1` | Registered persona moral EMPRESA DEMO SA DE CV, zip 06600; its legal representative is JUAN PRUEBA DEMO. |
| `ELI100101AA1` | Registered persona moral EMPRESA LISTADA SA DE CV, zip 64000, on SAT's 69-B list. |
| `NODI000101AA1` | SAT could not be reached: valid or found is null. |
| `XAXX010101000`, `XEXX010101000` | SAT's generic RFCs, answered as live. |
| Any other | Not registered: valid or found is false. |


/find-zip, /verify, and /verify-batch also check the name and zip: send the registered name (a company's with or without SA DE CV) and its zip to get a match, anything else to get a mismatch. With include_curp: true, /validate adds the verified identity of the person or the legal representative.

## CURP


| Request | Answers |
| --- | --- |
| /v1/curp/lookup `PUDJ800101HDFRMN06` | JUAN PRUEBA DEMO, born 1980-01-01. With include_pdf: true, a sample PDF. |
| /v1/curp/lookup `NODI000101HDFDSPA7` | RENAPO could not be reached: found is null. |
| /v1/curp/search | names JUAN, paternal_surname PRUEBA, mothers_maiden_name DEMO, birthdate 1980-01-01, sex H, state DF find PUDJ800101HDFRMN06. |
| Any other | No record: found is false. |


## Voter ID (INE)

For /v1/ine/verify, by CIC, with any id_ciudadano or ocr.


| CIC | Answers |
| --- | --- |
| `000000001` | Current credential (vigente). |
| `000000002` | A credential that is no longer valid (no_vigente). |
| `000000003` | INE could not be reached: found is null. |
| Any other | No record (no_encontrada). |


## CFDI

For /v1/cfdi/verify, by folio fiscal (uuid), with any rfc_emisor and rfc_receptor, or in an uploaded XML.


| Folio fiscal | Answers |
| --- | --- |
| `00000000-0000-0000-0000-000000000001` | Current (vigente). |
| `00000000-0000-0000-0000-000000000002` | Cancelled (cancelado). |
| `00000000-0000-0000-0000-000000000003` | SAT could not be reached: found is null. |
| Any other | Not registered (no_encontrado). |


## Constancia de Situación Fiscal


| Request | Answers |
| --- | --- |
| rfc `EDE100101AA1`, id_cif `10000000001` | SAT's record of EMPRESA DEMO SA DE CV. |
| rfc `PUDJ800101AA1`, id_cif `10000000002` | SAT's record of JUAN PRUEBA DEMO. |
| rfc `NODI000101AA1` | SAT could not be reached: found is null. |
| Any file | A constancia SAT issued, matching its record (document.issuance verified, alert null). |
| Any other | Not issued: found is false. |


## CFE receipt


| Request | Answers |
| --- | --- |
| service_number `100000000001`, name `JUAN PRUEBA DEMO`, total `500` | CFE confirms the service. |
| The same service with another name or total | found false, mismatch name or total. |
| service_number `100000000003` | CFE could not be reached: found is null. |
| Any file | A receipt CFE issued, matching its copy (document.matches_cfe true). |
| Any other service number | found false, mismatch null. |


## Going live

Swap the test key for a live one. Nothing else changes: same URLs, same fields. Live answers carry no x-test-mode header.