March 23, 2023

Structured invoice


Featured image for “Structured invoice”

A structured invoice is an electronic invoice containing an identification number and data in the xml format in accordance with the logical structure adopted by the Ministry of Finance and required by the National e-Invoice System (KSeF). From 2022, companies will be able to voluntarily, and from 2024 they will be required to issue structured invoices via KSeF. 

These invoices will be assigned ID numbers and the recipient of such invoice will have to accept it. Electronic invoices are as important as paper invoices and are subject to the same rules regarding their content and storage. A structured invoice is a special type of electronic invoice that is saved in a format that allows it to be automatically processed by the buyer. 

Here is an example of an XML code for a structured invoice:

<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="http://www.example.com/invoicing"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.example.com/invoicing invoice.xsd">
  <InvoiceNumber>INV-001</InvoiceNumber>
  <InvoiceDate>2022-01-01</InvoiceDate>
  <Supplier>
    <Name>ACME Corp</Name>
    <TaxNumber>PL1234567890</TaxNumber>
  </Supplier>
  <Customer>
    <Name>ABC Inc</Name>
    <TaxNumber>PL0987654321</TaxNumber>
  </Customer>
  <InvoiceItems>
    <InvoiceItem>
      <ProductCode>P-001</ProductCode>
      <ProductName>Product 1</ProductName>
      <Quantity>1</Quantity>
      <UnitPrice>100.00</UnitPrice>
      <TaxRate>23</TaxRate>
    </InvoiceItem>
    <InvoiceItem>
      <ProductCode>P-002</ProductCode>
      <ProductName>Product 2</ProductName>
      <Quantity>2</Quantity>
      <UnitPrice>50.00</UnitPrice>
      <TaxRate>23</TaxRate>
    </InvoiceItem>
  </InvoiceItems>
  <TotalAmount>225.00</TotalAmount>
  <TotalTax>51.75</TotalTax>
</Invoice>

Please note that this is a sample and real XML code might vary as per the country regulations and laws.

Structured invoices are beneficial because they allow companies to automatically transfer data from invoices between accounting programs without the need for manual input. This can save time and reduce errors. Additionally, companies with foreign branches in Poland can integrate with KSeF via the A-Cube API, which will enable them to meet the legal requirements for issuing structured invoices without having to upgrade their existing systems.

Types of schemas

  • FA(2) – Schemat główny faktury
  • FA RR, – faktura, którą wystawia nabywca produktów rolnych lub usług rolniczych od rolnika ryczałtowego.

Resources

Latest version of the invoice schema you can find here:

https://www.gov.pl/web/finanse/konsultacje-podatkowe-struktur-logicznych-fa2-i-farr