Account
English

KSeF FA(3) rules (KSeF FA(3), Polish national e-invoicing system)

KSeF FA(3) rules cover the Polish structured invoice: XSD schema errors (element order, NIP and date patterns, allowed values) and semantic rules from the Ministry of Finance (annotations, party roles, bank accounts, currency rates, amounts)..

KSeF FA(3) rules cover the Polish structured invoice: XSD schema errors (element order, NIP and date patterns, allowed values) and semantic rules from the Ministry of Finance (annotations, party roles, bank accounts, currency rates, amounts).

Source: KSeF FA(3) schema 1-0E + semantic rules (@ksefuj/validator 0.4)

All rules (56)

IDRuleSeverity
ADNOTACJE_NST_MISSINGNoweSrodkiTransportu element is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_P16_MISSINGP_16 is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_P17_MISSINGP_17 is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_P18_MISSINGP_18 is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_P18A_MISSINGP_18A is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_P23_MISSINGP_23 is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_PMARZY_MISSINGPMarzy element is mandatory in Adnotacje (§9.6)Error
ADNOTACJE_ZWOLNIENIE_MISSINGZwolnienie element is mandatory in Adnotacje (§9.6)Error
AMOUNT_NO_SEPARATORSAmount fields must not contain spaces, commas, or any non-numeric characters except…Error
CURRENCY_RATE_MISMATCHKursWaluty does not match the NBP Table A mid-rate for the reference date (ArtWarning
CURRENCY_RATE_UNVERIFIABLEKursWaluty cannot be verified — NBP rate unavailable or outside the valid date window (ArtWarning
DECIMAL_PRECISIONAmount field exceeds maximum decimal precision defined in §2.6 of FA(3) specificationError
DUPLICATE_LINE_NUMBERSLine numbers (NrWierszaFa) must be unique within the invoice (except in corrective…Error
ELEMENT_NOT_ALLOWEDElement not allowed at this locationError
ENCODING_ERRORCharacter encoding errorError
FOREIGN_CURRENCY_TAX_PLNForeign currency invoice with tax amounts should include PLN conversions in P_14_*W…Warning
GTU_FORMATGTU value must match pattern GTU_XX (GTU_01 through GTU_13)Error
GV_REQUIRES_PODMIOT3When Podmiot2/GV = '1', at least one Podmiot3 must exist with Rola = '10' (§6.1,…Error
INVALID_BANK_ACCOUNT_FORMATPolish bank account (NrRB) must be 28 characters for IBAN format (PL + 26 digits) or…Error
INVALID_ELEMENT_VALUEElement value does not match schema constraintsError
IPKSEF_FORMATIPKSeF must be exactly 13 alphanumeric characters [0-9a-zA-Z] (§12.1)Warning
JST_REQUIRES_PODMIOT3When Podmiot2/JST = '1', at least one Podmiot3 must exist with Rola = '8' (§6.1,…Error
KOR_NRKSEF_CONSISTENCYDaneFaKorygowanejError
KURS_WALUTA_PAIRKursUmowny and WalutaUmowna must both be present or both absent (§13.1, Appendix D #11)Error
KURS_WALUTY_Z_PLACEMENTKursWalutyZ at Fa level is ONLY valid for advance invoices (RodzajFaktury = ZAL or…Error
MALFORMED_XMLXML is not well-formedError
NEGATIVE_QUANTITY_NOT_ALLOWEDNegative quantities (P_8B) are only allowed in corrective invoices (RodzajFaktury =…Error
NIP_IN_WRONG_FIELDPolish NIP detected in NrVatUE field - must be in NIP field for purchaser KSeF access…Warning
NRRB_LENGTHNrRB must be 10–34 characters (§12.1)Warning
NST_LOGICNoweSrodkiTransportuError
OO_RATE_FOREIGN_BUYERP_12 = 'oo' is for domestic reverse charge onlyWarning
P6_P6A_MUTUAL_EXCLUSIONP_6 (common delivery date) and P_6A (per-line delivery date) are mutually exclusive…Error
P12_ENUMERATIONP_12 must be one ofError
P15_MISSINGP_15 (total amount due) is mandatory in Fa (§9.4)Error
PAYMENT_ZAPLACONO_DATEWhen Platnosc/Zaplacono = '1', DataZaplaty must be present (§12.1)Warning
PMARZY_LOGICPMarzyError
PODMIOT2_GV_MISSINGGV element is mandatory in Podmiot2 (§6.1)Error
PODMIOT2_JST_MISSINGJST element is mandatory in Podmiot2 (§6.1)Error
PODMIOT3_ROLE_MISSINGWhen Podmiot3 has no Rola, both RolaInna and OpisRoli must be presentError
PODMIOT3_UDZIAL_REQUIRES_ROLE_4Udzial element on Podmiot3 is only permitted when Rola = '4' (§7.2)Error
RACHUNEKBANKOWY_NRRBWhen RachunekBankowy element is filled, NrRB is mandatory (nested obligation) (§2.2,…Error
REQUIRED_ELEMENT_MISSINGRequired element missing according to schemaError
REVERSE_CHARGE_CONSISTENCYReverse chargeWarning
RODZAJ_FAKTURY_SECTIONSInvoice type determines required sectionsError
SCHEMA_VALIDATION_FAILEDXML does not conform to FA(3) XSD schemaError
SELF_BILLING_PODMIOT3_CONFLICTSelf-billing (P_17 = '1')Warning
TAX_CALCULATION_MISMATCHTax calculation errorError
TRANSPORT_MINIMUM_DATATransport requiresWarning
WALUTA_UMOWNA_PLNWalutaUmowna must NEVER be 'PLN' (§13.1, Appendix D #10)Error
XML_BOM_PRESENTFile starts with a UTF-8 BOMError
XML_DISCOURAGED_CHARACTERCharacter discouraged by the W3C XML spec ([#x7F-#x84], [#x86-#x9F], [#xFDD0-#xFDEF],…Error
XML_DISCOURAGED_CHARACTER_MORESummaryError
XML_ENCODING_NOT_UTF8XML declaration names an encoding other than UTF-8Error
XML_PROCESSING_INSTRUCTIONXML processing instruction (e.gError
XML_PROCESSING_INSTRUCTION_MORESummaryError
ZWOLNIENIE_LOGICZwolnienieError