> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/tokenization/es/register-cards-via-batch-file/batch-file-error-handling.md).

# Manejo de errores del archivo por lotes

This page lists the error codes that can be returned by the D1 batch file processor.

These errors are reported in the batch output file. They can occur either while D1 parses the input batch file or while it processes an individual operation (for example, when decrypting card details).

## Error levels

Errors are reported at two different levels:

* **Header level (H)**: Errors that apply to the entire input file. When a header-level error occurs, it is marked as `H`.
* **Record level (R)**: Errors that apply to a specific operation record. When a record-level error occurs, it is marked as `R`.

## Error handling behavior

Header-level and record-level errors are handled differently:

* **Header-level error (H)**\
  If a header-level error occurs, D1 does **not** process any records in the file. The batch output file contains only the header section and the corresponding error.
* **Record-level error (R)**\
  If there is no header-level error, D1 attempts to process **all** records in the file. A failure on one record does **not** prevent other records from being processed.\
  In the batch output file, each record (each end user and card) includes its own status and any associated error.

## Error list

The following table describes all error codes that can be returned by the batch file processor.

| Error code                           | Level | Name                                  | Description                                                                                                                                                                                                                                                                           |
| ------------------------------------ | ----- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 100                                  | H     | INVALID\_HEADER                       | The header in the batch file does not comply with the expected structure. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                             |
| 102                                  | H     | FILE\_TOO\_BIG                        | The file size exceeds the maximum allowed. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                                            |
| 103                                  | H     | INVALID\_JSON\_FILE                   | The file is not valid JSON.                                                                                                                                                                                                                                                           |
| 105                                  | H     | MANDATORY\_PARAMETER\_MISSING\_HEADER | A required parameter is missing from the header. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                                      |
| 106                                  | H     | FIELD\_INVALID\_FORMAT                | A header parameter is not in the expected format. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                                     |
| 107                                  | H     | DUPLICATE\_ROW\_ID                    | Each record must have an incremental `rowId` value. D1 detected a duplicate `rowId`. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                  |
| 110                                  | H     | INVALID\_SIGNATURE                    | Signature verification failed. Check the key that was used and how the signature was computed. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition) and the signature section on that page. |
| 111                                  | H     | MISSING\_SIGNATURE                    | The `signature` field is mandatory but is missing from the file. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                      |
| 112                                  | H     | WRONG\_CONFIGURATION                  | For the provided `issuerId`, no valid configuration was found. Contact your Thales delivery team.                                                                                                                                                                                     |
| 113                                  | H     | UNKNOWN\_ISSUER                       | The `issuerId` in the batch file does not match any issuer onboarded in D1. Contact your Thales delivery team.                                                                                                                                                                        |
| 116                                  | H     | BAD\_FILE\_EXTENSION                  | The batch file extension is not recognized. See [Batch file overview](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-overview).                                                                                               |
| 117                                  | H     | BAD\_FILE\_NAME                       | The batch file name does not follow the expected naming convention. See [Batch file overview](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-overview).                                                                       |
| 130                                  | H     | DUPLICATE\_FILE\_NAME                 | A batch file with the same name has already been processed. Ensure that each batch file name is unique.                                                                                                                                                                               |
| 197                                  | H     | UNKNOWN\_OPERATION                    | The `operation` value in the file header is not supported. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition) for the list of allowed operations.                                         |
| 199                                  | H     | PARSING\_ERROR                        | An unexpected error occurred while parsing the header. Contact your Thales delivery team if the issue persists.                                                                                                                                                                       |
| 202                                  | H     | INVALID\_RECORD                       | The record header is not valid, or the `rowId` value is invalid. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                      |
| 203                                  | H     | MANDATORY\_PARAMETER\_MISSING\_RECORD | A required parameter is missing from a record. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                                        |
| FIELD\_INVALID\_FORMAT               | R     | FIELD\_INVALID\_FORMAT                | The record JSON is not well formatted, or a field in the record is not in the expected format as defined in this documentation. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).       |
| FIELD\_INVALID\_VALUE                | R     | FIELD\_INVALID\_VALUE                 | A field in the record has a value that is not allowed for that field. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                 |
| CONSUMER\_INVALID\_STATE             | R     | CONSUMER\_INVALID\_STATE              | The end user (consumer) already exists in D1 but is in an invalid state (for example, DELETED).                                                                                                                                                                                       |
| INTERNAL\_ERROR                      | R     | INTERNAL\_ERROR                       | An unexpected internal error occurred while processing the record. Additional details may be returned when available.                                                                                                                                                                 |
| CRYPTO\_ERROR                        | R     | CRYPTO\_ERROR                         | D1 could not decrypt the provided encrypted data in the record.                                                                                                                                                                                                                       |
| INVALID\_PAN                         | R     | INVALID\_PAN                          | The funding PAN is invalid or does not meet the expected format. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                      |
| INVALID\_EXPIRY\_DATE                | R     | INVALID\_EXPIRY\_DATE                 | The card expiry date is invalid or does not meet the expected format. See [Batch file definition](https://app.gitbook.com/o/fwy1mtbRONGA2YDKDBr0/s/62lLFDcmLCeqqwmy4Fee/integrate-batch-files/batch-file-definition).                                                                 |
| CARD\_ALREADY\_EXISTS                | R     | CARD\_ALREADY\_EXISTS                 | The `cardId` is already registered in D1 for this end user and differs from the card previously registered under that identifier.                                                                                                                                                     |
| CARD\_INVALID\_STATE                 | R     | CARD\_INVALID\_STATE                  | The `cardId` is already registered in D1 but the card is in an invalid state (for example, REPLACED or DELETED).                                                                                                                                                                      |
| OPERATION\_NOT\_ALLOWED              | R     | OPERATION\_NOT\_ALLOWED               | Registration is not allowed for this card product based on the current configuration.                                                                                                                                                                                                 |
| MISSING\_C2P\_MANDATORY\_INFORMATION | R     | MISSING\_C2P\_MANDATORY\_INFORMATION  | One or more fields required for Click to Pay are missing (for example, `firstName`, `lastName`, `language`, `mobilePhoneNumber.countryCode`, or `mobilePhoneNumber.phoneNumber`).                                                                                                     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payments.thalescloud.io/tokenization/es/register-cards-via-batch-file/batch-file-error-handling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
