InvoiceSpec / Rules Registry / ksef-fa-2 / KSEF-PL-NIP-01
fatal ASSERTION · KSEF-PL-NIP-01 KSeF FA(2) / FA(3) (Polish Mandate) (FA-2-XML) Jurisdiction: PL

KSEF-PL-NIP-01: Polish Seller NIP (Podmiot1/DaneIdentyfikacyjne/NIP) must be an exact 10-digit tax identifier without PL prefix

Official KSeF FA(2) / FA(3) (Polish Mandate) Spec ↗
01. Technical Specification & XPath Evaluation Context

The KSEF-PL-NIP-01 rule enforces the Polish national e-invoicing requirement for the seller's tax identifier (NIP) within the KSeF FA(2) profile, which is based on UBL 2.1. The context XPath /Faktura/Podmiot1/DaneIdentyfikacyjne/NIP selects the NIP element of the seller (Podmiot1) under the Polish-specific extension. The assertion test matches(normalize-space(NIP), "^[0-9]{10}$") checks that the normalized text content of NIP consists of exactly 10 digits. This corresponds to the business term BT-31 (Seller VAT identifier) but with a Polish-specific constraint: the NIP must be a 10-digit number without the 'PL' country prefix. The rule is fatal because an invalid NIP prevents the invoice from being accepted by the KSeF system. The XPath evaluation context is the NIP element itself, so the test is applied to its string value after whitespace normalization.

Evaluated XPath Location:
/Faktura/Podmiot1/DaneIdentyfikacyjne/NIP
Deterministic Remediation Steps

1. Locate the seller's NIP element at /Faktura/Podmiot1/DaneIdentyfikacyjne/NIP. 2. Remove any leading 'PL' prefix or other country codes. 3. Ensure the value contains exactly 10 digits (0-9) with no spaces, hyphens, or other characters. 4. If the NIP is provided with separators (e.g., '123-456-32-18'), remove them to get '1234563218'. 5. Validate that the resulting string matches the regular expression ^[0-9]{10}$. 6. Update the XML with the corrected NIP.

02. Side-by-Side FA-2-XML Payload Diff (Rejected vs. Compliant)
--- a/invoice-rejected.xml (KSEF-PL-NIP-01) FAIL
1 <Faktura>
2 <Podmiot1>
3 <DaneIdentyfikacyjne>
4 <!-- Error: NIP contains 'PL' prefix and is not exactly 10 digits -->
5 <NIP>PL1234567890</NIP>
6 </DaneIdentyfikacyjne>
7 </Podmiot1>
8 </Faktura>
+++ b/invoice-compliant.xml (EN 16931 VALID)
PASS
1 <Faktura>
2 <Podmiot1>
3 <DaneIdentyfikacyjne>
4 + <NIP>1234567890</NIP>
5 </DaneIdentyfikacyjne>
6 </Podmiot1>
7 </Faktura>
03. Interactive KSeF FA(2) / FA(3) (Polish Mandate) Validation & Auto-Fix Workbench
3 CREDITS
invoice.xmlFA-2-XML
DETECTED SOURCECustom ERP / Billing Engine
BT-131 LINE SUM0.00 EUR
BT-106 HEADER0.00 EUR
SCHEMATRON: 1 FATAL· 1ms
KSeF FA(2) / FA(3) (Poland)
KSEF-PL-NIP-01Polish Seller NIP ("PL1234567890") must be an exact 10-digit tax identifier without PL prefix
Spec & Diff
xpath: /Faktura/Podmiot1/DaneIdentyfikacyjne/NIP

KSeF XSD rejects NIP "PL1234567890". Country prefixes ("PL") and hyphens are forbidden.

fix: Normalize <NIP> to 10 digits: <NIP>1234567890</NIP>.

Automate Custom ERP / Billing Engine → KSeF FA(2) / FA(3) (Poland) AP Delivery

Deploy certified Peppol Access Point & ZUGFeRD ERP connector

04. Adjacent KSeF FA(2) / FA(3) (Polish Mandate) Assertions Browse All Rules →