FatturaPA (Italy / SdI)

00305

CodiceFiscale del CessionarioCommittente non valido

What it means

The buyer's Italian tax code (CessionarioCommittente/DatiAnagrafici/CodiceFiscale) is not a valid codice fiscale: it must be 16 alphanumeric characters (natural person) or 11 digits (entity).

How to fix it

Use the 16-character codice fiscale for individuals (e.g. RSSMRA80A01H501U) or the 11-digit code for organisations. Remove spaces and check the character/checksum pattern.

Example

<CodiceFiscale>RSSMRA80A01H501U</CodiceFiscale>

Catch this before it reaches the SdI:

# CLI
npx @eleata/validate-einvoice validate invoice.xml --format fatturapa

# GitHub Action — fail the build on any invalid invoice
- uses: hernaninverso/validate-einvoice-action@v1
  with:
    files: invoices/**/*.xml
    api-key: ${{ secrets.EINVOICE_API_KEY }}

Other FatturaPA (Italy / SdI) error codes

All error codes →