Skip to content
E-invoicing

Fix and resend an invoice rejected by SDI in SamBooks

Reading time

10 min read

Download PDF

An invoice came back with the status "Rejected by SDI"? Here is how to read the real reason, fix the document, and resend it without losing its invoice number.

What this is for

When sending an e-invoice fails, SamBooks does not leave you stuck: the invoice moves to the "Rejected by SDI" status, stays available with the exact reason for the problem, and you can fix it and retransmit it from the very page where you created it. A rejection can happen at two different moments, but the outcome for you is the same either way:

  • before the document is actually transmitted: SamBooks validates the FatturaPA file locally, for free, against the official schema and the Exchange System's own rules, and blocks the send if something is wrong;
  • after the send, when SDI itself rejects the file once it has received it.

In both cases you see the same result: the invoice was never really issued, it stays editable and deletable just like a draft, and the number that had been assigned to it is released back to the numbering series right away, so you are never left with a gap.

Before you start

  • You need a role with write permissions on invoices (Manager or Administrative): a Viewer can see the rejection and read the reason, but cannot fix or resend it; the Warehouse role has no write access to this area.
  • Before fixing anything, find the exact cause of the rejection: see step 2 below.

How to do it, step by step

1. Find the rejected invoice

Go to Invoices in the left-hand menu. In the list, the invoice carries the "Rejected by SDI" badge in the Status column. You can also reach it from the in-app notification or the email you received (subject "SamBooks — [invoice reference]: SDI issue"): both link straight to the invoice detail page.

2. Read the real reason for the rejection

Open the invoice detail. At the top you'll find a red banner, "Invoice rejected by SDI," with the full reason spelled out — not a generic "validation error," but the actual cause returned by the check. For the complete picture, open the "SDI Events" tab:

  • the "XML Draft" section shows a "Valid XML" or "Invalid XML" badge and lets you copy the file with the "Copy" button;
  • the "Events" section is a timeline that runs from "Sent to SDI" to "Rejected by SDI," with every error shown as a code plus a plain-language description — for example 00400 ("The Nature code is missing on a line with 0% VAT") or 00445 ("You're using a generic Nature code (N2, N3, N6) that has not been valid since 2021").

3. Work out where to intervene: the document or your company data

The reason tells you whether the problem sits in the invoice itself (a VAT rate, a Nature code, a customer detail) or in your own company data (VAT number, tax regime, registered office). That distinction matters, because it decides where you go to fix it.

4. Fix the document

If the problem is in the invoice, press "Edit" in the detail page's action bar: the same editor you used to create it opens, with every line and field already filled in. Fix the field the error pointed to and press "Save changes."

After saving, SamBooks recalculates from scratch whether the invoice is ready to be resent:

  • if it is now complete, it stays "Rejected by SDI" — the status does not change on purpose, so the rejection reason stays readable until you have successfully resent it;
  • if the fix still leaves something incomplete, it goes back to "Draft," and the "Mandatory data missing for e-invoicing" panel tells you what is still missing.

5. Or fix your company data instead

If the reason points to something in your own company's data (VAT number, tax regime, registered office), you don't need to touch the invoice at all: go to Company settings, fix the field, and come back to the detail page. That data is re-read every time the file is generated again, so fixing it once is enough.

6. Resend to SDI

With the invoice ready again, the "Send to SDI" button reappears exactly as it would on an invoice that was never sent. Clicking it opens "Confirm sending to SDI?": the system re-validates the file locally and shows "FatturaPA file is valid" before letting you confirm — if it isn't, the "Confirm and send" button stays disabled and the reason is shown again underneath. Press "Confirm and send": the send is asynchronous, so you'll see "Sending to SDI: please wait for the outcome" and the result arrives shortly after.

7. Or, alternatively: delete the invoice

If you would rather start over than fix it, press "Delete." Since the invoice still has no number, deleting it works exactly like deleting a draft. Confirm on "Delete this invoice?" and the document is permanently removed from the list.

What happens to the invoice number

In SamBooks, the number is assigned only at the moment the invoice is actually transmitted — not when you create the document. Until then, the invoice stays unnumbered on every page where you see it (the detail page title shows a dash instead of a number). When SDI rejects an invoice — whether the problem surfaces before the real transmission or arrives afterwards, from SDI itself — SamBooks releases that number immediately: it doesn't stay locked while you fix the problem, and your numbering series never ends up with a gap. The first time you fix and successfully resend the invoice, it gets the first available number at that moment — not necessarily the same one it had on the first attempt — but the sequence of issued numbers still runs without gaps.

If the invoice had already generated a ledger entry (this can happen because the accounting posting starts together with the send, not after SDI confirms), the rejection cancels it automatically: you don't need to step in to clean up the books.

Don't confuse this with a rejection by the recipient

There is a different case that looks similar but means the opposite: the invoice was accepted and correctly delivered by SDI, but the recipient rejects it after delivery — this mostly happens with Public Administration bodies, which can refuse an e-invoice they have received. The way to tell the two apart is to look at the number at the top of the detail page: if the invoice already shows a real number (for example "Invoice 45/2026") instead of a dash, the document has actually been issued. In that case it is neither editable nor deletable: it's a real fiscal document, and it can only be corrected with a credit note (TD04), like any other delivered invoice — never by editing and resending it the way this guide describes.

Characters not allowed by SDI

The FatturaPA file only accepts a limited character set (the Latin alphabet with Italian accents, not the full range of Unicode). SamBooks automatically fixes the most common typographic characters you might type without noticing: an em dash "—" becomes a plain hyphen "-", curly quotes become straight ones, an ellipsis "…" becomes "...", and the "€" symbol becomes "EUR" inside text fields. That's why a long dash or a "smart quote" from your text editor won't get your invoice rejected: they're already converted before the file is generated. Only characters truly foreign to Latin text (ideograms or emoji, for example) are left for you to fix by hand, and in practice these rarely show up in a line description.

Ask Sam

You can hand the same fix over to Sam: tell it in chat what to correct — for example, "on the rejected invoice for [customer], change the VAT rate on line 1 to 22%" — and Sam updates the document with the same result as "Edit." It can also delete it, if you explicitly ask. Resending to SDI, however, always remains a step that requires your explicit confirmation: even if you ask Sam to resend it, the system stops and shows you the same "Confirm sending to SDI?" dialog before proceeding — no invoice ever goes out without you pressing the confirm button yourself.

If something goes wrong

  • "Sending to SDI is already in progress for this invoice": you pressed "Send to SDI" twice in quick succession. SamBooks blocks the second attempt for 15 minutes after the first send, so you don't pay for the transmission twice or send a duplicate: wait for the outcome before trying again.
  • The invoice goes back to "Draft" instead of staying "Rejected by SDI": your fix left some mandatory data incomplete. The panel above the send button lists what's still missing, on the invoice or in your company data.
  • The resend dialog still shows "Invalid file": the reported problem wasn't fully solved, or a new one has appeared. The "Confirm and send" button stays disabled until the file is valid: fix it again and reopen the dialog.
  • The send stays "in progress" for more than a few seconds: after about 30 seconds a "Sending is taking longer than expected…" notice appears with a "Check now" button; if it goes past 15 minutes without resolving, you'll see "Sending to SDI not confirmed" — check the "SDI Events" tab before trying again, to avoid a duplicate send.
  • You fixed it but can no longer find the original error: once resent successfully, the invoice changes status and the red banner disappears; the rejection reason stays available in the "SDI Events" tab history.

Frequently asked questions

My invoice came back from SDI: what do I do? Open the detail page, read the reason in the red banner or in the "SDI Events" tab, fix whatever field it points to (on the invoice or in your company data), and press "Send to SDI" again.

Where do I read the exact reason for the rejection? In the red banner at the top of the detail page and, with more technical detail, in the "SDI Events" tab: every error has a code (e.g. 00400) and a plain-language description.

What do error 00400 or 00445 mean? Both relate to the VAT Nature code: 00400 means the Nature code is missing on a line with a 0% VAT rate; 00445 means you're using a generic code (N2, N3, N6) that hasn't been allowed since 2021, and you need the specific sub-code instead.

Can I fix a rejected invoice? Yes: as long as it's in the "Rejected by SDI" status and has no number assigned, it's editable just like a draft, using the same editor.

Do I have to recreate the invoice from scratch after a rejection? No, unless you'd rather: you can fix the existing document and resend it, or delete it and create a new one.

Does a rejection make me lose the invoice number? The number it had is released right away, but once you resend it successfully it gets a new one (the first one available at that moment): the sequence of issued numbers stays gap-free.

How do I resend the invoice after fixing it? Press "Send to SDI" again: the same confirmation dialog opens, with the same file validation, exactly as on the first send.

I got an email saying "SDI issue" — what does it mean? It's the automatic notification SamBooks sends on every rejection: it opens straight to the detail page of the invoice you need to fix.

Is the rejected invoice already recorded in the books? If it had already generated a ledger entry, the rejection cancels it automatically: you don't need to do anything to clean it up.

Can I issue a credit note against a rejected invoice? No: an invoice rejected by SDI was never actually issued, so there's nothing to credit against. A credit note only applies to an invoice that was genuinely delivered (that's the recipient-rejection case, not this one).

Does an em dash in the text get my invoice rejected? No: SamBooks automatically converts it to a plain hyphen before generating the file, along with other common typographic characters (curly quotes, ellipses, the euro symbol in text).

Ready to try SamBooks?

7-day free trial, no credit card required.

Start for free