# Batch Files Column Specification

This page describes the columns used in charge request files (uploaded via SFTP or the Portal) and the charge response files returned by the platform.

## Charge Request File Columns

| Column | Allowed Values | Max Length | Required | Description |
|  --- | --- | --- | --- | --- |
| `instrument_type` | `mx_clabe` / `mx_direct_debit_card` | — | Yes | The type of payment instrument to charge |
| `instrument_bank` | See [Institutions List](/products/directdebit/content/reference/institutions-list) | — | Required when `instrument_type` is `mx_direct_debit_card` | The bank the instrument belongs to |
| `instrument_identifier` | 18-digit string | 50 characters | Yes | The CLABE or debit card number |
| `amount` | Decimal (e.g. `1250.23`), greater than 0 and up to `50000.00` | — | Yes | The amount to collect, in MXN |
| `document_type` | `mx_rfc` / `mx_curp` | — | Yes | Customer identification type |
| `document_number` | Alphanumeric (RFC or CURP format) | 50 characters | Yes | Customer identification number |
| `customer_name` | Letters and spaces | 255 characters | Yes | Full name of the customer or payer |
| `reference` | Letters, numbers, `-` and `_` | 100 characters | No | A merchant-assigned identifier to correlate the charge in your own systems |
| `days_due` | Integer (e.g. `60`) | — | No | Optional hint used by the platform to improve the likelihood of successful collection |


## Charge Response File Columns

Response files contain all columns from the request file, plus the following:

| Column | Allowed Values | Description |
|  --- | --- | --- |
| `result` | `confirmed` / `declined` / `canceled` | The outcome of the charge attempt |
| `declined_reason` | Platform error code | Present when `result` is `declined`. See [Platform Error Codes](/products/directdebit/content/reference/error-codes#platform-error-codes) |
| `declined_reason_rail` | Bank error code | Present when `result` is `declined`. See [Bank Error Codes](/products/directdebit/content/reference/error-codes#bank-error-codes) |


## Validation Error File Columns

If input validation fails, the platform returns a file with all request rows plus:

| Column | Description |
|  --- | --- |
| `errors` | A description of the validation error(s) found for that row |


## File Format Notes

- Files must be in **CSV format** with a header row.
- The file name must contain only letters, numbers, hyphens (`-`), and underscores (`_`). No spaces or special characters.


## Limits

| Constraint | Limit |
|  --- | --- |
| File size | 30 MB maximum |
| Data rows | At least 2 (excluding the header). No maximum row count; a file is bounded only by the 30 MB size limit and by finishing processing within the platform's processing window |
| Amount per charge | Greater than 0, up to 50,000 MXN |
| Total batch amount | No limit |


There's no automatic retry if a file fails to finish processing. For example, if a very large file doesn't complete within the processing window, resubmit it.

## Related Resources

- [Charges Request File Layout](https://docs.google.com/spreadsheets/d/1HsgJg3sRcUpftfDUPDF3hpY2NLLuB7lCL3JsK-bpgyQ/)
- [Charges Request File Example](https://docs.google.com/spreadsheets/d/1WwhpzbE8c9eQcgXW8N-jO6pJuMPawsMxeKvBSwpVEOs)
- [Validation Response File Example](https://docs.google.com/spreadsheets/d/15Jt0jGLNfmFMeXFu-ddMru1RJkqRDlER77T85QumdYs)
- [Charges Response File Example](https://docs.google.com/spreadsheets/d/1dowdDTs0di2283TaaQCZUJNnDWsBssXYq3nfqAA4J0s)