If you issue invoices and still send them via certified email or, worse, print them, you're piling up a backlog of risk and inefficiency that will eventually explode. We see it every day with clients who come to us: invoices rejected by the SDI, missed deadlines, mismatched data. The problem isn't the invoice itself, but how you manage it. And the solution isn't expensive software, but an integrated process that goes from your accounting to the Exchange System without friction.
We at Meteora Web come from accounting before code. We've managed budgets, double-entry bookkeeping, VAT settlements. When we talk about electronic invoicing, we're not talking about XML and transmissions: we're talking about margin, recovered time, avoided fines. This guide explains how to integrate the SDI into your workflow, without losing your mind and without relying on solutions that hold your data hostage.
How does the Exchange System work and why can't you ignore it?
The SDI (Sistema di Interscambio) is the hub for all electronic invoices in Italy. Every invoice, before reaching the client, passes through it. The system checks that the XML is formally correct, that the VAT number exists, that recipient codes are valid. If everything checks out, it forwards the invoice to the recipient. If something is wrong, it rejects it and notifies you of the error.
The key point is this: the SDI does not validate commercial content, only form. An invoice with a pricing error goes through, but if the recipient code is wrong, it's rejected. This means the quality of input data is everything. And here many fall.
Sponsored Protocol
The obligation of electronic invoicing is no longer new, but practical management is still a minefield. If you don't have a clear process, every month becomes a race against time: you receive the rejection, correct, resend, hope the client isn't angry. That's not how you work.
The basic flow of an electronic invoice
The journey of an electronic invoice is simple, but every step has pitfalls:
- Creation of the XML file according to the FatturaPA standard.
- Transmission to the SDI via authorized channel (PEC, API, platform).
- Formal check by the SDI.
- Forwarding to the recipient (via PEC or recipient code).
- Receipt of outcome (rejection, delivery, term start).
Step 5 is the one most people ignore. The rejection receipt must be read and managed. If you ignore it, the invoice doesn't exist for tax purposes. And fines start from there.
Which tools should you choose to integrate the SDI into your workflow?
The choice of tool depends on your invoice volume and budget. There is no universal solution, but there are universal criteria: integration with your management system, cost per invoice, data ownership.
If you issue fewer than 50 invoices per month, a web platform like Aruba or Poste Italiane may suffice. But beware: these solutions lock you into their ecosystem. The data is theirs, the APIs are limited, and if you want to change later, you have to export everything manually. We prefer solutions that give you control, like direct API integration with your management system or open-source software.
Sponsored Protocol
SDI APIs: total control
The SDI provides public APIs for sending and receiving invoices. With these APIs, you can build a custom flow: send the XML, receive receipts, handle rejections automatically. We do this with Laravel for clients with significant volumes.
Here's an example of sending an invoice via API with PHP using cURL:
$ch = curl_init('https://api.fatturapa.it/v1/fatture');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_TOKEN',
'Content-Type: application/xml'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents('invoice.xml'));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 201) {
// Invoice accepted, save the return ID
echo 'Invoice sent successfully';
} else {
// Handle the error
error_log('Invoice sending error: ' . $response);
}This is a minimal example. In production, you need to handle retries, sending queues, and notifications. But the concept is clear: you have control, you don't depend on an interface that slows you down.
How to handle rejections and receipts without wasting time?
Rejection is when the invoice comes back to you. The most common causes? Incorrect recipient code, malformed XML, non-existent VAT number. Managing rejections is not optional: it's the heart of the process.
Sponsored Protocol
We automated rejection handling for a client issuing 200 invoices per month. Before, each rejection meant a call to the client, a manual check, a resend. Now, the system reads the receipt, identifies the error, and if it's a formal error (e.g., wrong recipient code), corrects it automatically and resends. Time saved: about 10 hours per month.
Checklist for rejection management
- Check the recipient code before sending (verify on the Revenue Agency website).
- Validate the XML with an XSD schema before transmitting.
- Set up an automatic alert for every rejection receipt.
- Define a correction process: who, how, by when.
If you don't have a system that alerts you in real-time, you're already late. Rejection has a deadline for correction: 5 days from receipt of notification. Beyond that, the invoice is considered not issued.
Which common mistakes to avoid in SDI transmission?
We've seen every kind of error. The most frequent is the wrong recipient code. It seems trivial, but with clients changing reception channels (from PEC to recipient code) without notifying you, the risk is high. The second error is malformed XML: an unescaped special character, an unclosed tag, and the SDI rejects your invoice.
Another mistake is not managing term start receipts. When you send an invoice, you have a deadline to receive the delivery receipt. If it doesn't arrive, you must investigate. You can't wait for the problem to solve itself.
Sponsored Protocol
Finally, legal storage. The law requires electronic invoices to be stored for 10 years in a compliant manner. If you don't have a storage service, you're exposed to penalties. Platforms like Aruba or Poste offer this service, but if you use APIs, you need to organize it yourself.
How to avoid the recipient code error
Before issuing an invoice, always verify the client's recipient code. If you don't have it, ask for it. If the client is a public administration, the code is for the specific office, not the general one. An error here means certain rejection.
We recommend saving the recipient code in your client's profile in your management system and validating it at every issuance. An automatic check avoids 90% of rejections.
How to integrate electronic invoicing with your management system?
Integration with your management system is the real leap forward. If you issue invoices from an Excel sheet and then upload them manually to a portal, you're wasting time and risking errors. The solution is a direct link between your management system (or CRM) and the SDI.
We built a module for a client using an open-source management system. Every invoice issued in the system is converted to XML, sent to the SDI, and the status is updated automatically. The accountant sees everything from one screen: issued, sent, delivered, rejected. Zero duplicates, zero typing errors.
Sponsored Protocol
Practical steps for integration
- Identify invoicing data in your management system (client, amounts, VAT).
- Map fields to the FatturaPA standard.
- Generate the XML with a library or dedicated service.
- Send it to the SDI via API or PEC.
- Receive and process receipts.
If your management system already has an electronic invoicing module, use it. But verify it's updated to the latest specifications (e.g., version 1.2.1). Specifications change, and software stuck on an old version produces invalid XML.
Electronic invoicing and SDI: what to do now
Electronic invoicing is not an option, it's the norm. But managing it well is a choice. Here's what you can do right now:
- Check that your invoicing software is updated to the latest FatturaPA specifications.
- Ensure every client has the correct recipient code in your records.
- Set up an alert for rejection receipts, via email or on your management system.
- If you issue more than 50 invoices per month, consider API integration with the SDI.
- Make sure you have a compliant legal storage service.
If you don't know where to start, ask us. We at Meteora Web have already helped clients across Italy digitize invoicing, starting from their accounting, not the code. The result? Fewer errors, less wasted time, more margin. And if you want to explore how digitalization can improve your processes, check out our guide on digital transformation for SMEs.