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

# Troubleshoot transaction import

> Diagnose file rejections, resolve transaction errors, and resubmit corrected files to Fexco.

Use this page when a transaction file is rejected, partially
rejected, or you are not sure what went wrong. Find your issue
below and follow the steps to resolve it.

## Before you troubleshoot

Before you troubleshoot a specific error, run through these checks:

* Confirm the filename follows the correct naming convention for
  your file format (I-file, V-file, or XML I-file).
* Verify the file sequence number has not already been used.
* Check that all merchant IDs in the file match IDs that were
  [boarded with Fexco](https://docs.fexco.com/dcc/guides/merchant-boarding/how-it-works.md).
* Confirm the file's summary totals reconcile with the transaction
  records (financial integrity).
* Confirm that record sequence numbers start at `0000001` and
  increment by one with no gaps (logical integrity).

## File rejection issues

> [accordion] Entire XML I-file rejected with invalid XML (S3)
>
> The `.status` file shows status `S3` and includes an XML parse
> error with a line number and column number.
>
> **Common causes**
>
> * Unclosed tags, incorrect element names, or invalid attribute
>   values.
> * Encoding mismatches.
> * The `disposition` attribute contains an invalid value (must be
>   either `production` or `test`).
>
> **How to fix**
>
> 1. Read the parse error in the `.status` file. Use the line and
>    column numbers to locate the error in your XML file.
> 2. Validate the XML file against Fexco's XSD schema before
>    resubmitting.
> 3. Resubmit with the same sequence number (do not increment for
>    a fully rejected file).

> [accordion] Entire XML I-file rejected as duplicate (S4)
>
> The `.status` file shows status `S4`.
>
> **Why this happens**
>
> A file with the same sequence number has already been uploaded
> and accepted.
>
> **How to fix**
>
> Check your submission history and increment the sequence number
> to the next unused value. Resubmit with the new sequence number.

> [accordion] I-file or V-file rejected with integrity failure (R10, R11, R12)
>
> The confirmation text file shows the file is rejected with code
> `R10`, `R11`, or `R12`.
>
> **Common causes**
>
> * The file totals do not reconcile (financial integrity): a
>   summary, claim, or trailer total does not match the
>   transactions it covers.
> * The record sequence numbers are not consecutive (logical
>   integrity): a gap, duplicate, or incorrect total count in
>   the UTL.
>
> **How to fix**
>
> 1. Check financial integrity. Verify the hierarchical totals at
>    every level: each E4/E5 summary must total its transactions,
>    each E7/E8 claim must total its summaries, and the UTL must
>    total all claims.
> 2. Check logical integrity. Verify that sequence numbers start
>    at `0000001` and increment by one with no gaps. The record
>    count in the UTL must equal the highest sequence number.
> 3. Resubmit with the same sequence number. Update the filename
>    date if resubmitting on a different day.

> [accordion] I-file or V-file rejected with invalid filename (R01, R02, R03, R04)
>
> The confirmation text file shows a rejection code between `R01`
> and `R04`.
>
> **Common causes**
>
> * The filename does not follow the naming convention
>   (`IXXXYYYYMMDDnnnnnn.DAT` or `VXXXYYYYMMDDnnnnnn.DAT`).
> * The submitter identifier does not match the value assigned by
>   Fexco.
> * The date portion is not a valid `YYYYMMDD` date.
> * The sequence number does not follow the expected sequence.
>
> **How to fix**
>
> 1. Verify the filename matches the convention described in the
>    [I-file guide](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/i-file.md#file-naming-convention)
>    or
>    [V-file guide](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/v-file.md#file-naming-convention).
> 2. Confirm the three-character submitter identifier matches the
>    value Fexco provided during onboarding.
> 3. Resubmit with the same sequence number.

> [accordion] I-file or V-file already uploaded (R05)
>
> The confirmation text file shows rejection code `R05`.
>
> **Why this happens**
>
> A file with this filename (including sequence number) was
> already submitted and accepted.
>
> **How to fix**
>
> Increment the sequence number and resubmit.

## Transaction rejection issues

> [accordion] One or more transactions rejected in a partially accepted file
>
> The file was accepted, but some transactions failed. The
> confirmation data file includes rejection codes on the affected
> transactions.
>
> **What you are seeing**
>
> * XML I-file: the `.status` file shows `S2`. The
>   `_rejections.xml` file lists the rejected transactions with
>   `rejectionReason` codes.
> * I-file or V-file: the confirmation text file shows "partially
>   rejected." The confirmation data file includes a two-digit
>   rejection code on each affected transaction line.
>
> **How to fix**
>
> 1. Look up the rejection code in the rejection codes
>    reference in Developer resources.
>
> 2. Fix only the rejected transactions. Do not modify
>    transactions that were processed successfully.
>
> 3. Build a new file containing only the corrected transactions.
>    Increment the sequence number by one (because the original
>    file was partially accepted).
>
> 4. Submit the corrected file and verify the new confirmation
>    shows all transactions accepted.
>
> > [!WARNING]
> >
> > Do not resubmit transactions that were already processed
> > successfully. Including them in the resubmission file causes
> > duplicates.

> [accordion] Invalid merchant ID (code 03)
>
> One or more transactions are rejected with code `03`.
>
> **Common causes**
>
> * The merchant ID does not match a boarded merchant.
> * Short and long merchant IDs are mixed in the same file.
>
> **How to fix**
>
> 1. Verify the merchant ID matches a
>    [boarded merchant](https://docs.fexco.com/dcc/guides/merchant-boarding/how-it-works.md).
> 2. Confirm all merchant IDs in the file use the same format:
>    either all 11 characters or fewer, or all 12-16 characters.
> 3. Resubmit only the corrected transactions.

> [accordion] Invalid exchange rate (code 12 or 17)
>
> Transactions are rejected with code `12` or `17`.
>
> **Common causes**
>
> * The exchange rate field is empty, contains non-numeric
>   characters, or is not 13 characters.
> * The base amount, exchange rate, and currency amount are not
>   mathematically consistent.
>
> **How to fix**
>
> 1. Verify the exchange rate is a 13-character decimal,
>    right-justified, zero-filled (for example,
>    `0000001.06164`).
> 2. For non-DCC transactions, use `00000001.0000`.
> 3. Verify that the base amount multiplied by the exchange rate
>    equals the currency amount (within rounding tolerance).

## Formatting issues

> [accordion] Fields in the wrong position
>
> Transactions are rejected with various codes, or the entire
> file is rejected with `R13` or `R14`.
>
> **Why this happens**
>
> The I-file and V-file use fixed-length records. Every field
> must start at the exact character position specified. A single
> misaligned field shifts all subsequent fields.
>
> **How to fix**
>
> Open the file in a code editor with column view (such as
> [UltraEdit](https://www.ultraedit.com/) or
> [GNU Emacs](https://www.gnu.org/software/emacs/)) and verify
> each field starts at the correct position. See the
> [I-file guide](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/i-file.md)
> or
> [V-file guide](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/v-file.md)
> for field positions.

> [accordion] Currency amounts include a decimal point (code 34, 53)
>
> Transactions are rejected with code `34` (invalid base amount)
> or `53` (invalid currency amount).
>
> **Why this happens**
>
> Amounts must be in unsigned minor units with no decimal point.
>
> **How to fix**
>
> Remove the decimal point and express the amount in the
> currency's smallest unit. For example, USD 124.78 becomes
> `00000012478`. See the
> [currency precision table](https://docs.fexco.com/dcc/developer-resources/codes/currency-precision.md)
> for the correct number of decimal places per currency.

> [accordion] Zero-minor-unit currencies not padded correctly (code 34, 53)
>
> Transactions in JPY, KRW, CLP, or similar currencies are
> rejected with code `34` or `53`.
>
> **Why this happens**
>
> Currencies with zero minor units must be right-padded with
> `00`. This is a specific exception in the formatting rules.
>
> **How to fix**
>
> Right-pad the amount with `00`. For example, JPY 241,832
> becomes `00024183200`.

> [accordion] Wrong summary or claim code (code 22, 23)
>
> Summary or claim records are rejected with code `22` or `23`.
>
> **Why this happens**
>
> The summary or claim code does not match the net direction of
> the transactions it covers.
>
> **How to fix**
>
> * Use `E4` when sales equal or exceed refunds. Use `E5` when
>   refunds exceed sales.
> * Use `E8` when sale summaries equal or exceed refund
>   summaries. Use `E7` when refund summaries exceed sale
>   summaries.

## Resubmission and sequence numbers

After fixing the errors, resubmit the corrected file. The
sequence number action depends on the rejection type:

* **Accepted**: increment the sequence number by one for the
  next file.
* **Partially rejected**: the file was processed and valid
  transactions were accepted. Increment the sequence number.
  Resubmit only the corrected rejected transactions in the
  next file.
* **Fully rejected**: do not increment. Fix the errors and
  resubmit with the same sequence number. Update the filename
  date if resubmitting on a different day.

## Still having issues?

If you have worked through the steps above and the issue persists,
contact Fexco DCC Support with:

* Your submitter identifier (three-character code).
* The file format you are using (XML I-file, I-file, or V-file).
* The filename and sequence number of the rejected file.
* The full rejection code from the confirmation file.
* The environment (production or test).

Contact Fexco DCC Support at [DCCSupport@fexco.com](mailto:DCCSupport@fexco.com).

## Next steps

* [Build and submit an I-file](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/i-file.md):
  I-file construction and field positions.
* [Build and submit a V-file](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/v-file.md):
  V-file construction and field positions.
* [Build and submit an XML I-file](https://docs.fexco.com/dcc/guides/transaction-import/build-and-submit/xml-i-file.md):
  XML I-file construction and validation.


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