Italian FatturaPA Document Type Codes

Italian FatturaPA Document Type Codes (type_document)

Overview

When sending invoices to the Italian SDI (Sistema di Interscambio) in FatturaPA format, you can specify the document type using the type_document field. This field corresponds to the TipoDocumento element in the FatturaPA XML structure.

Usage

The type_document field is optional when creating invoices. If not provided, B2Brouter will automatically assign an appropriate default value based on the invoice type (regular invoice, credit note, etc.).

Setting type_document via API

{
  "invoice": {
    "type_document": "TD01",
    "number": "1",
    "date": "2025-01-26",
    "contact_id": 12345,
    "invoice_lines_attributes": [...]
  }
}

Valid FatturaPA Document Type Codes

The following codes are valid for Italian FatturaPA invoices:

Invoice Types

CodeDescription (Italian)Description (English)
TD01FatturaStandard invoice
TD02Acconto/Anticipo su fatturaDown payment / Advance on invoice
TD03Acconto/Anticipo su parcellaDown payment / Advance on proforma invoice
TD04Nota di creditoCredit note
TD05Nota di debitoDebit note
TD06ParcellaProforma invoice
TD16Integrazione fattura reverse charge internoLocal reverse charge
TD17Integrazione o autofattura per acquisti di servizi da soggetto non residente ai sensi dell’articolo 17, comma 2, DPR 633/1972Self-billing for EU services
TD18Integrazione della fattura del fornitore UE per acquisto intracomunitario di beniEU acquisition reverse charge
TD19Integrazione o autofattura per acquisti di beni da soggetti non residenti ai sensi dell’articolo 17, comma 2, DPR 633/1972Not resident acquisition reverse charge
TD20Autofattura per regolarizzazione e integrazione delle fattureSelf-billing
TD21In caso di emissione di autofattura per regolarizzazione dello splafonamentoRegulated plafond self invoice
TD22In caso di estrazione beni da Deposito IVAVAT deposit
TD23In caso di estrazione beni da Deposito IVA con versamento dell’IVAVAT deposit with VAT payment
TD24Fattura differita – art 21, 4 comma, lett. a), del DPR 633/72, quindi fattura differita di beni e servizi collegata a DDT per i beni o da idonea documentazione di prova dell’effettuazione per le prestazioni di servizioDeferred invoice with DDT
TD25Fattura differita di cui all’art. 21, 4 comma, lett. b), del DPR 633/72, quindi fattura differita per operazioni triangolari interneDeferred invoice for internal triangular operations
TD26Per la cessione di beni ammortizzabili e per passaggi interniSales of assets
TD27In caso di fatture per auto consumo o per cessioni gratuite senza rivalsaFree of charge or self-consumption

Special Considerations

TD16-TD19 (Integration Documents)

These codes represent integration documents for reverse charge and similar mechanisms. When using these codes:

  • They affect the calculation of the executable amount
  • Special tax treatment applies
  • The invoice represents a self-billing or integration scenario

Default Behavior

If type_document is not specified:

  • TD01 is used for standard invoices
  • TD04 is used for credit notes (when is_credit_note: true)
  • Other types must be explicitly set when needed

Validation

Invalid codes will result in a validation error indicating the list of valid codes.

Example: Complete Invoice with type_document

{
  "send_after_import": true,
  "invoice": {
    "type": "IssuedInvoice",
    "type_document": "TD01",
    "number": "FAT-2025-001",
    "date": "2025-01-26",
    "due_date": "2025-02-26",
    "contact_id": 12345,
    "invoice_lines_attributes": [
      {
        "quantity": 1,
        "price": 100.00,
        "description": "Professional services",
        "taxes_attributes": [
          {
            "name": "IVA",
            "percent": 22
          }
        ]
      }
    ]
  }
}

Related Documentation