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

# data_invalid

> A value in the CargoWise document is not one that the CFDI or the SAT accepts.

The status is **Failed**.

> **Total of invoice INV-1042 is not valid** `data_invalid`
>
> The total (CargoWise OSTotal, SAT Total) of invoice INV-1042 is 1150.00 MXN. Expected: 1160.00 MXN. A credit note must be the full total of its invoice or clearly less.

## What it means

The message names the field, the value that Transitive received, the value that it expected, and the check that failed. A check of the SAT shows its rule number. The tables below give each field and each check.

## How to correct it

Correct the value in CargoWise. Then send the document again, or stamp it by hand.

## Totals and header

The totals, the currency and the payment method of an invoice or a credit note.

### Total

CargoWise field: `OSTotal`. SAT field: `Total`.

| Check | Rule |
| - | - |
| `full_or_clearly_less` | A credit note must be the full total of its invoice or clearly less. |

### Currency

CargoWise field: `OSCurrency`. SAT field: `Moneda`.

| Check | Rule |
| - | - |
| SAT CFDI40113 | It is not in the SAT's list of currencies (c\_Moneda). |

### Exchange rate

CargoWise field: `ExchangeRate`. SAT field: `TipoCambio`.

| Check | Rule |
| - | - |
| SAT CFDI40118 | It is outside the range that the SAT allows for the currency of the document (c\_Moneda). The SAT accepts such a rate only with a confirmation code, which the stamping provider does not issue. |

### Local currency

| Check | Rule |
| - | - |
| `local_currency_mxn` | Transitive can prove the exchange rate only when the local currency is MXN. |

### Payment method

SAT field: `MetodoPago`.

| Check | Rule |
| - | - |
| `allowed_value` | The value is not one that the CFDI allows. |

### Due date

CargoWise field: `DueDate`.

| Check | Rule |
| - | - |
| `readable_date` | Transitive reads the payment method of a credit note from its DueDate and PostDate, so each must be a valid date. |
| `due_on_or_after_post` | Transitive reads the payment method of a credit note from its DueDate and PostDate. The DueDate must be a valid date on or after the PostDate: the same day gives PUE and a later DueDate gives PPD. |

### Post date

CargoWise field: `PostDate`.

| Check | Rule |
| - | - |
| `readable_date` | Transitive reads the payment method of a credit note from its DueDate and PostDate, so each must be a valid date. |

### Payment method fields

| Check | Rule |
| - | - |
| `field_limit` | Transitive reads at most this number of values. |

### Payment form (totals and header)

SAT field: `FormaPago`.

| Check | Rule |
| - | - |
| SAT CFDI40104 | It is not in the SAT's list of payment forms (c\_FormaPago). |

### Discount (totals and header)

CargoWise field: `OSDiscountAmount`. SAT field: `Descuento`.

| Check | Rule |
| - | - |
| SAT CFDI40110 | The discounts of a document cannot add up to more than its subtotal. |

### Export code

SAT field: `Exportacion`.

| Check | Rule |
| - | - |
| SAT CFDI40122 | Export code 02 needs the foreign trade complement (Comercio Exterior), which Transitive does not issue. Only on **Stamp by hand**. |
| SAT CFDI40123 | It is not in the SAT's list of export codes (c\_Exportacion). Only on **Stamp by hand**. |

### Global invoice periodicity

SAT field: `Periodicidad`.

| Check | Rule |
| - | - |
| SAT CFDI40131 | It is not in the SAT's list of periodicities (c\_Periodicidad). Only on **Stamp by hand**. |
| SAT CFDI40132 | The SAT allows the two-month periodicity (05) only for issuer regime 621. Only on **Stamp by hand**. |

### Global invoice months

SAT field: `Meses`.

| Check | Rule |
| - | - |
| SAT CFDI40133 | It is not in the SAT's list of months (c\_Meses). Only on **Stamp by hand**. |
| SAT CFDI40134 | A monthly global invoice needs a month from 01 to 12. Only on **Stamp by hand**. |
| SAT CFDI40135 | A two-month global invoice needs a period from 13 to 18. Only on **Stamp by hand**. |

### Global invoice year

SAT field: `Año`.

| Check | Rule |
| - | - |
| SAT CFDI40136 | The year must be this year or one of the 5 before it. Only on **Stamp by hand**. |

## Debtor

The data of the debtor that the CFDI must carry.

### CFDI use

SAT field: `UsoCFDI`.

| Check | Rule |
| - | - |
| SAT CFDI40160 | It is not in the SAT's list of CFDI uses (c\_UsoCFDI). |
| SAT CFDI40161 | The SAT does not allow this CFDI use with the debtor's tax regime (c\_UsoCFDI). |

### Debtor RFC

SAT field: `Receptor Rfc`.

| Check | Rule |
| - | - |
| SAT CFDI40143 | The SAT has no active taxpayer with this RFC. |

### Debtor legal name

SAT field: `Receptor Nombre`.

| Check | Rule |
| - | - |
| SAT CFDI40130 | The SAT keeps the name PUBLICO EN GENERAL with the RFC XAXX010101000 for global invoices (InformacionGlobal), and this invoice is not one. |
| SAT CFDI40144 | The SAT has no active taxpayer with the debtor RFC, so it cannot check this name. |
| SAT CFDI40145 | It must be the name that the SAT has for the debtor RFC, as on the debtor's Constancia de Situación Fiscal. |

### Debtor postal code

SAT field: `DomicilioFiscalReceptor`.

| Check | Rule |
| - | - |
| SAT CFDI40147 | The SAT has no active taxpayer with the debtor RFC, so it cannot check this postal code. |
| SAT CFDI40148 | It must be the postal code of the tax address that the SAT has for the debtor RFC, as on the debtor's Constancia de Situación Fiscal. |

### Debtor tax regime

SAT field: `RegimenFiscalReceptor`.

| Check | Rule |
| - | - |
| SAT CFDI40157 | It is not in the SAT's list of tax regimes (c\_RegimenFiscal). |
| SAT CFDI40158 | The SAT does not allow this regime for the type of taxpayer (individual or company) that the debtor RFC belongs to. |

### Debtor country of tax residence

CargoWise field: `Country`. SAT field: `ResidenciaFiscal`.

| Check | Rule |
| - | - |
| SAT CFDI40150 | It is not in the SAT's list of countries (c\_Pais). |
| SAT CFDI40152 | A foreign debtor (RFC XEXX010101000) cannot have Mexico as its country of tax residence. |

## Lines

Each line of an invoice or a credit note.

### Tax code

CargoWise field: `TaxCode`.

| Check | Rule |
| - | - |
| `known_tax_code` | Transitive reads the SAT tax of a line from its CargoWise tax code, so the code must be one that Transitive knows. |
| `tax_code_rate` | The tax codes NOTREPORT and FREEIVA carry no tax, so their rate and VAT must be zero. |

### Quantity

SAT field: `Cantidad`.

| Check | Rule |
| - | - |
| `allowed_value` | The value is not one that the CFDI allows. |

### Product code

CargoWise field: `GovernmentReportingChargeCode`. SAT field: `ClaveProdServ`.

| Check | Rule |
| - | - |
| SAT CFDI40162 | It is not in the SAT's list of product codes (c\_ClaveProdServ). |
| SAT CFDI40163 | The SAT requires a complement for this product code (c\_ClaveProdServ), and Transitive does not issue that complement. |
| SAT CFDI40164 | The SAT requires this product code to carry a specific transferred or withheld tax (c\_ClaveProdServ), and the line carries none. |

### Unit price

SAT field: `ValorUnitario`.

| Check | Rule |
| - | - |
| SAT CFDI40166 | The SAT requires a unit price of more than zero. |

### Tax rate

SAT field: `TasaOCuota`.

| Check | Rule |
| - | - |
| `allowed_value` | The value is not one that the CFDI allows. |
| SAT CFDI40179 | It is not a VAT rate that the SAT allows (c\_TasaOCuota). |
| SAT CFDI40219 | It does not match a SAT rate for that tax and factor (c\_TasaOCuota). |
| SAT CRP20253 | It is not a withholding rate that the SAT allows (c\_TasaOCuota). Only on **Stamp by hand**. |
| SAT CRP20260 | It is not a VAT rate that the SAT allows (c\_TasaOCuota). Only on **Stamp by hand**. |

### Discount (lines)

CargoWise field: `OSDiscountAmount`. SAT field: `Descuento`.

| Check | Rule |
| - | - |
| SAT CFDI40169 | The discount of a line cannot be more than its amount (quantity times unit price). |

### VAT base

SAT field: `Traslado Base`.

| Check | Rule |
| - | - |
| SAT CFDI40174 | The SAT requires a taxed base of more than zero. |

### Withholding base

SAT field: `Retencion Base`.

| Check | Rule |
| - | - |
| SAT CFDI40181 | The SAT requires a withholding base of more than zero. |

### Withholding rate

SAT field: `Retencion TasaOCuota`.

| Check | Rule |
| - | - |
| SAT CFDI40185 | It is not a withholding rate that the SAT allows (c\_TasaOCuota). |

### Unit code

SAT field: `ClaveUnidad`.

| Check | Rule |
| - | - |
| SAT CFDI40165 | It is not in the SAT's list of unit codes (c\_ClaveUnidad). Only on **Stamp by hand**. |

### Tax object

SAT field: `ObjetoImp`.

| Check | Rule |
| - | - |
| SAT CFDI40170 | It is not in the SAT's list of tax objects (c\_ObjetoImp). Only on **Stamp by hand**. |
| SAT CFDI40171 | A line subject to tax (ObjetoImp 02) must carry taxes. Only on **Stamp by hand**. |
| SAT CFDI40172 | A line that is not subject to tax cannot carry taxes. Only on **Stamp by hand**. |
| SAT CFDI140226 | Tax object 06 or 08 forbids VAT and IEPS. Only on **Stamp by hand**. |
| SAT CFDI140227 | Tax object 07 forbids VAT and needs IEPS. Only on **Stamp by hand**. |
| SAT CRP20245 | It is not in the SAT's list of tax objects (c\_ObjetoImp). Only on **Stamp by hand**. |
| SAT CRP20247 | An invoice that is not subject to tax cannot carry taxes in the payment. Only on **Stamp by hand**. |
| SAT CRP20278 | Tax object 06 or 08 forbids VAT and IEPS. Only on **Stamp by hand**. |
| SAT CRP20279 | Tax object 07 forbids VAT and needs IEPS. Only on **Stamp by hand**. |

### Income tax (ISR) withholding

SAT field: `Retencion Impuesto`.

| Check | Rule |
| - | - |
| SAT CFDI140224 | The SAT does not allow an income tax (ISR) withholding for this issuer and debtor. Only on **Stamp by hand**. |

### Tax type

SAT field: `Impuesto`.

| Check | Rule |
| - | - |
| SAT CRP20250 | It is not in the SAT's list of taxes (c\_Impuesto). Only on **Stamp by hand**. |
| SAT CRP20256 | It is not in the SAT's list of taxes (c\_Impuesto). Only on **Stamp by hand**. |

### Tax factor

SAT field: `TipoFactor`.

| Check | Rule |
| - | - |
| SAT CRP20251 | It is not in the SAT's list of tax factors (c\_TipoFactor). Only on **Stamp by hand**. |
| SAT CRP20252 | A withholding cannot be exempt (Exento). Only on **Stamp by hand**. |
| SAT CRP20257 | It is not in the SAT's list of tax factors (c\_TipoFactor). Only on **Stamp by hand**. |
| SAT CRP20258 | An exempt tax cannot carry a rate or an amount. Only on **Stamp by hand**. |
| SAT CRP20259 | A tax at a rate (Tasa) needs its rate and its amount. Only on **Stamp by hand**. |

## Receipts and payments

A receipt, its payments and the invoices that it pays. The <Tooltip tip="Payment complement. A CFDI that records a payment on a PPD invoice.">REP</Tooltip> uses these data.

### Payment form (receipts and payments)

SAT field: `FormaDePagoP`.

| Check | Rule |
| - | - |
| SAT CRP20212 | The SAT does not allow payment form 99 (to be defined) on a payment. Only on **Stamp by hand**. |

### Payment currency

CargoWise field: `OSCurrency`. SAT field: `MonedaP`.

| Check | Rule |
| - | - |
| SAT CRP20213 | A payment must be in a real currency, not XXX. |

### Payment exchange rate

CargoWise field: `ExchangeRate`. SAT field: `TipoCambioP`.

| Check | Rule |
| - | - |
| SAT CRP20216 | It is outside the range that the SAT allows for the currency of the payment (c\_Moneda). |

### Payer bank RFC

SAT field: `RfcEmisorCtaOrd`.

| Check | Rule |
| - | - |
| SAT CRP20221 | The payer bank RFC cannot be given with this payment form. Only on **Stamp by hand**. |
| SAT CRP20222 | It is not in the SAT's list of RFCs. Only on **Stamp by hand**. |

### Payer account

SAT field: `CtaOrdenante`.

| Check | Rule |
| - | - |
| SAT CRP20224 | The payer account cannot be given with this payment form. Only on **Stamp by hand**. |
| SAT CRP20225 | It does not have the format that the payment form requires. Only on **Stamp by hand**. |

### Payee bank RFC

SAT field: `RfcEmisorCtaBen`.

| Check | Rule |
| - | - |
| SAT CRP20227 | The payee bank RFC cannot be given with this payment form. Only on **Stamp by hand**. |

### Payee account

SAT field: `CtaBeneficiario`.

| Check | Rule |
| - | - |
| SAT CRP20226 | It does not have the format that the payment form requires. Only on **Stamp by hand**. |
| SAT CRP20228 | The payee account cannot be given with this payment form. Only on **Stamp by hand**. |

### Payment chain type

SAT field: `TipoCadPago`.

| Check | Rule |
| - | - |
| SAT CRP20229 | The payment chain type cannot be given with this payment form. Only on **Stamp by hand**. |

### Payment certificate

SAT field: `CertPago`.

| Check | Rule |
| - | - |
| SAT CRP20231 | A payment certificate needs a payment chain type (TipoCadPago). Only on **Stamp by hand**. |

### Payment chain

SAT field: `CadPago`.

| Check | Rule |
| - | - |
| SAT CRP20233 | A payment chain needs a payment chain type (TipoCadPago). Only on **Stamp by hand**. |

### Payment seal

SAT field: `SelloPago`.

| Check | Rule |
| - | - |
| SAT CRP20235 | A payment seal needs a payment chain type (TipoCadPago). Only on **Stamp by hand**. |

### Invoice currency

SAT field: `MonedaDR`.

| Check | Rule |
| - | - |
| SAT CRP20236 | An invoice paid must be in a real currency, not XXX. Only on **Stamp by hand**. |

### Amount paid

CargoWise field: `OSTotal`. SAT field: `Monto`.

| Check | Rule |
| - | - |
| `payment_bounds` | The SAT allows a payment amount only between the limits that the invoice amounts set. |
| SAT CRP20217 | The amounts applied to the invoices cannot add up to more than the payment amount (Monto). Only on **Stamp by hand**. |
| SAT CRP20218 | The payment amount (Monto) must be more than zero. Only on **Stamp by hand**. |
| SAT CRP20276 | It is outside the range that the SAT computes from the amounts applied and their conversion rates. Only on **Stamp by hand**. |

### Receipt lines

| Check | Rule |
| - | - |
| `readable` | Transitive must read every line of the receipt. |

### Applied amount

CargoWise field: `OSPaidAmount`. SAT field: `ImpPagado`.

| Check | Rule |
| - | - |
| `positive_amount` | The amount must be more than zero. |
| SAT CRP20241 | The amount applied to the invoice must be more than zero. Only on **Stamp by hand**. |
| SAT CRP20275 | It is outside the SAT's rounding range for its conversion rate (EquivalenciaDR). Only on **Stamp by hand**. |

### Amount in the invoice currency

SAT field: `EquivalenciaDR`.

| Check | Rule |
| - | - |
| SAT CRP20238 | When the invoice and the payment are in the same currency, the conversion rate must be 1. Only on **Stamp by hand**. |
| SAT CRP20277 | When the invoice and the payment are in the same currency, the conversion rate must be 1.0000000000. Only on **Stamp by hand**. |

### Previous balance

SAT field: `ImpSaldoAnt`.

| Check | Rule |
| - | - |
| SAT CRP20239 | The previous balance of the invoice must be more than zero. Only on **Stamp by hand**. |

### Tax base

SAT field: `BaseDR`.

| Check | Rule |
| - | - |
| SAT CRP20249 | The withholding base must be more than zero. Only on **Stamp by hand**. |
| SAT CRP20255 | The VAT base must be more than zero. Only on **Stamp by hand**. |

### Contribution

| Check | Rule |
| - | - |
| `known_contribution` | Each payment must come from a contribution of the settlement. |

### Contribution amount

| Check | Rule |
| - | - |
| `contribution_as_credit` | A contribution that is not cash pays a receipt only when CargoWise applies it as a credit, a negative amount. |

## Related documents

The invoice that a credit note or a payment refers to.

### Relationship type

SAT field: `TipoRelacion`.

| Check | Rule |
| - | - |
| SAT CFDI40137 | It is not in the SAT's list of relationship types (c\_TipoRelacion). Only on **Stamp by hand**. |


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