FA(3) field reference

NrWierszaFa in FA(3): the invoice line number

How to fill NrWierszaFa (the line number) in each FaWiersz of a KSeF FA(3) invoice: format, sequence and a valid XML example.

Updated

Overview

NrWierszaFa is the line number of a single invoice line (in Polish, "numer wiersza faktury"). It sits inside each FaWiersz block at /Faktura/Fa/FaWiersz/NrWierszaFa and tells the reader — and the tax authority — the position of that line on the document.

The field is required on every line and its type in the XSD is TNaturalny, a natural number greater than zero. It must be a whole number with no decimals and no leading sign, so 1, 2 and 3 are valid while 0, -1 and 1.5 are not.

Numbering follows the visible order of the lines. The first line is 1, the second is 2, and so on. The numbers must be unique within a single invoice, because other parts of the document reference lines by number — for example the correction and advance-payment structures use NrWierszaFa or the related NrWierszaZam to point back to a specific line. A duplicated or out-of-order number makes those references ambiguous.

There is no rule about how many lines an invoice may have beyond the practical limits of the document, but every line still needs its own sequential number. If you reorder or delete a line while editing, renumber the remaining lines so the sequence stays contiguous; a gap such as 1, 3, 5 is formally acceptable in the XSD but will look wrong to anyone reading the document and can confuse line-level references.

In Notaly you do not write NrWierszaFa yourself. The generator numbers each line automatically in the order you list the items array in the JSON payload, starting at 1. That keeps the numbering consistent with the line order and with any downstream references.

A complete, valid FA(3) example appears below, with NrWierszaFa set to 1 and 2 on the two lines.

<Faktura xmlns="http://crd.gov.pl/wzor/2025/06/25/13775/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Naglowek>
    <KodFormularza kodSystemowy="FA (3)" wersjaSchemy="1-0E">FA</KodFormularza>
    <WariantFormularza>3</WariantFormularza>
    <DataWytworzeniaFa>2026-10-12T07:23:07Z</DataWytworzeniaFa>
    <SystemInfo>einvoice-api</SystemInfo>
  </Naglowek>
  <Podmiot1>
    <DaneIdentyfikacyjne><NIP>2745013933</NIP><Nazwa>Example Sp. z o.o. (FICTIONAL)</Nazwa></DaneIdentyfikacyjne>
    <Adres><KodKraju>PL</KodKraju><AdresL1>ul. Testowa 1, 00-001 Warszawa</AdresL1></Adres>
  </Podmiot1>
  <Podmiot2>
    <DaneIdentyfikacyjne><NIP>1234563218</NIP><Nazwa>Test Customer S.A. (FICTIONAL)</Nazwa></DaneIdentyfikacyjne>
    <Adres><KodKraju>PL</KodKraju><AdresL1>ul. Probna 2, 30-001 Kraków</AdresL1></Adres>
    <JST>2</JST>
    <GV>2</GV>
  </Podmiot2>
  <Fa>
    <KodWaluty>PLN</KodWaluty>
    <P_1>2026-10-12</P_1>
    <P_2>FV/2026/10/001</P_2>
    <P_13_1>1000.00</P_13_1><P_14_1>230.00</P_14_1>
    <P_13_2>301.00</P_13_2><P_14_2>24.08</P_14_2>
    <P_15>1555.08</P_15>
    <Adnotacje>
      <P_16>2</P_16><P_17>2</P_17><P_18>2</P_18><P_18A>2</P_18A>
      <Zwolnienie><P_19N>1</P_19N></Zwolnienie>
      <NoweSrodkiTransportu><P_22N>1</P_22N></NoweSrodkiTransportu>
      <P_23>2</P_23>
      <PMarzy><P_PMarzyN>1</P_PMarzyN></PMarzy>
    </Adnotacje>
    <RodzajFaktury>VAT</RodzajFaktury>
    <FaWiersz>
      <NrWierszaFa>1</NrWierszaFa>
      <P_7>SaaS subscription - October</P_7>
      <P_8A>pcs.</P_8A>
      <P_8B>1</P_8B>
      <P_9A>1000.00</P_9A>
      <P_11>1000.00</P_11>
      <P_12>23</P_12>
    </FaWiersz>
    <FaWiersz>
      <NrWierszaFa>2</NrWierszaFa>
      <P_7>Support</P_7>
      <P_8A>hrs.</P_8A>
      <P_8B>2</P_8B>
      <P_9A>150.50</P_9A>
      <P_11>301.00</P_11>
      <P_12>8</P_12>
    </FaWiersz>
  </Fa>
</Faktura>

Sources

Source: crd.gov.pl

Frequently asked questions

Is NrWierszaFa required on every line?

Yes. Each FaWiersz block must have a NrWierszaFa with a positive whole number.

What type is NrWierszaFa?

A natural number greater than zero (TNaturalny in the XSD).

Does the numbering have to be sequential?

Yes in practice: lines are numbered 1, 2, 3 and so on, matching their order on the invoice.

Issue your first KSeF test invoice today

Create a sandbox account: API key in seconds, 3 free test invoices on KSeF TEST, no credit card.