> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fexco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TCOM file

> Field reference for the Transaction Commission (TCOM) file: naming convention, field definitions, and a sample CSV.

The Transaction Commission (TCOM) file is a comma-separated values
(CSV) report that Fexco delivers to acquirers and Payment Service
Providers (PSPs) via Secure File Transfer Protocol (SFTP) on an
agreed schedule. Each file lists the Dynamic Currency Conversion (DCC)
commission earned per transaction for a given reporting period.

## File naming convention

Fexco uses the filename to identify the source acquirer and the
reporting period. All alphabetic characters in the filename and file
extension must be uppercase. Use the following format for every TCOM
file.

```
TCOM-AAA-FFFFF-YYYYMMDD_R.CSV
```

The following table describes each component of the filename.

| Component | Length | Type | Description |
| :- | :- | :- | :- |
| `TCOM` | 4 | Alpha | Fixed prefix. Always `TCOM`. |
| Acquirer identifier | 3 | Alphanumeric | Three-character acquirer identifier assigned by Fexco during onboarding. For example, `ABC`. |
| File group identifier | 5 | Numeric | Five-digit file group identifier assigned by Fexco during onboarding. For example, `10101`. |
| Commission period end date | 8 | Numeric | End date of the commission period in `YYYYMMDD` format. For example, `20240601`. |
| File record count | Variable | Numeric | Count of records in the file, excluding the header record. Separated from the previous component by an underscore (`_`) rather than a hyphen, to support parsing. For example, `12345`. |
| `.CSV` | 4 | Alphanumeric | Fixed file extension. Always `.CSV`. |

For example, a file with 12,345 records for the period ending
1 June 2024 is named:

```
TCOM-ABC-10101-20240601_12345.CSV
```

## File format

The TCOM file uses CSV format encoded in UTF-8. Every field value is
enclosed in double-quote characters. The file contains two record
types, as described in the following table.

| Record type | Position | Description |
| :- | :- | :- |
| Header record | First line | Lists the column names for all fields in the file. |
| Detail records | All subsequent lines | One record per DCC transaction. |

Detail records are sorted in the following order:

1. Settlement currency ([ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) alphabetic code).
2. Fexco transaction processing date.
3. Merchant name.
4. Transaction type, with sales before refunds.

## File fields

The following table describes all 26 fields in the TCOM file. The
header record lists field names exactly as shown in the **Field name**
column. The four commission amount fields (fields 23 to 26) are
optional and appear only when the relevant commission arrangement is
in place.

| Field | Field name | Type | Description |
| :- | :- | :- | :- |
| 1 | `Merchant` | Alpha | Merchant or location name. |
| 2 | `Merchant ID` | Alphanumeric | Merchant or location identifier. |
| 3 | `Terminal ID` | Alphanumeric | Terminal identifier. |
| 4 | `Base Cur` | Alpha | Merchant base currency, using the three-letter ISO 4217 alphabetic code. |
| 5 | `DCC Cur` | Alpha | Transaction currency chosen by the cardholder, using the three-letter ISO 4217 alphabetic code. |
| 6 | `Card Country Of Issue` | Alpha | Country where the card was issued, using the three-letter [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code. |
| 7 | `Currency type` | Alpha | Indicates how the card scheme settles the transaction. `E2E` (end-to-end) means the card scheme settles in the transaction currency. `NE2E` (non-end-to-end) means the card scheme does not settle in the transaction currency. |
| 8 | `Card` | Alpha | Card scheme abbreviation. |
| 9 | `Txn Time` | Alpha | Date and time of the transaction. |
| 10 | `PAN` | Alpha | Masked Primary Account Number (PAN). |
| 11 | `Auth Code` | Alpha | Authorization code for the transaction. |
| 12 | `Txn Method` | Alpha | Card input method. For example, `Contactless` or `Chip`. |
| 13 | `Proc Date` | Alpha | Fexco transaction processing date. |
| 14 | `Type` | Alpha | Transaction type. One of `Sale` or `Refund`. |
| 15 | `Gross FX Amnt` | Alphanumeric | Gross transaction amount in the transaction currency. |
| 16 | `Gross Base Amnt` | Alphanumeric | Gross transaction amount in the merchant base currency. |
| 17 | `FX Rate` | Alphanumeric | Exchange rate applied to the transaction. |
| 18 | `Net FX Amnt` | Alphanumeric | Net transaction amount in the transaction currency, after deductions. |
| 19 | `Net Base Amnt` | Alphanumeric | Net transaction amount in the merchant base currency, after deductions. |
| 20 | `Settlement Cur` | Alpha | Settlement currency, using the three-letter ISO 4217 alphabetic code. |
| 21 | `Settlement Amnt` | Alphanumeric | Settlement amount in the settlement currency. |
| 22 | `Txn Reference` | Alphanumeric | Original transaction reference. |
| 23 | `Merchant Amnt` | Alphanumeric | Merchant commission amount in the settlement currency. Optional. |
| 24 | `Acquirer Amnt` | Alphanumeric | Acquirer commission amount in the settlement currency. Optional. |
| 25 | `PSP Amnt` | Alphanumeric | PSP commission amount in the settlement currency. Optional. |
| 26 | `Fexco Amnt` | Alphanumeric | Fexco commission amount in the settlement currency. Optional. |

## Sample file

The following example shows a TCOM file containing two DCC
transactions. The `Merchant Amnt`, `Acquirer Amnt`, and `Fexco Amnt`
commission columns are included. The `PSP Amnt` column is omitted
because no PSP commission arrangement is in place for this acquirer.

```csv theme={null}
"Merchant","Merchant ID","Terminal ID","Base Cur","DCC Cur","Card Country Of Issue","Currency type","Card","Txn Time","PAN","Auth Code","Txn Method","Proc Date","Type","Gross FX Amnt","Gross Base Amnt","FX Rate","Net FX Amnt","Net Base Amnt","Settlement Cur","Settlement Amnt","Txn Reference","Merchant Amnt","Acquirer Amnt","Fexco Amnt"
"MERCHANT ONE","123456789","12345678","KWD","SAR","SAU","NE2E","VIS","2024-07-31 12:21:19","405433******0000","*********","Contactless","2024-08-01 04:00:00","Sale","71.27","5.55","12.8423","71.27","5.55","KWD","5.55","REF1","0.03","0.06","0.05"
"MERCHANT TWO","123456780","12345679","KWD","INR","IND","NE2E","MAS","2024-07-31 21:27:58","512932******0000","*********","Chip","2024-08-01 04:00:00","Sale","28351.42","98.9","286.6675","28351.42","98.9","KWD","98.9","REF2","0.49","1.42","1.01"
```

## Next steps

* [Settlement](https://docs.fexco.com/dcc/guides/transaction-import/settlement.md): review the
  settlement process and how DCC commission is distributed.
* [How transaction import works](https://docs.fexco.com/dcc/guides/transaction-import/how-it-works.md):
  understand how daily transaction files relate to commission
  reporting.
* [Downloadable file templates](https://docs.fexco.com/dcc/developer-resources/sample-files.md):
  download sample files for all DCC file formats.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.