Poland (FA(3)): KSeF Attachment

For Polish KSeF FA(3) invoices, it is possible to provide additional structured data.

This invoice attachment serves to present tax-related data. It should only contain the data referred to in Article 106e of the Act, or data closely related to this data. This means that data of a typically commercial, marketing/advertising, or business nature should not be included, for example:

  • Price lists, warranty conditions, user manuals
  • Orders, contracts, agreements, annexes to agreements, acceptance reports
  • Information on promotions and sales, advertising material, individual offers, newsletters

If the attachment is used in violation of the rules, according to the KSeF FA(3) documentation, the right to issue and send invoices with KSeF attachments will be revoked.

Elements

NameCardinalityDescription
KSeF Attachment (Invoice/UBLExtensions/UBLExtension/ExtensionContent/ InvoiceExtension/KSeFAttachment)0..1Invoice attachment (structured data) that serves to present tax-related data.

This group contains the following elements. This table includes the child elements of the mentioned groups and elements, and shows the relative XPath starting from the KSeFAttachment context.

NameCardinalityDescription
Data Block DataBlock1..1000Details of the invoice attachment (data blocks).
Data Block Header DataBlock/Header0..1The header of data block.
Data Block Meta Data DataBlock/MetaData1..1000A group containing key-value pairs related to the data block.
Meta Data Name DataBlock/MetaData/Name1..1The name of the metadata key.
Meta Data Value DataBlock/MetaData/Value1..1The value of the metadata key- value pair.
Data Block Text DataBlock/Text0..1Text part of a data block.
Text Paragraph DataBlock/Text/Paragraph1..10Paragraph constituting the text part of a data block.
Data Table DataBlock/Table0..1000A group containing a data table.
Table Meta Data DataBlock/Table/MetaData0..1000A group containing key-value pairs related to a table.
Table Meta Data Name DataBlock/Table/MetaData/Name1..1The name of the metadata key.
Table Meta Data Value DataBlock/Table/MetaData/Value1..1The value of the metadata key- value pair.
Table Description DataBlock/Table/Description0..1The description of the table.
Table Header DataBlock/Table/TableHeader1..1A group containing a table header.
Column Header DataBlock/Table/TableHeader/ColumnHeader1..20A group containing column headers.
Column Header Type DataBlock/Table/TableHeader/ColumnHeader/@type1..1The data type of the column.
Column Header Name DataBlock/Table/TableHeader/ColumnHeader/Cell1..1The name of the column.
Table Row DataBlock/Table/TableRow1..1000A group containing a table row.
Table Row Cell DataBlock/Table/TableRow/Cell1..20An element containing data of a table cell.
Table Summary DataBlock/Table/TableSummary0..1A group containing a summary row of the table.
Table Summary Cell DataBlock/Table/TableSummary/Cell1..20An element containing a summary cell.

Example


```xml
<Invoice>
    <UBLExtensions>
        <UBLExtension>
            <ExtensionContent>
                <InvoiceExtension>
                    <!-- code omitted for clarity -->
                    <KSeFAttachment>
                        <DataBlock>
                            <MetaData>
                                <Name>Nr FK</Name>
                                <Value>12345678</Value>
                            </MetaData>
                            <MetaData>
                                <Name>Dokument wystawił</Name>
                                <Value>John Doe</Value>
                            </MetaData>
                        </DataBlock>
                        <DataBlock>
                            <Header>Specyfikacja ilościowa:</Header>
                            <MetaData>
                                <Name>Ilość  ( Jedn. miary )</Name>
                                <Value>5,9200  ( t )</Value>
                            </MetaData>
                        </DataBlock>
                        <DataBlock>
                            <Header>Faktury zaliczkowe (pobrano do rozliczenia)</Header>
                            <MetaData>
                                <Name>Ilość roliczonych faktur zaliczkowych:</Name>
                                <Value>1</Value>
                            </MetaData>
                            <Table>
                                <Description>Szczegóły:</Description>
                                <TableHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Faktury zaliczkowe</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Numer KSEF</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Data wystawienia</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="dec">
                                        <Cell>Wartość netto (PLN)</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="dec">
                                        <Cell>Wartość VAT (PLN)</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="dec">
                                        <Cell>Wartość brutto (PLN)</Cell>
                                    </ColumnHeader>
                                </TableHeader>
                                <TableRow>
                                    <Cell>FV11111111</Cell>
                                    <Cell/>
                                    <Cell>2025-01-21</Cell>
                                    <Cell>23240,00</Cell>
                                    <Cell>5340,30</Cell>
                                    <Cell>28860,60</Cell>
                                </TableRow>
                            </Table>
                        </DataBlock>
                        <DataBlock>
                            <Header>Dokumenty magazynowe</Header>
                            <MetaData>
                                <Name>Ilość powiązanych dokumentów magazynowych</Name>
                                <Value>1</Value>
                            </MetaData>
                            <Table>
                                <Description>Szczegóły:</Description>
                                <TableHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Dokumenty magazynowe</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Z dnia</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Magazyn</Cell>
                                    </ColumnHeader>
                                    <ColumnHeader type="txt">
                                        <Cell>Adres wysyłki</Cell>
                                    </ColumnHeader>
                                </TableHeader>
                                <TableRow>
                                    <Cell>WZ 123456789</Cell>
                                    <Cell>2026-02-03</Cell>
                                    <Cell>Magazyn Główny</Cell>
                                    <Cell>ul. Zmyślona 12 /  00-001 Warszawa Polska</Cell>
                                </TableRow>
                            </Table>
                        </DataBlock>
                    </KSeFAttachment>
                    <!-- code omitted for clarity -->
                </InvoiceExtension>
            </ExtensionContent>
        </UBLExtension>
    </UBLExtensions>  
    <!-- code omitted for clarity -->
</Invoice>
```