Swedish organisation number fails the check digit
What it means
The last digit of a Swedish organisation number is a Luhn checksum over the preceding nine. Failing it means at least one digit is wrong — very often a typo, or a placeholder such as 1234567890 left in from testing.
Can it be fixed automatically?
This needs a decision only the issuer can make. Guessing it would produce an invoice that validates and is wrong, which is worse than one that fails.
How to fix it
Correct the organisation number. A checksum cannot be repaired by recomputing the last digit, because that would silently invent a different, possibly real, company.
Where it applies
| UBL | /Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID |
|---|
Check your own invoice
curl -X POST https://einvoice.mgsoft.sk/v1/validate \
-H 'Content-Type: application/xml' \
--data-binary @invoice.xml