# 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 | 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 | Yes | The CLABE or debit card number |
| `amount` | Decimal (e.g. `1250.23`) | Yes | The amount to collect, in MXN |
| `document_type` | `mx_rfc` / `mx_curp` | Yes | Customer identification type |
| `document_number` | Alphanumeric (RFC or CURP format) | Yes | Customer identification number |
| `customer_name` | Letters and spaces | Yes | Full name of the customer or payer |
| `reference` | Letters, numbers, `-` and `_` | 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.
- Maximum **50,000 rows** per file (excluding the header).


## 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)