Skip to main content
The I-file is a flat text file with fixed-length records that you create daily to report DCC and foreign currency transaction data to Fexco for revenue reporting on Fresh Insights. Each field in the file must be placed at an exact position, with the correct length, padding, and data type. You encrypt the file with GPG and upload it to Fexco’s SFTP server. The I-file supports sales and refunds only. You build the I-file by extracting transaction data from your payment processing systems and formatting it according to the record structure described on this page. Fexco recommends using a code editor with column view (such as UltraEdit or GNU Emacs) to verify that each field starts at the correct position. Every field must be at the exact position specified, with the correct padding (space-fill or zero-fill). Misaligned fields are a common cause of file rejections.

Before you start

You need the following before you build and submit an I-file:
  • SFTP credentials and GPG encryption keys, configured through security setup.
  • A three-character submitter identifier assigned by Fexco during onboarding.
  • Boarded merchants with merchant IDs that match the IDs in your file.
If you do not have your submitter identifier or SFTP location, contact Fexco DCC Support at DCCSupport@fexco.com.

I-file structure overview

Every I-file follows the same record order. Each record occupies a single line in the file, with fields at fixed positions. The following table describes the record types in the order they must appear:
The I-file is rejected if records are not in this order. Place all transaction records and their subrecords before the summary records.
The I-file has two levels of integrity checking. A failure in either check causes the entire file to be rejected.
  • Financial integrity: transaction records must total into summary records, summary records must total into claim records, and claim records must total into the trailer.
  • Logical integrity: every record must have a sequence number starting at 0000001 and incrementing by one, and the record count in the UTL must equal the highest sequence number.

File naming convention

Name your I-file using the following format (all uppercase):
The following table describes each component: For example:

Build the file

Your system must produce each record type in the correct order. The following sections describe what each record must contain and how to verify it. To follow along, download the sample I-file and open it in a code editor with column view (such as UltraEdit or GNU Emacs) to verify your field positions against the column ruler.
1

Start with the volume header (line 1)

The volume header (VOL1) is the first line. It identifies the submitter and contains a six-digit file sequence number that must match the nnnnnn in the filename.The sequence number is a counter that you maintain. Start at 000001 for your first file and increment by one each time Fexco accepts or partially accepts a file. If Fexco rejects the file entirely, do not increment. Resubmit with the same sequence number.Your system must place the following fields at exact positions. The line must be exactly 90 characters long, with space-fill or zero-fill in all unused positions:In the example file, line 1 shows VOL1000001 at the start (cols 1–10), the date 20261020:143000 at cols 12–26, and 3 at col 80.
2

Add the user header (line 2)

The user header (UHL1) is the second line. It contains the file creation date and a fixed work code that identifies this as a submission file.In the example file, line 2 shows UHL1261020 at the start, followed by zeros, then 1VOUCHERS001.
When the three-digit sequence number rolls over from 999 to 000, the full six-digit sequence number in the filename and volume header is not affected.
3

Add transaction records (lines 3+)

Each transaction occupies one line (173 characters). Your system must output one line for every card transaction in the reporting period, including both DCC and domestic transactions. Use J1 for sales and J2 for refunds.Transaction records are built from two segments that cover card, merchant, terminal, transaction, and currency conversion data. For the field-by-field layout, see the I-file format specification.Format all monetary amounts in unsigned minor units as defined by ISO 4217, right-justified, and zero-filled with no decimal point. See the currency precision table for the correct formatting per currency.
Currencies with zero minor units (for example, JPY, KRW, CLP) must be right-padded with 00. This exception applies only to currencies where the minor unit is 0.
4

Include subrecords if needed

Some transactions need an additional line of data (90 characters) immediately after the transaction line to carry type-specific information. The I-file supports three subrecord types:
  • MCP (07): offered currency code and detection method for Multi-Currency Pricing transactions.
  • ICC addendum (10): the application currency code read from the card’s chip during a chip transaction (EMV Tag 9F42). Your payment terminal captures this value.
  • Authorization network reference (26): the reference date and trace ID returned in the card scheme’s authorization response. For Mastercard, this is DE 16 (date) and DE 48 Subelement 63 (Trace ID).
For the full field layout of each subrecord type, see the I-file format specification. If your transactions do not use subrecords, skip this step.A subrecord line sits between the transaction it belongs to and the next transaction. Every subrecord gets its own sequence number, which shifts the count for all lines that follow it. For example:
All three subrecord types share the same core fields:
Only one subrecord of each type is permitted per transaction. A transaction can have multiple subrecords of different types (for example, both 07 and 10), each on its own line with its own sequence number.
For the complete field-by-field layout of each subrecord type, see the I-file format specification.
5

Calculate summary and claim totals

After all transaction lines, your system must output totals that Fexco uses to verify the file has not been corrupted or truncated. If the totals do not match the transactions, the entire file is rejected.There are two types:
  • Summary records: one for each combination of merchant, terminal, and currency. The record code varies depending on whether sales exceed refunds or vice versa.
  • Claim records: one per merchant. The record code varies depending on whether the merchant’s total sales exceed total refunds or vice versa.
For the record codes and field layouts, see the I-file format specification.
Do not mix short (11 characters or fewer) and long (12–16 characters) merchant IDs in the same I-file. All merchant IDs in a single file must use the same format.
6

Close the file with the user trailer (last line)

The user trailer (UTL1) is the last line (90 characters). It contains the grand totals of all claim records and a count of records in the file. Fexco checks this count against the sequence numbers. If they do not match, the file is rejected.Your system must place the following fields at exact positions:In the example file, line 7 shows UTL1 followed by the totals. The record count 0000000004 matches the four records between the UHL and UTL (two transactions, one summary, one claim).
The record count in the trailer must match the highest sequence number. If it does not, the file is rejected.

Submit empty files

If no transactions occurred during the reporting period, you must still submit an I-file. An empty I-file contains only the volume header (VOL1), user header (UHL1), and user trailer (UTL1) with all monetary totals and record counts set to zero. The empty file must follow the same naming convention and sequence numbering as a regular file.

Encrypt and submit the file

Follow the steps below to encrypt and upload your file to Fexco:
1

Encrypt with GPG

As a PCI DSS requirement, encrypt the I-file using GPG before submission. The encrypted file must use the .gpg suffix in lowercase:
2

Upload to SFTP

Upload the encrypted file to the Incoming folder on your designated Fexco SFTP server. Fexco picks up files automatically at a scheduled time.
When submitting multiple files on the same day, collect the confirmation file from the previous submission before sending the next file.

Check the confirmation files

After Fexco processes your file, three confirmation files appear in the Outgoing folder on your SFTP server. The following table describes each file:

Read the confirmation text file

Open the confirmation text file to check the result:
  • Completely accepted: all transactions were processed. Increment the file sequence number for your next submission.
  • Rejected entirely: the entire file was rejected. The UHL line contains an R followed by a two-digit rejection code. Fix the rejection cause and resubmit with the same sequence number. Do not increment.
  • Partially rejected: some transactions were rejected. The UHL line contains a P. Accepted transactions are processed. Fix the rejected transactions and resubmit them in a new file with the next sequence number.
The confirmation text file shows “completely accepted.” If the file was rejected or partially rejected, see Troubleshoot transaction import for the full list of rejection codes and resubmission steps.

Next steps

After you have submitted your I-file and verified the confirmation, use the following resources for troubleshooting or to learn more: