Skip to main content

Introduction

Electronic invoicing is mandatory for all businesses in Italy. The Sistema di Interscambio (SDI) serves as the Italian governmentโ€™s central hub for transmitting, validating, and delivering all electronic invoices throughout the country. The SDI system operates using a standardized XML format called FatturaPA, which ensures all invoices contain the required information and comply with the strict validation rules established by the Italian tax authority (Agenzia delle Entrate). To ensure proper routing of invoices to the correct recipient, the SDI system uses a unique identifier called a Recipient Code, which is assigned to each registered SDI provider. Invopop simplifies SDI integration by allowing you to work with GOBL format instead of XML, providing synchronous validation before submission, and offering a simple API integration with automatic handling of SDI notifications and status updates. For receiving invoices through SDI, see our companion guide: Italy - SDI: Receiving Invoices.

Setup

1

Connect the SDI Italy app

  1. Navigate to Configuration โ†’ Apps
  2. Locate SDI Italy in the app discovery list
  3. Tap Connect to activate
Connect SDI Italy app
The initial connection requires no configuration for sending invoices.
2

Configure sending workflow

SDI does not have a sandbox environment. When sandbox mode is selected, Invopopโ€™s third-party submission service, A-Cube, simulates a response from SDI.
  • Template
  • Code
  • Build from scratch

SDI send invoice workflow

Signs and converts the GOBL document into the FatturaPA XML format and then sends it to SDI.

Sending Invoices

Invopop uses the GOBL FatturaPA library to process conversions. When creating invoices for SDI, you need to:
  1. Set the regime field to IT in your GOBL invoice
  2. Add the it-sdi-v1 addon to enable Italian-specific validations and extensions
Detailed information about the SDI-specific extensions and validations can be found in: Example invoices are provided below, or you can use the GOBL Builder to create custom invoices.

How the Send step works

This step generates the FatturaPA XML and sends it to SDI through our integration partner. Upon successful completion, the XML file is attached to the invoice entry. The SDI service usually responds within seconds but may take up to 24 hours. While waiting, this step remains in a Queued state. When the Send step completes, it returns one of three results:
  • OK if successful
  • KO for unrecoverable errors
  • SKIP if the invoice was already sent

Example Invoices

SDI B2C Invoice
{
  "$schema": "https://gobl.org/draft-0/envelope",
  "head": {
    "uuid": "8a51fd30-2a27-11ee-be56-0242ac120002",
    "dig": {
      "alg": "sha256",
      "val": "0444abdd6581a1523df9db5d2ab9c4acc4032a839524adfaf044fa5427061d86"
    }
  },
  "doc": {
    "$schema": "https://gobl.org/draft-0/bill/invoice",
    "$regime": "IT",
    "$addons": [
      "it-sdi-v1"
    ],
    "uuid": "0190a63a-1a80-7e1e-a868-08c7859b6470",
    "type": "standard",
    "series": "FT",
    "code": "020",
    "issue_date": "2024-07-12",
    "currency": "EUR",
    "tax": {
      "prices_include": "VAT",
      "ext": {
        "it-sdi-document-type": "TD01",
        "it-sdi-format": "FPR12"
      }
    },
    "supplier": {
      "name": "Company Name S.r.l.",
      "tax_id": {
        "country": "IT",
        "code": "12345678903"
      },
      "addresses": [
        {
          "num": "102",
          "street": "Via California",
          "locality": "Palermo",
          "region": "PA",
          "code": "33213",
          "country": "IT"
        }
      ],
      "registration": {
        "capital": "50000.00",
        "currency": "EUR",
        "office": "RM",
        "entry": "123456"
      },
      "ext": {
        "it-sdi-fiscal-regime": "RF01"
      }
    },
    "customer": {
      "name": "Monica Bellucci",
      "tax_id": {
        "country": "IT"
      },
      "identities": [
        {
          "key": "it-fiscal-code",
          "code": "RSSGNN60R30H501U"
        }
      ],
      "addresses": [
        {
          "num": "23",
          "street": "Via dei Mille",
          "locality": "Firenze",
          "region": "FI",
          "code": "00100",
          "country": "IT"
        }
      ]
    },
    "lines": [
      {
        "i": 1,
        "quantity": "1",
        "item": {
          "name": "Cleaning services",
          "price": "125.00"
        },
        "sum": "125.00",
        "taxes": [
          {
            "cat": "VAT",
            "rate": "standard",
            "percent": "22.0%"
          }
        ],
        "total": "125.00"
      }
    ],
    "totals": {
      "sum": "125.00",
      "tax_included": "22.54",
      "total": "102.46",
      "taxes": {
        "categories": [
          {
            "code": "VAT",
            "rates": [
              {
                "key": "standard",
                "base": "102.46",
                "percent": "22.0%",
                "amount": "22.54"
              }
            ],
            "amount": "22.54"
          }
        ],
        "sum": "22.54"
      },
      "tax": "22.54",
      "total_with_tax": "125.00",
      "payable": "125.00"
    }
  }
}
SDI B2B Invoice
{
    "$schema": "https://gobl.org/draft-0/envelope",
    "head": {
        "uuid": "8a51fd30-2a27-11ee-be56-0242ac120002",
        "dig": {
            "alg": "sha256",
            "val": "2b18783af475c77b4cdb71836d64b31d3044588601a164c019b3c71f17add07b"
        }
    },
    "doc": {
        "$schema": "https://gobl.org/draft-0/bill/invoice",
        "$regime": "IT",
        "$addons": [
            "it-sdi-v1"
        ],
        "uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
        "type": "standard",
        "series": "SAMPLE",
        "code": "002",
        "issue_date": "2023-05-21",
        "currency": "EUR",
        "tax": {
            "prices_include": "VAT",
            "ext": {
                "it-sdi-document-type": "TD01",
                "it-sdi-format": "FPR12"
            }
        },
        "supplier": {
            "name": "Hotel California",
            "tax_id": {
                "country": "IT",
                "code": "12345678903"
            },
            "addresses": [
                {
                    "num": "102",
                    "street": "Via California",
                    "locality": "Palermo",
                    "region": "PA",
                    "code": "33213",
                    "country": "IT"
                }
            ],
            "registration": {
                "capital": "50000.00",
                "currency": "EUR",
                "office": "RM",
                "entry": "123456"
            },
            "ext": {
                "it-sdi-fiscal-regime": "RF01"
            }
        },
        "customer": {
            "name": "Mela S.r.l.",
            "tax_id": {
                "country": "IT",
                "code": "13029381004"
            },
            "inboxes": [
                {
                    "key": "it-sdi-code",
                    "code": "M5UXCR5"
                }
            ],
            "addresses": [
                {
                    "num": "23",
                    "street": "Via dei Mille",
                    "locality": "Firenze",
                    "region": "FI",
                    "code": "00100",
                    "country": "IT"
                }
            ]
        },
        "lines": [
            {
                "i": 1,
                "quantity": "1",
                "item": {
                    "name": "Tassa di Soggiorno",
                    "price": "1.00"
                },
                "sum": "1.00",
                "taxes": [
                    {
                        "cat": "VAT",
                        "rate": "exempt",
                        "ext": {
                            "it-sdi-exempt": "N4"
                        }
                    }
                ],
                "total": "1.00"
            },
            {
                "i": 2,
                "quantity": "1",
                "item": {
                    "name": "Camera Matrimoniale",
                    "price": "125.00"
                },
                "sum": "125.00",
                "taxes": [
                    {
                        "cat": "VAT",
                        "rate": "intermediate",
                        "percent": "10.0%"
                    }
                ],
                "total": "125.00"
            }
        ],
        "totals": {
            "sum": "126.00",
            "tax_included": "11.36",
            "total": "114.64",
            "taxes": {
                "categories": [
                    {
                        "code": "VAT",
                        "rates": [
                            {
                                "key": "exempt",
                                "ext": {
                                    "it-sdi-exempt": "N4"
                                },
                                "base": "1.00",
                                "amount": "0.00"
                            },
                            {
                                "key": "intermediate",
                                "base": "113.64",
                                "percent": "10.0%",
                                "amount": "11.36"
                            }
                        ],
                        "amount": "11.36"
                    }
                ],
                "sum": "11.36"
            },
            "tax": "11.36",
            "total_with_tax": "126.00",
            "payable": "126.00"
        }
    }
}
SDI B2B Invoice with additional fields
{
  "$schema": "https://gobl.org/draft-0/bill/invoice",
  "$regime": "IT",
  "$addons": [
    "it-sdi-v1"
  ],
  "$tags": [
    "freelance"
  ],
  "uuid": "0190c0ec-8109-756b-a4f0-88c4b542ab6e",
  "type": "standard",
  "series": "SAMPLE",
  "code": "001",
  "issue_date": "2023-03-02",
  "currency": "EUR",
  "tax": {
    "ext": {
      "it-sdi-document-type": "TD06",
      "it-sdi-format": "FPR12"
    }
  },
  "supplier": {
    "name": "MยชF. Services",
    "tax_id": {
      "country": "IT",
      "code": "12345678903"
    },
    "people": [
      {
        "name": {
          "given": "GIANCARLO",
          "surname": "ROSSI"
        }
      }
    ],
    "addresses": [
      {
        "num": "1",
        "street": "VIALE DELLA LIBERTร€",
        "locality": "ROMA",
        "region": "RM",
        "code": "00100",
        "country": "IT"
      }
    ],
    "emails": [
      {
        "addr": "[email protected]"
      }
    ],
    "telephones": [
      {
        "num": "999999999"
      }
    ],
    "registration": {
      "capital": "50000.00",
      "currency": "EUR",
      "office": "RM",
      "entry": "123456"
    },
    "ext": {
      "it-sdi-fiscal-regime": "RF02"
    }
  },
  "customer": {
    "name": "MARIO LEONI",
    "tax_id": {
      "country": "IT",
      "code": "09876543217"
    },
    "people": [
      {
        "name": {
          "prefix": "Dott.",
          "given": "MARIO",
          "surname": "LEONI"
        }
      }
    ],
    "inboxes": [
      {
        "key": "it-sdi-code",
        "code": "ABCDEF1"
      }
    ],
    "addresses": [
      {
        "num": "32",
        "street": "VIALE DELI LAVORATORI",
        "locality": "FIRENZE",
        "region": "FI",
        "code": "50100",
        "country": "IT"
      }
    ],
    "emails": [
      {
        "addr": "[email protected]"
      }
    ]
  },
  "lines": [
    {
      "i": 1,
      "quantity": "20",
      "item": {
        "name": "Development services",
        "price": "90.00",
        "unit": "h"
      },
      "sum": "1800.00",
      "discounts": [
        {
          "reason": "Special discount",
          "percent": "10%",
          "amount": "180.00"
        }
      ],
      "taxes": [
        {
          "cat": "VAT",
          "rate": "standard",
          "percent": "22.0%"
        }
      ],
      "total": "1620.00"
    },
    {
      "i": 2,
      "quantity": "1",
      "item": {
        "name": "Special Untaxed Work",
        "price": "100.00",
        "unit": "h"
      },
      "sum": "100.00",
      "taxes": [
        {
          "cat": "VAT",
          "rate": "exempt",
          "ext": {
            "it-sdi-exempt": "N2.2",
            "it-sdi-vat-liability": "S"
          }
        }
      ],
      "total": "100.00"
    }
  ],
  "discounts": [
    {
      "i": 1,
      "reason": "10th year anniversary discount",
      "base": "1720.00",
      "percent": "50%",
      "amount": "860.00"
    }
  ],
  "charges": [
    {
      "i": 1,
      "reason": "10th year anniversary charge",
      "base": "1720.00",
      "percent": "10%",
      "amount": "172.00"
    }
  ],
  "payment": {
    "instructions": {
      "key": "card",
      "ext": {
        "it-sdi-payment-means": "MP08"
      }
    }
  },
  "totals": {
    "sum": "1720.00",
    "discount": "860.00",
    "charge": "172.00",
    "total": "1032.00",
    "taxes": {
      "categories": [
        {
          "code": "VAT",
          "rates": [
            {
              "key": "standard",
              "base": "1620.00",
              "percent": "22.0%",
              "amount": "356.40"
            },
            {
              "key": "exempt",
              "ext": {
                "it-sdi-exempt": "N2.2",
                "it-sdi-vat-liability": "S"
              },
              "base": "100.00",
              "amount": "0.00"
            }
          ],
          "amount": "356.40"
        }
      ],
      "sum": "356.40"
    },
    "tax": "356.40",
    "total_with_tax": "1388.40",
    "payable": "1388.40"
  }
}
SDI Credit Note
{
    "$schema": "https://gobl.org/draft-0/bill/invoice",
    "$regime": "IT",
    "$addons": [
        "it-sdi-v1"
    ],
    "$tags": [
        "freelance"
    ],
    "uuid": "019270f3-513e-71e2-b2e3-47f8321a09ac",
    "type": "credit-note",
    "series": "CN",
    "code": "001",
    "issue_date": "2024-10-09",
    "currency": "EUR",
    "preceding": [
        {
            "uuid": "0190c0ec-8109-756b-a4f0-88c4b542ab6e",
            "type": "standard",
            "issue_date": "2023-03-02",
            "series": "SAMPLE",
            "code": "001"
        }
    ],
    "tax": {
        "ext": {
            "it-sdi-document-type": "TD04",
            "it-sdi-format": "FPR12"
        }
    },
    "supplier": {
        "name": "MยชF. Services",
        "tax_id": {
            "country": "IT",
            "code": "12345678903"
        },
        "people": [
            {
                "name": {
                    "given": "GIANCARLO",
                    "surname": "ROSSI"
                }
            }
        ],
        "addresses": [
            {
                "num": "1",
                "street": "VIALE DELLA LIBERTร€",
                "locality": "ROMA",
                "region": "RM",
                "code": "00100",
                "country": "IT"
            }
        ],
        "registration": {
            "capital": "50000.00",
            "currency": "EUR",
            "office": "RM",
            "entry": "123456"
        },
        "ext": {
            "it-sdi-fiscal-regime": "RF02"
        }
    },
    "customer": {
        "name": "MARIO LEONI",
        "tax_id": {
            "country": "IT",
            "code": "09876543217"
        },
        "people": [
            {
                "name": {
                    "prefix": "Dott.",
                    "given": "MARIO",
                    "surname": "LEONI"
                }
            }
        ],
        "addresses": [
            {
                "num": "32",
                "street": "VIALE DELI LAVORATORI",
                "locality": "FIRENZE",
                "region": "FI",
                "code": "50100",
                "country": "IT"
            }
        ]
    },
    "lines": [
        {
            "i": 1,
            "quantity": "20",
            "item": {
                "name": "Development services",
                "price": "90.00",
                "unit": "h"
            },
            "sum": "1800.00",
            "taxes": [
                {
                    "cat": "VAT",
                    "rate": "standard",
                    "percent": "22.0%"
                }
            ],
            "total": "1800.00"
        }
    ],
    "totals": {
        "sum": "1800.00",
        "total": "1800.00",
        "taxes": {
            "categories": [
                {
                    "code": "VAT",
                    "rates": [
                        {
                            "key": "standard",
                            "base": "1800.00",
                            "percent": "22.0%",
                            "amount": "396.00"
                        }
                    ],
                    "amount": "396.00"
                }
            ],
            "sum": "396.00"
        },
        "tax": "396.00",
        "total_with_tax": "2196.00",
        "payable": "2196.00"
    }
}

Technical Details

When the SDI step processes a document, it returns detailed status codes that provide information about the response from SDI:
CodeDescription
rejectedNotifica di scarto (NS)
SDI has rejected the invoice because it contains errors.
deliveredRicevuta consegna (RC)
SDI has successfully delivered a B2B invoice to the recipient.
delivered-paRicevuta consegna (RC)
SDI has successfully delivered an invoice to a Public Administration (PA).
not-deliveredMancata consegna (MC)
SDI could not deliver the invoice to the recipient.
not-deliveredAttestazione trasmissione con impossibilitร  di recapito (AT)
SDI couldnโ€™t deliver an invoice to PA after 10 days.
accepted-paNotifica esito (NE)
A PA has decided to accept an invoice (outcome EC01).
rejected-paNotifica esito (NE)
A PA has decided to reject an invoice (outcome EC02).
deadline-termsNotifica decorrenza termini (DT)
A PA didnโ€™t reply with acceptance or rejection within 15 days.
invoice-errorAn error occurred during the acquisition of a notification.
sentThe invoice has been submitted to SDI and is awaiting a response.
not-receivedThe invoice was not received by the recipient.
Some SDI notifications (File metadati - MT, Esito committente - EC, Scarto esito committente - SE) donโ€™t directly change the code of the invoice.These codes map to different step results as follows:
  • OK Result: delivered, not-delivered, not-received, accepted-pa
  • KO Result: rejected, rejected-pa, invoice-error, deadline-terms
  • QUEUED Result: sent, delivered-pa
When a step returns QUEUED, the workflow will check again later for updates from SDI.

Italy FAQ

Find answers to frequently asked questions about invoicing in Italy โ†’

Participate in our community

Ask and answer questions about invoicing in Italy โ†’