Guide · Italian rules
Recipient code and PEC: how the e-invoice reaches your customer
On an Italian electronic invoice, the recipient code (codice destinatario) tells the SDI (Sistema di Interscambio), the Italian e-invoicing exchange system, where to deliver it. Here is what to enter for a business, a private individual, a foreign customer and a public body, and what happens when the code is missing.
by Antonio Tanzillo, ATSoft · updated on
Businesses and professionals: the 7-character code
Anyone who receives electronic invoices through software or an intermediary has a 7-character recipient code: it is the code your customer gives you and that you enter on the invoice. Instead of the code, the customer can give you their PEC address (posta elettronica certificata, Italian certified email): in that case the recipient code is 0000000 and the PEC address goes in its own field.
The customer has given you neither a code nor a PEC address
You enter 0000000. The invoice still goes through the SDI and is made available to the customer in their reserved area on the Italian Revenue Agency (Agenzia delle Entrate) website (the "cassetto fiscale"). In your software you will see it as not delivered: this is normal, the invoice has been issued and must not be sent again.
Private individuals (final consumers)
For private individuals, too, the recipient code is 0000000, together with the customer's tax code (codice fiscale). A private individual must also be given a copy of the invoice, on paper or as a PDF, unless they decline it; they will find the original in their reserved area.
Foreign customers
For a non-resident customer the recipient code is XXXXXXX (seven Xs). No PEC address is entered.
Public bodies
For the Public Administration the code is the office's unique code, 6 characters long (codice univoco ufficio), which the body gives you. You often also need the order or contract number and the CIG and CUP codes (tender and project identifiers).
If the customer has registered their address
Anyone with a VAT number (partita IVA) can register their preferred electronic address, a code or a PEC address, on the Revenue Agency's "Fatture e Corrispettivi" portal. In that case the SDI delivers the invoice there, even if you entered a different code on the invoice.
How KeyStore in Cloud handles it
In KeyStore in Cloud the recipient code and PEC address are entered once in the customer record. If the code is empty, the invoice goes out with 0000000 and with the PEC address, if there is one; if the customer is foreign, the software uses XXXXXXX automatically. Before sending, it checks the VAT number or tax code, address and postcode (CAP), so the invoice isn't rejected because of missing data.
The e-invoicing software → · What to do if an invoice is rejected →
In short
What recipient code do I use if the customer doesn't give me one?
0000000. If you have their PEC address, enter it in its own field; otherwise the invoice goes to their reserved area on the Italian Revenue Agency website.
What recipient code is used for private individuals?
0000000, together with the customer's tax code. The private individual must also be given a copy of the invoice, unless they decline it.
What recipient code is used for a foreign customer?
XXXXXXX, seven Xs.
How many characters does a public body's code have?
Six: it is the office's unique code, given to you by the body.
Sources
Official sources, in Italian.
- Agenzia delle Entrate, come si predispone una fattura elettronica (how to prepare an electronic invoice)
- Agenzia delle Entrate, fatture elettroniche verso consumatori finali (electronic invoices to final consumers)
- Agenzia delle Entrate, guida "La fattura elettronica e i servizi gratuiti dell'Agenzia" (dicembre 2025) (Revenue Agency guide to e-invoicing and its free services, December 2025)
Guide updated on 29 November 2026. It summarises the general Italian rules: for your specific case, ask your accountant.
Want hassle-free electronic invoices?
In KeyStore in Cloud the code and PEC address are stored in the customer record and the data are checked before sending. From €8 a month.
Explore e-invoicing