Goal

Submit the fields of a SPEI transfer to Banxico and receive a readable verdict (valid, not_found, cep_unavailable, or error). When the transfer is confirmed you can download the Electronic Payment Receipt (CEP) certificate as PDF or XML.

Prerequisites

  • An active API key (veriko_…). If you don't have one, generate it from the Veriko console, in the API section, and open the API Key panel.
  • The transfer details:
    • date (fecha).
    • amount (monto).
    • tracking key (clave_rastreo) or numeric reference (referencia_numerica) — at least one.
    • issuing bank (emisor).
    • receiving bank (receptor)
    • beneficiary account (cuenta_beneficiaria — CLABE, card, or mobile number).

Steps

1. Submit the validation

Send the transfer fields to POST /v1/validate.
Provide clave_rastreo, referencia_numerica, or both — more identifiers increase precision.

curl -X POST 'https://api.veriko.mx/v1/validate' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Content-Type: application/json' \
  -d '{
    "fecha": "2025-03-15",
    "monto": 15000.50,
    "clave_rastreo": "MXBA20250315001234",
    "emisor": "40014",
    "receptor": "40012",
    "cuenta_beneficiaria": "012180004412345678"
  }'

Synchronous response (200) — the CEP query completed immediately:

{
  "data": {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "type": "validation",
    "attributes": {
      "status": "valid",
      "has_cep": true,
      "processing_time_ms": 1320,
      "created_at": "2025-03-15T14:22:10Z",
      "completed_at": "2025-03-15T14:22:11Z"
    },
    "links": {
      "self": "/v1/validations/f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "cep_xml": "/v1/validations/f47ac10b-58cc-4372-a567-0e02b2c3d479/cep?format=xml",
      "cep_pdf": "/v1/validations/f47ac10b-58cc-4372-a567-0e02b2c3d479/cep?format=pdf"
    }
  }
}

Status values:

statusMeaning
validTransfer confirmed in the Banxico CEP.
not_foundNo record exists for a transaction with those details.
cep_unavailableBanxico found the transaction but could not provide the CEP.
errorUnexpected system failure.

2. Handle the async mode (status:"async")

Under high load, or when you pass ?async=1 via GET, the API responds 202 and the validation is processed in the background:

curl -X POST 'https://api.veriko.mx/v1/validate?async=1' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Content-Type: application/json' \
  -d '{ "fecha": "...", "monto": ..., "clave_rastreo": "...", ... }'

Response 202:

{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "validation",
    "attributes": { "status": "queued" }
  }
}

To poll the validation status: GET /v1/validations/{id} every 2–5 seconds until status reaches a terminal value (valid, not_found, cep_unavailable, error):

curl 'https://api.veriko.mx/v1/validations/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  -H 'Authorization: Bearer veriko_••••'

3. Download the official receipt (CEP)

When status is valid and has_cep is true, you can download the official receipt issued by the Banco de México (Banxico):

# PDF
curl 'https://api.veriko.mx/v1/validations/f47ac10b-.../cep?format=pdf' \
  -H 'Authorization: Bearer veriko_••••' \
  --output cep.pdf

# XML
curl 'https://api.veriko.mx/v1/validations/f47ac10b-.../cep?format=xml' \
  -H 'Authorization: Bearer veriko_••••' \
  --output cep.xml

You can also have the receipt delivered to the Telegram chat linked to the account, without downloading it yourself:

curl -X POST 'https://api.veriko.mx/v1/validations/f47ac10b-.../cep/send-telegram' \
  -H 'Authorization: Bearer veriko_••••'

The response is an immediate 202 with queued: true: it confirms it was queued, not that it was delivered. The document shows up in the chat a few seconds later, and it is the same PDF the download above returns.

Two conditions must hold, and each fails with its own code: the CEP must exist — otherwise 404 cep_not_available — and the account must have Telegram linked — otherwise 409 telegram_not_linked. The second one is visible in telegram_linked on GET /v1/users/me, and is set up in Manage notifications.

4. Enable automatic retries on unsuccessful outcomes

For not_found or cep_unavailable results, you can enable automatic retries so the platform queries Banxico again without additional calls on your part:

curl -X PUT 'https://api.veriko.mx/v1/validations/a1b2c3d4-.../retry-policy' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": true,
    "max_retries": 3,
    "interval_seconds": 600,
    "outcomes": ["not_found", "cep_unavailable"]
  }'

You can also include retry_policy directly in the body to configure retries in a single call. Check the validation's retry history with GET /v1/validations/{id}/retry-attempts.

For more information about retries, see Retry policies

5. Avoid duplicate submissions

Use the Idempotency-Key header to de-duplicate network retries. Any request with the same key and identical body within 24 hours returns the cached response:

curl -X POST 'https://api.veriko.mx/v1/validate' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Idempotency-Key: mi-sistema-txn-id-12345' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'

For more information about idempotency, see Idempotency

What's next

  • Save accounts where you receive transfers and speed up future validations: Create a beneficiary.
  • Validate from a receipt image instead of manual fields: see Validate via OCR.
  • Browse your full validation history: GET /v1/validations (filter by status, date range, account type).