B2G e-Invoicing process
actors:
- Supplier: a private or public administration company incorporaed in italy
- SDI (Sistema di Interscambio - Data Exchange system): back end service managd by a company named SOGEI on behalf of the Italian Ministry of Finance
- Buyer: a public administration company incorporated in italy
- Agid: italian competent authority for the e-invoicing specs
- e-invoicing intermediary: a third party private company offering web services to facilitate E-INVOICE management (preparation, digital signature, sending and receiving messages through the SDI)
e-invoicing process high level overview
sequenceDiagram
Supplier->>Supplier: prepares and signs E-INVOICE
Supplier->>SDI: sends signed E-INVOICE
SDI->>SDI: verifies E-INVOICE and create metadata
SDI->>Buyer: sends E-INVOICE and metadata
SDI->>SDI: prepare and signs RECEIPT OF FILE DELIVERY TO RECIPIENT
SDI-->>Supplier: sends RECEIPT OF FILE DELIVERY TO RECIPIENT
Buyer->>Buyer: E-INVOICE formal and busness internal cheks
Buyer->>SDI: senda CUSTOMER NOTIFICATION OF OUTCOME (acceptance or rejection)
SDI->>Supplier: senda CUSTOMER NOTIFICATION OF OUTCOME
type of messages and formats:
E-INVOICE and metadata
B2B E-INVOICEs are XML files complying to the "FatturaPA" format and always requires Qualified Electronic Signature.
The Signature may of two alternative types:
- (XAdES) XML Signature (the signature is included in the XML)
- (PAdES) P7M Signature (the signsture is external to the file and both the file and the signature are wrapped in a mime-type envelope)
notifications
notifications are xml files complying to the Data Exchange System Specigifations
Notifications types that are relevant for platform-d are:
- RECEIPT OF FILE DELIVERY TO RECIPIENT (see par. 1.2 of the specs): attests the succesfull delivery of the E-INVOICE to the buyer. It includes a digital signature by the SDI.
- CUSTOMER NOTIFICATION OF OUTCOME (see par. 1.5 specs): attests the formal acceptance or rejection of the E-INVOICE.
E-INVOICE examples
- E-INVOICE (signed by Supplier or Intermediary)
- RECEIPT OF FILE DELIVERY TO RECIPIENT (signed by SDI)
- CUSTOMER NOTIFICATION OF OUTCOME (optionally signed)
ToDos
- add the case where the outcome isn't receinved: in this case the time ut notification is mandatory (in order to avoid a negative result, hidden by the supplier plus forgery of buyer identity)
- add another type of notification as required (in case of lacking of the outcome)
- if either the outcome or the timeout notificaiton aren't presented by the supplier, the notarisation cannot proceed
- add checking via AISP account that the e.invoice hasn't been paied at time of notarisation and negotiation