FatturaPA (Italy / SdI)

00427

TipoRitenuta mancante con blocco DatiRitenuta presente

What it means

When a DatiRitenuta block is present, TipoRitenuta is mandatory (RT01 ritenuta persone fisiche, RT02 persone giuridiche, RT03 INPS, RT04 ENASARCO, RT05 ENPAM, RT06 altro).

How to fix it

Add the TipoRitenuta element with the correct code, plus ImportoRitenuta, AliquotaRitenuta and CausalePagamento.

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 →