POSThttps://api.veriko.mx/v1/validate-ocr

Validate a SPEI transfer (OCR)

Visibility
public
Auth
API key
Permission
validations.ocr.create
How-to guide →

Validates a SPEI transfer from its receipt (image or PDF) and obtains its CEP with optical character recognition (OCR) and Banxico.

The final verdict can be:

  • valid: CEP found and validated.
  • not_found: CEP not found.
  • cep_unavailable: CEP unavailable.
  • returned: Settled and returned.
  • error: Internal error.

With ?async=1 it responds with an HTTP status 202; the verdict is collected from GET /v1/validations/{id}.

The accounting is in quotas and plans.

Parameters
ParameterInTypeRequiredDescription
asyncquerystringoptional

When 1/true/yes, the validation is queued and the server responds 202 immediately with a validation_id; the client polls GET /v1/validations/{id} until the terminal state. Without the flag or with 0, the response is synchronous and returns the final result in the same POST.

Default: 0

Idempotency-Keyheaderstringoptional

Optional client-generated key (Stripe-style) that guarantees the request is processed exactly once within a 24-hour TTL. The scope is (user_id, endpoint, key). Retries with the same key and the same body return the byte-for-byte cached response with the Idempotent-Replayed: true header, without consuming rate-limit quota, without re-firing webhooks, and without creating a new validations row. Same key with a different body → 422 idempotency_key_reused. Same key with an in-flight request → 409 idempotency_key_in_progress. 5xx, 429, 408, 401 and 403 responses are not cached (retries with the same key are processed for real); the other 4xx responses (400, 404, 409, 422) are cached and replayed. Format: 1–255 characters, alphanumeric + _ + -.

e.g. 11111111-2222-3333-4444-555555555555
Parameters
ParameterTypeRequiredDescription
imagestring (byte)Required unless image_url is sent

Receipt encoded in base64, as an image or a PDF. If image_url is also provided, only image_url is considered. Accepted formats: JPEG, PNG, WebP, or a PDF of 1 to 3 pages. Maximum size: 12 MB. Maximum dimensions of an image: 12000px per side. Accepts the data:image/...;base64, or data:application/pdf;base64, prefix.

e.g. iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==
image_urlstring (uri)Required unless image is sent

Public HTTPS URL of the receipt. It follows the same format and size limits as image: JPEG, PNG, WebP, or a PDF of 1 to 3 pages, up to 12 MB. An http URL returns HTTP status 422 (with invalid_url_scheme in the body), and a redirect to http is not followed.

e.g. https://storage.example.com/receipts/comprobante-2025-03.jpg
beneficiary_accountstring (pattern)optional

Receiving account for the transfer. Accepts a CLABE (18 digits), a card (16 digits), or a DiMo phone (10 digits). It cannot be sent together with candidate_accounts: sending both returns 422.

e.g. 012180004412345678
candidate_accountsarray<string> (items: 2–10, unique items)optional

Accounts among which the receiving one is, when it is not known. It replaces beneficiary_account: sending both returns 422. Between 2 and 10 accounts, CLABE (18 digits), card (16) or DiMo phone (10), with a valid check digit and no repeats.

e.g. ["012180004412345678","002010077777777771"]
sender_bankstringoptional

SPEI name or code of the sending bank, to correct the one read from the receipt. It accepts a code of 4 or 5 digits, e.g. 40012, or the name, e.g. BANCO NACIONAL DE MEXICO. When it cannot be resolved, the response is 422.

e.g. 40012
receiver_bankstringoptional

SPEI name or code of the receiving bank, to correct the one read from the receipt. It accepts a code of 4 or 5 digits, e.g. 40002, or the name, e.g. BBVA MEXICO. When it cannot be resolved, the response is 422.

e.g. 40002
recipient_is_bankbooleanoptional

true when the transfer beneficiary is the receiving institution itself («Pago a Banco» in the Banxico CEP): payment of a card, a loan, or services to the institution. false for a transfer to an account holder. It is the default. 0 and 1 are also accepted.

Default: false

e.g. false
retry_policyobjectoptional

Automatic retry policy for this validation. If omitted, the policy configured at PUT /v1/users/me/retry-policy is used. Retries do not consume validation quota.

enabledbooleanoptional

true when the retry cycle is active. With false, the other fields are ignored.

e.g. true
max_retriesinteger (≥ 1)optional

Maximum number of automatic retries. Once reached, the cycle enters the exhausted terminal state. The allowed limit depends on the plan: Gratis (free) 1, Personal 3, Negocio (business) 5, Empresa (enterprise) 10 and Volumen (volume) 20; exceeding it returns 422 retry_policy_invalid.

e.g. 3
interval_secondsinteger (≥ 300, ≤ 86400)optional

Seconds to wait between each retry (300–86400, i.e., 5 minutes to 24 hours).

e.g. 600
outcomesarray<string> (items: 1–?, unique items)optional

Outcomes that trigger a retry. By default, they are not_found, cep_unavailable, and error; the combination ["not_found", "cep_unavailable"] excludes error.

e.g. ["not_found","cep_unavailable","error"]
client_refstring (pattern, 1–64)optional

Reference of your own that is returned as sent in the validation, in its webhooks, and as an exact filter of GET /v1/validations. Text of 1 to 64 characters, without line breaks or emoji; it is trimmed before being stored. A value that does not comply is rejected with 422 (invalid_client_ref). It must not contain personal data.

e.g. orden-4812
retain_imagebooleanoptional

true when the platform keeps the receipt file after validation. It is the default. With false, the file is deleted when the validation ends; the verdict and the extracted data are kept. With false, the validation publishes image_retained=false and GET /v1/validations/{id}/image responds 410 (image_not_retained). It also applies with ?async=1. A non-boolean value is rejected with 422 (invalid_retain_image).

Default: true

e.g. false
Request
curl -X POST 'https://api.veriko.mx/v1/validate-ocr' \
  -H 'Authorization: Bearer veriko_••••' \
  -H 'Content-Type: application/json' \
  -d '{
    "image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
  }'

Python example — coming soon.

JavaScript example — coming soon.

PHP example — coming soon.

Retry policy

POST /v1/validate-ocr

Validation retry policy: activation, limit, interval, and eligible outcomes.

Attempts
—
Interval
5 min – 1 h × 24
Eligible outcomes
not_found, cep_unavailable, error

This operation accepts an optional retry policy.

Response 2xxValidation
FieldTypeDescription
type*string

JSON:API resource type. Always validation.

e.g. validation
id*string (uuid)

Unique identifier of the validation (UUID v4).

e.g. 3fa85f64-5717-4562-b3fc-2c963f66afa6
attributes*object

Canonical validation data.

validation_typestring

Validation mode — direct: Manual entry of the fields; ocr: Reading of the receipt image.

e.g. direct
originValidationOrigin | null

Where the validation came from. null for validations created before the origin was recorded.

is_playgroundboolean

true when the result comes from a playground simulation. The simulation runs without Banxico calls, quota consumption, persistence, webhooks, or notifications.

e.g. false
statusstring

Lifecycle state — queued: Awaiting processing; processing: In progress; valid: The CEP was found and matches; not_found: Banxico cannot find the operation; cep_unavailable: Banxico recognizes the transaction but the CEP is not available; invalid: Banxico did not return a recognizable verdict; returned: the transfer was settled and later returned; failed: The validation stopped because of a problem in the data sent; error: The validation stopped because of a service failure.

e.g. valid
banxico_statusstring | nullnullable

Verdict reported by Banxico. Values: valid, not_found, cep_unavailable, invalid, returned, or error; pending with no verdict. returned: settled and sent back. valid is not final: it moves to returned when Banxico reports the return on recheck (POST /v1/validations/{id}/recheck, or automatic for 72 hours; validation.returned is emitted). error when the request reached Banxico and the service failed; error_code identifies the cause.

e.g. valid
processing_time_msinteger | nullnullable

Milliseconds spent processing the validation.

e.g. 1320
request_dataobject

Copy of the original request fields. send_date keeps the sending date exactly as sent, even when Banxico found the payment with another date. Each field is emitted twice: with its Spanish name, deprecated, and with its canonical English name; read the English one, because the Spanish names will be removed in a future version.

send_datestring (date)

Transfer send date (YYYY-MM-DD).

amountnumber

Transfer amount in MXN.

tracking_keystring

Identifier assigned by the sending bank (tracking key).

numeric_referencestring

Numeric series of up to 7 digits identifying the transfer. It is not unique and may repeat.

sender_bankstring

Sending bank: name or SPEI code in direct validation, SPEI code read from the receipt in OCR validation.

receiver_bankstring

Receiving bank: name or SPEI code in direct validation, SPEI code read from the receipt in OCR validation.

beneficiary_accountstring

Receiving account (CLABE, card, or mobile/DiMo).

candidate_accountsarray

Candidate accounts to try, in order, when the receipt account is masked.

recipient_is_bankboolean

true when the receiver is a SPEI participant (bank).

client_refstring

Reference of your own sent in the request (client_ref), returned as sent. It only appears when the request included it. It lets you tie the validation to an order of your own, and GET /v1/validations accepts it as an exact filter. It must not contain personal data.

e.g. orden-4812
created_atstring (date-time)

Validation creation timestamp in ISO 8601 UTC.

e.g. 2025-03-15T14:22:10Z
completed_atstring | nullnullable

Date and time of completion, in ISO 8601 UTC. null while it has not finished.

e.g. 2025-03-15T14:22:11Z
enqueued_atstring | nullnullable

Queue-entry timestamp in ISO 8601 UTC.

e.g. 2026-04-30T10:15:00Z
processing_started_atstring | nullnullable

Processing start timestamp in ISO 8601 UTC.

e.g. 2026-04-30T10:15:00Z
expires_atstring | nullnullable

Expiration timestamp for queued validations in ISO 8601 UTC. After this, the validation moves to error with error_code ttl_expired.

e.g. 2026-04-30T10:15:00Z
etag_versioninteger | nullnullable

Incremental version used with If-None-Match in conditional requests.

e.g. 1
image_pathstring | nullnullable

Relative reference to the receipt, image or PDF, only when validation_type is ocr. It is not published when the file is not kept: see image_retained.

e.g. comprobantes/3fa85f64-5717-4562-b3fc-2c963f66afa6.jpg
image_retainedboolean

true when the platform keeps the receipt file; false when it does not, because the request sent retain_image=false or because the validation was purged. It only appears on validations of type ocr. With false, GET /v1/validations/{id}/image responds with an HTTP status 410 (with image_not_retained or validation_purged in the body).

e.g. true
purged_atstring (date-time)

Date and time, in ISO 8601 UTC, when the validation was purged. It only appears on a purged validation, which is left as a tombstone: it keeps the verdict, dates, and normalized_data.amount, and loses the file, the CEP, request_data, ocr_result, and banxico_result; its resources respond with an HTTP status 410 (with validation_purged in the body).

e.g. 2026-10-02T09:30:00Z
ocr_resultobject | nullnullable

Fields extracted from the receipt, only when validation_type is ocr. They are what was read, not what Banxico confirmed: the confirmed data is in banxico_result. Each field is emitted twice: with its Spanish name, deprecated, and with its canonical English name; read the English one, because the Spanish names will be removed in the future.

receipt_typestring

Receipt type (cep, estado_cuenta, transferencia, ilegible…).

tracking_keystring

Identifier assigned by the sending bank (tracking key).

numeric_referencestring

Numeric series of up to 7 digits identifying the transfer. It is not unique and may repeat.

send_datestring (date)

Transfer send date (YYYY-MM-DD).

timestring

Transfer time (HH:MM:SS).

amountnumber

Transfer amount in MXN.

sender_bankstring

Sending bank: name or SPEI code in direct validation, SPEI code read from the receipt in OCR validation.

receiver_bankstring

Receiving bank: name or SPEI code in direct validation, SPEI code read from the receipt in OCR validation.

sender_namestring

Sender name.

beneficiary_namestring

Beneficiary name.

beneficiary_accountstring

Receiving account (CLABE, card, or mobile/DiMo).

beneficiary_account_is_partialboolean

true when the receiving account read is partial (incomplete).

beneficiary_account_is_maskedboolean

true when the receiving account arrived masked.

beneficiary_account_visible_firststring

First visible digits of the masked receiving account.

beneficiary_account_visible_laststring

Last visible digits of the masked receiving account.

beneficiary_account_total_length_hintinteger

Estimated total length of the receiving account.

sender_accountstring

Sending account (CLABE, card, or mobile/DiMo).

sender_account_is_partialboolean

true when the sending account read is partial (incomplete).

sender_account_is_maskedboolean

true when the sending account arrived masked.

sender_account_visible_firststring

First visible digits of the masked sending account.

sender_account_visible_laststring

Last visible digits of the masked sending account.

sender_account_total_length_hintinteger

Estimated total length of the sending account.

payment_conceptstring

Payment concept.

other_accounts_detectedarray

Other accounts detected in the receipt.

receipts_detectedinteger

Number of receipts found in the PDF.

confidencenumber

Extraction or normalization confidence score (0–1).

confidence_by_fieldobject

Confidence score (0–1) per extracted field.

sender_banknumber

Confidence score (0–1) for extracting sender_bank.

receiver_banknumber

Confidence score (0–1) for extracting receiver_bank.

beneficiary_accountnumber

Confidence score (0–1) for extracting beneficiary_account.

sender_accountnumber

Confidence score (0–1) for extracting sender_account.

amountnumber

Confidence score (0–1) for extracting amount.

tracking_keynumber

Confidence score (0–1) for extracting tracking_key.

send_datenumber

Confidence score (0–1) for extracting send_date.

ocr_confidencenumber | nullnullable

OCR score from 0 to 1, only when validation_type is ocr. It is estimated by the reading process itself and Banxico does not confirm it, so it is not meant for deciding whether to release a payment; banxico_status and account_cross_checked are for that.

e.g. 0.94
normalized_dataobject | nullnullable

Fields normalized after OCR extraction, or the winning account in beneficiary_account when a direct validation sent candidate_accounts. A tombstone keeps only the amount here. Each field is emitted twice: with its Spanish name, deprecated, and with its canonical English name; read the English one, because the Spanish names will be removed in the future.

receipt_typestring

Receipt type (cep, estado_cuenta, transferencia, ilegible…).

tracking_keystring

Identifier assigned by the sending bank (tracking key).

numeric_referencestring

Numeric series of up to 7 digits identifying the transfer. It is not unique and may repeat.

send_datestring (date)

Transfer send date (YYYY-MM-DD).

timestring

Transfer time (HH:MM:SS).

amountnumber

Transfer amount in MXN.

sender_bank_codestring

SPEI code of the sending bank.

sender_bank_namestring

Name of the sending bank.

receiver_bank_codestring

SPEI code of the receiving bank.

receiver_bank_namestring

Name of the receiving bank.

beneficiary_accountstring

Receiving account (CLABE, card, or mobile/DiMo).

beneficiary_account_typestring

Receiving account type (clabe, tarjeta, celular).

beneficiary_account_is_maskedboolean

true when the receiving account arrived masked.

sender_accountstring

Sending account (CLABE, card, or mobile/DiMo).

sender_account_is_maskedboolean

true when the sending account arrived masked.

sender_account_visible_firststring

First visible digits of the masked sending account.

sender_account_visible_laststring

Last visible digits of the masked sending account.

sender_namestring

Sender name.

beneficiary_namestring

Beneficiary name.

payment_conceptstring

Payment concept.

confidencenumber

Extraction or normalization confidence score (0–1).

normalization_warningsarray | nullnullable

Normalization warnings present. They can explain an unexpected not_found result. If a warning mentions an account, it shows only its last 4 digits.

duplicate_ofobject

Earlier validation that confirmed this transfer in the same account, never another account. It appears only with a valid or returned validation with the same tracking key. When the earlier receipt matches this transfer, its result is reused without re-querying Banxico: a return (returned) always; a valid only when confirmed under an hour ago. normalization_warnings notes the reuse.

id*string (uuid)

Identifier of the earlier validation.

e.g. 3fa85f64-5717-4562-b3fc-2c963f66afa6
created_at*string (date-time)

Creation date and time of the earlier validation, in ISO 8601 UTC.

e.g. 2026-10-01T15:04:05Z
account_conflictobject

Conflict between the sent account and the image account. It only appears on ocr validations, when beneficiary_account was sent and the image shows another account. The sent account prevails and is the one queried at Banxico; the field does not change the verdict. It carries only the last 4 digits, and the conflict is added to normalization_warnings.

sent_last4*string

Last 4 digits of the account sent in beneficiary_account.

e.g. 5678
read_last4*string

Last 4 digits of the account shown in the image (the visible ones, 3 or 4, if it is masked).

e.g. 9012
truncated_fieldsarray

Fields the receipt shows cut off with an ellipsis. It only appears on ocr validations, when there is at least one. The field value never carries the ellipsis: it holds only the visible part, or is empty when the cut is in the middle or the field is the amount, the date, or the time. A cut-off tracking key is not queried at Banxico (error_code tracking_key_truncated when there is no reference either), and a cut-off reference is discarded. Each field is also added to normalization_warnings.

candidate_matchobject

Which of the candidate_accounts sent won. It only appears when the request carried that list and one of the accounts matched the transfer. The full account is in normalized_data.beneficiary_account; this object says which position of the list it is, so it can be correlated without comparing accounts. It does not change the verdict.

index*integer

Position (from 0) of the winning account in the candidate_accounts array, as sent.

e.g. 1
account_last4*string

Last 4 digits of the winning account.

e.g. 7771
account_cross_checkedboolean

true when the account queried at Banxico is the client's: the account sent in beneficiary_account, one of the candidate_accounts, or a beneficiary's account. With false, a valid confirms the transfer exists, but not that it was paid to the expected account: compare banxico_result.beneficiaryAccount with that account before releasing it. It does not change the verdict.

e.g. true
is_maskedboolean | nullnullable

Whether the beneficiary account is masked in the receipt, be it a CLABE, a card or a phone number. It is included only when it is true, and only when validation_type is ocr.

banxico_resultobject | nullnullable

Data returned by Banxico, with _payment_status; null when Banxico returned no data. _send_date: date Banxico found the payment with when not the sent one. used, requested and reason are the found date, the queried date and the motive. Values of reason: clave_embedded_date: another date in the key; cutoff_18h: near the 18:00 cutoff; dia_operacion: operation date on the receipt; future_date: next business day on the receipt; date_retry: no usable date. Twins: _send_date and tracking_key_status.

operationDatestring

SPEI business day that Banxico assigned to the operation, as reported by the CEP (YYYY-MM-DD), in Mexico central time. It can differ from the sending date: what is sent from 18:00 on, on a Saturday, on a Sunday, or on a non-business day operates on the next business day.

e.g. 2025-03-15
processingTimestring

Operation time as reported by the CEP (HH:MM:SS), in Mexico central time, not UTC.

e.g. 14:22:10
speiKeystring

Operation key within the SPEI system (the CEP's ClaveSPEI). Distinct from the tracking key.

trackingKeystring

SPEI tracking key of the operation — the same one sent in the validation request.

e.g. MBAN01002503151422ABCDEF
digitalSignaturestring

Digital seal of the CEP (sello) — the signature Banxico computes over the operation.

certificateNumberstring

Serial number of the digital certificate Banxico used to seal the CEP.

cadenaCdastring

Original data string of the operation (cadenaCDA): the 47 fields the institution sent to Banxico, pipe-separated, including both dates (operation and capture) and the payment type. Lets the CEP be audited without requesting it again.

senderBankstring

Sending bank of the operation, as identified by the CEP.

e.g. BBVA
senderNamestring

Name of the operation's sender, as reported by the CEP.

senderAccountTypestring

Sender's account type (e.g. CLABE or card), as reported by the CEP.

senderAccountstring

Sender's account number, as reported by the CEP — unmasked in this resource (a private lookup, owned by the validation's account).

senderRfcstring

Sender's RFC (Mexican tax ID), as reported by the CEP.

receiverBankstring

Receiving bank of the operation, as identified by the CEP.

e.g. STP
beneficiaryNamestring

Name of the operation's beneficiary, as reported by the CEP.

beneficiaryAccountTypestring

Beneficiary's account type (e.g. CLABE or card), as reported by the CEP.

beneficiaryAccountstring

Beneficiary's account number, as reported by the CEP. Unmasked in this resource (a private lookup, owned by the validation's account). Outgoing webhooks DO mask it to the last 4 digits in banxico_confirmed.beneficiaryAccount (see the webhooks guide).

beneficiaryRfcstring

Beneficiary's RFC (Mexican tax ID), as reported by the CEP.

amountnumber (float)

Operation amount Banxico confirmed via the CEP, in pesos.

e.g. 1500
ivanumber (float)

VAT (IVA) of the operation reported by the CEP, in pesos.

paymentConceptstring

Payment concept of the operation, as reported by the CEP.

error_messagestring | nullnullable

Human-readable error message when terminal.

e.g. Banxico no respondió tras tres intentos.
error_codeValidationErrorCode | null

Stable code of the terminal error, when there is one. After not_found, diagnosis may pinpoint the failing field: identity, account, amount, both, or the payment without isolating the field. A diagnosis does not change the verdict or prove payment. Without a conclusive response, the field remains null. Two codes do not come from diagnosis: tracking_key_truncated (the receipt shows the tracking key cut off and there is no reference; Banxico is not queried and there are no retries) and other_account_exists (there is no payment to the sent account, but there is one to another account shown on the receipt; which one is not disclosed).

batch_idinteger | nullnullable

Bulk import job identifier, when applicable.

e.g. 318
batch_positioninteger | nullnullable

Position within the job, starting at 1.

e.g. 12
retry_stateobject

Full retry cycle state. Always present; if retries are not active, enabled is false and policy fields are null. Bulk import rows always have enabled equal to false.

enabledboolean

true when the validation has retries configured, even if its cycle has already ended (terminal_state).

e.g. true
max_retriesinteger | nullnullable

Configured maximum number of retries; null when enabled is false.

e.g. 3
interval_secondsinteger | nullnullable

Interval between retries in seconds, from 300 to 86400; null when enabled is false.

e.g. 600
outcomesarray | nullnullable

Outcomes that trigger a retry: not_found, cep_unavailable, and error; null when enabled is false.

e.g. ["not_found","cep_unavailable","error"]
attempts_completedinteger

Number of retries completed so far.

e.g. 1
next_attempt_atTimestampUTC | null

Date of the next retry; null when none is scheduled.

resolved_atTimestampUTC | null

Date when a retry produced valid; null until that occurs.

exhausted_atTimestampUTC | null

Date when attempts were exhausted; null until that occurs.

cancelled_atTimestampUTC | null

Cycle cancellation date; null until that occurs.

terminal_statestring | nullnullable

Cycle state: pending, resolved, exhausted, or cancelled. It is null when the validation has no retry cycle.

e.g. pending
linksobject

Related links (JSON:API links).

selfstring

Canonical link to the validation details.

e.g. /v1/validations/3fa85f64-5717-4562-b3fc-2c963f66afa6
cep_xmlstring | nullnullable

URL of the CEP in XML format. It only appears when banxico_status is valid, or is returned with a receipt, and the validation was not purged; otherwise the links object is omitted.

e.g. /v1/validations/a1b2c3d4-e5f6-4890-abcd-ef0123456789/cep?format=xml
cep_pdfstring | nullnullable

URL of the CEP in PDF format. It only appears when cep_xml appears and the PDF is stored; an older validation can have the XML without the PDF.

e.g. /v1/validations/a1b2c3d4-e5f6-4890-abcd-ef0123456789/cep?format=pdf
Response status codesPOST /v1/validate-ocr
StatusClassDescriptionBody
2002xx
Resolved validation with the data extracted from the receipt and its verdict.
Validation
2022xx
Validation enqueued. Poll GET /v1/validations/{id} until one of the terminal statuses (valid, not_found, cep_unavailable, invalid, returned, failed, error). meta.next_poll_after_seconds hints the recommended first-poll interval. Without ?async=1, this response arrives when the Banxico query takes longer than 45 seconds, with meta.async_reason set to sync_deadline.
ValidationQueued
4004xx
The Idempotency-Key header value does not meet the allowed format (alphanumeric + _ + -, 1–255 characters).
ErrorResponse
4014xx
Authentication is required or the provided credentials are invalid.
ErrorResponse
4094xx
A request with the same Idempotency-Key is still being processed. The client must retry after the number of seconds indicated by the Retry-After header.
ErrorResponse
4134xx
The request body exceeds the maximum accepted size (body_too_large).
ErrorResponse
4224xx
The image or request data is invalid. It responds with an HTTP status 422 (with code in the body). Codes for this operation: account_and_candidates_mutually_exclusive, candidate_accounts_invalid, alias_conflict, invalid_retain_image; the rest are in {% concept slug="errors-taxonomy" %}the error taxonomy{% /concept %}.
ErrorResponse
4294xx
Rate limit exceeded (rate_limit_exceeded: wait a few seconds) or plan quota used up (quota_exceeded: wait for the next period or change plans).
ErrorResponse
5035xx
OCR is unavailable, with no provider configured or temporarily paused (ocr_not_configured), the Banxico request could not be completed (banxico_rate_limit_exhausted), or the asynchronous validation could not be started (dispatch_failed).
ErrorResponse
Response headers200
HeaderTypeDescription
Deprecationstring
Date when this operation was marked as deprecated (11 November 2026, RFC 8594). Spanish field names stop being accepted on 1 March 2027 (see the Sunset header).
Idempotent-Replayedstring
Present only when the client sent Idempotency-Key. false for fresh responses; true when replayed from cache.
Linkstring
Migration guide to English field names.
Sunsetstring
Date when Spanish field names stop being accepted (1 March 2027).
X-Quota-Includedinteger
Validations included in the plan for the current cycle. With overage enabled it is lower than X-Quota-Limit (the cap); without overage, equal. Also in the body, under meta.quota.
X-Quota-Limitinteger
Monthly validation cap of the account plan. Emitted when quota is enabled.
X-Quota-Remaininginteger
Validations remaining in the current cycle.
X-Quota-Resetstring (date-time)
End of the current cycle in ISO 8601 UTC, when the quota renews.
X-Quota-Usedinteger
Validations consumed in the current cycle.
Errors from POST /v1/validate-ocr
StatusCodeExample
400body_empty

The request has no body.

Envelope
meta.request_id
a434f042383c
400invalid_idempotency_key

The idempotency key format is not valid.

Envelope
meta.request_id
3c4d5e6f7a8bb8a7f6e5d4c3
400invalid_json

The request body is not valid JSON. Check its syntax and resend it.

Envelope
meta.request_id
c7242315a917
400url_dns_failed

We could not find the server for the URL. Check that the address is spelled correctly.

Envelope
meta.request_id
afb504dc3226
400url_ssrf_blocked

The URL does not point to a public server. Use a public HTTPS URL.

Envelope
meta.request_id
ab5d5a7920a3
401unauthorized

This request requires authentication.

Envelope
meta.request_id
c4d5e6f7a8b99b8a7f6e5d4c
409idempotency_key_in_progress

A request with this Idempotency-Key is still being processed.

Envelope
meta.request_id
2b3c4d5e6f7aa7f6e5d4c3b2
Response headers
  • Retry-After: integer — Seconds to wait before retrying
413body_too_large

The body exceeds the 1 MB maximum.

Envelope
meta.request_id
1a2b3c4d5e6ff6e5d4c3b2a1
422account_ambiguous

The visible digits of the account match too many accounts.

Envelope
source.pointer
/data/attributes/beneficiary_account
meta.request_id
5c30de783c76
422account_ambiguous_in_whitelist

Several saved beneficiaries end the same way, so we cannot tell which one got the payment.

Envelope
source.pointer
/data/attributes/beneficiary_account
meta.request_id
fb7fae5965da
422account_and_candidates_mutually_exclusive

The beneficiary account and the candidate accounts cannot be sent together.

Envelope
meta.request_id
abde8438975d
422account_unresolvable

We could not identify the account that received the payment from the image.

Envelope
source.pointer
/data/attributes/beneficiary_account
meta.request_id
8e3337d48b4d
422bank_code_unresolvable_for_phone

The bank for this phone number could not be determined.

Envelope
meta.request_id
a1debaedb642
422candidate_accounts_invalid

This candidate account is repeated.

Envelope
source.pointer
/data/attributes/candidate_accounts/1
meta.request_id
a3bcaa3245c2
422image_decompression_bomb

We can't process the image in ''image''. Send a new screenshot.

Envelope
source.pointer
/data/attributes/image
meta.request_id
ac6425fd1366
422image_dimensions_too_large

''image'' exceeds 12000 px per side.

Envelope
source.pointer
/data/attributes/image
meta.request_id
ba38bda2c9de
422image_invalid

The image is not valid. Send JPEG, PNG, WebP or PDF.

Envelope
meta.request_id
ae220e56f6a5
422image_invalid_format

The receipt must be a JPEG, PNG, WebP, or PDF file.

Envelope
source.pointer
/data/attributes/image
meta.request_id
d1e5df412d79
422image_mime_mismatch

We don't recognize the format of ''image''. Send JPEG, PNG, WebP or PDF.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a286b80356e0
422image_not_readable

We couldn't read the image. Upload it again.

Envelope
meta.request_id
a1e34a287c1e
422image_not_readable_receipt

The image is not a readable receipt.

Envelope
meta.request_id
a13097019f78
422image_not_spei_receipt

The image is not a SPEI receipt. We only validate SPEI.

Envelope
meta.request_id
a11b0f40a0eb
422image_or_image_url_required

Send 'image' (base64) or 'image_url'.

Envelope
meta.request_id
a96867a072c7
422image_polyglot_detected

We can't accept the file in ''image''. Send the bank's original receipt.

Envelope
source.pointer
/data/attributes/image
meta.request_id
f133d298bfd4
422image_strip_failed

We couldn't process the image in ''image''. Try again.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a24bc2a8c12d
422image_too_large

''image'' exceeds 12 MB.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a3f2b13d30bc
422image_too_small

'image' is too small to be an image.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a416376cc732
422invalid_bank_code

The bank code ''999'' is not valid.

Envelope
source.pointer
/data/attributes/receiver_bank
meta.request_id
e9b45950fbec
422invalid_client_ref

The reference must be 1 to 64 characters.

Envelope
meta.request_id
e621d16fda0a
422invalid_retain_image

'retain_image' must be true or false.

Envelope
meta.request_id
59aebe9d3402
422masked_account_no_suffix

The receipt hides the account and does not show its last digits.

Envelope
source.pointer
/data/attributes/beneficiary_account
meta.request_id
8af2b304c377
422masked_account_unresolvable

The receipt hides the account and we could not identify it.

Envelope
source.pointer
/data/attributes/beneficiary_account
meta.request_id
49e00f0ce73b
422pdf_active_content

We can't accept the PDF in ''image''. Send the bank's original.

Envelope
source.pointer
/data/attributes/image
meta.request_id
ad81818cc0c7
422pdf_encrypted

The PDF in ''image'' has a password. Send a copy without one.

Envelope
source.pointer
/data/attributes/image
meta.request_id
aea72849db56
422pdf_hidden_content

We can't accept the PDF in ''image''. Send the bank's original.

Envelope
source.pointer
/data/attributes/image
meta.request_id
e42dd57cb191
422pdf_invalid_structure

The PDF in ''image'' is damaged. Download it again from the bank.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a153f65d4691
422pdf_modified_after_issue

We can't accept the PDF in ''image''. Send the bank's original.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a02adbadde5e
422pdf_multiple_receipts

The document has more than one receipt. Send each one separately.

Envelope
meta.request_id
9acdd75742ff
422pdf_text_layer_too_large

We can't accept the PDF in ''image''. Send the bank's original.

Envelope
source.pointer
/data/attributes/image
meta.request_id
a76aa75c6391
422pdf_too_many_pages

The PDF in 'image' has too many pages. Send only the receipt.

Envelope
source.pointer
/data/attributes/image
meta.request_id
f0a379800c1a
422pdf_unsupported_image

We can't read the PDF in ''image''. Send it as JPEG or PNG.

Envelope
source.pointer
/data/attributes/image
meta.request_id
abc9e79f8219
422preflight_failed

Some data needs fixing.

Envelope
meta.request_id
5c1f0e7a9b24
422receiver_bank_unresolvable

The receiving bank could not be identified.

Envelope
source.pointer
/data/attributes/receiver_bank
meta.request_id
ad5cae4229cc
422retry_pending_cap_exceeded

You reached the limit of validations with pending retries.

Envelope
meta.request_id
aa04b7c17a53
422retry_policy_invalid

The retry policy is not valid.

Envelope
source.pointer
/data/attributes/retry_policy/max_retries
meta.request_id
a4d5c03ea070
422sender_bank_unresolvable

The sending bank could not be identified.

Envelope
source.pointer
/data/attributes/sender_bank
meta.request_id
a8c05d9f7438
422tracking_required

The receipt shows neither a tracking key nor a numeric reference.

Envelope
source.pointer
/data/attributes/tracking_key
meta.request_id
5c1f0e7a9b24
422validation_error

Some data needs fixing.

Envelope
meta.request_id
a575ef5d89fa
429quota_exceeded

You used all 500 validations in your plan for this period.

Envelope
meta.request_id
f531a5d091ea
Response headers
  • Retry-After: integer — Seconds to wait before retrying. Matches the endpoint's rate-limit window (typically 60s for list endpoints, 1-5s for in-flight idempotent operations).
  • X-RateLimit-Limit: integer — Configured request cap for this bucket. It is emitted on every 429 and, on the authenticated API, also on successful responses, where it is the per-key cap of the account plan.
  • X-RateLimit-Remaining: integer — Requests remaining in the current window. Always 0 at the moment of the 429; on a successful response of the authenticated API it is what is left of the per-key cap.
  • X-RateLimit-Reset: integer — Absolute Unix epoch (seconds) when the window resets. Emitted on every 429, alongside Retry-After, and on successful responses of the authenticated API.
429rate_limit_exceeded

You exceeded the request limit.

Envelope
meta.request_id
f7a8b9c0d1e22e1d0c9b8a7f
Response headers
  • Retry-After: integer — Seconds to wait before retrying. Matches the endpoint's rate-limit window (typically 60s for list endpoints, 1-5s for in-flight idempotent operations).
  • X-RateLimit-Limit: integer — Configured request cap for this bucket. It is emitted on every 429 and, on the authenticated API, also on successful responses, where it is the per-key cap of the account plan.
  • X-RateLimit-Remaining: integer — Requests remaining in the current window. Always 0 at the moment of the 429; on a successful response of the authenticated API it is what is left of the per-key cap.
  • X-RateLimit-Reset: integer — Absolute Unix epoch (seconds) when the window resets. Emitted on every 429, alongside Retry-After, and on successful responses of the authenticated API.
503dispatch_failed

We could not start the request.

Envelope
meta.request_id
aeae29c5deab
503ocr_not_configured

Receipt reading is not available.

Envelope
meta.request_id
ec8e91fbd5a4