Accounting exports
The module turns invoices already issued by Polski PRO into files an accountant or an e-invoicing network can read. Two exports ship: a UBL/PEPPOL XML download for a single invoice, and a JPK_FA report covering a date range.
What ships
Section titled “What ships”| Export | Where | Output |
|---|---|---|
| UBL / PEPPOL XML | Order edit screen, PEPPOL / UBL (XML) box | One .xml file per invoice |
| JPK_FA report | Polski > JPK_FA report | One .xml file per date range |
Both require the manage_woocommerce capability and are nonce protected.
UBL / PEPPOL export
Section titled “UBL / PEPPOL export”Where to find it
Section titled “Where to find it”Open an order in wp-admin. In the side column there is a PEPPOL / UBL (XML) box with one button per invoice attached to that order, labelled UBL: <invoice number>. If the order has no invoice yet, the box says so and there is nothing to download.
The file is served as invoice-<number>.xml with the application/xml content type.
What the file contains
Section titled “What the file contains”UBL 2.1, built with the EN 16931 customisation identifier and the PEPPOL BIS Billing 3.0 profile identifier:
| Element | Source |
|---|---|
cbc:ID |
Invoice number |
cbc:IssueDate |
Invoice issue date |
cbc:InvoiceTypeCode |
380 for an invoice, 384 for a correction |
cbc:DocumentCurrencyCode |
Invoice currency |
cac:AccountingSupplierParty |
Site name, seller NIP, WooCommerce base country |
cac:AccountingCustomerParty |
Billing company (or first and last name), buyer NIP, billing country |
cac:TaxTotal |
One cac:TaxSubtotal per VAT rate, category S, or Z at 0% |
cac:LegalMonetaryTotal |
Net, tax exclusive, tax inclusive and payable amounts |
cac:InvoiceLine |
One per invoice line, with quantity, unit code, item name, VAT category and unit price |
Unit codes are mapped from the invoice line unit: szt, szt. and pcs become C62, kg becomes KGM, l becomes LTR, m becomes MTR, h becomes HUR. Anything else falls back to C62.
Example (abbreviated)
Section titled “Example (abbreviated)”<?xml version="1.0" encoding="UTF-8"?><Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"> <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID> <cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID> <cbc:ID>FV/2026/07/12</cbc:ID> <cbc:IssueDate>2026-07-12</cbc:IssueDate> <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode> <cbc:DocumentCurrencyCode>PLN</cbc:DocumentCurrencyCode> <cac:AccountingSupplierParty> <cac:Party> <cac:PartyName><cbc:Name>Moja Firma Sp. z o.o.</cbc:Name></cac:PartyName> <cac:PostalAddress> <cac:Country><cbc:IdentificationCode>PL</cbc:IdentificationCode></cac:Country> </cac:PostalAddress> <cac:PartyTaxScheme> <cbc:CompanyID>PL1234567890</cbc:CompanyID> <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme> </cac:PartyTaxScheme> <cac:PartyLegalEntity><cbc:RegistrationName>Moja Firma Sp. z o.o.</cbc:RegistrationName></cac:PartyLegalEntity> </cac:Party> </cac:AccountingSupplierParty> <!-- AccountingCustomerParty has the same structure, filled from the billing address --> <cac:TaxTotal> <cbc:TaxAmount currencyID="PLN">46.00</cbc:TaxAmount> <cac:TaxSubtotal> <cbc:TaxableAmount currencyID="PLN">200.00</cbc:TaxableAmount> <cbc:TaxAmount currencyID="PLN">46.00</cbc:TaxAmount> <cac:TaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>23.00</cbc:Percent> <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme> </cac:TaxCategory> </cac:TaxSubtotal> </cac:TaxTotal> <cac:LegalMonetaryTotal> <cbc:LineExtensionAmount currencyID="PLN">200.00</cbc:LineExtensionAmount> <cbc:TaxExclusiveAmount currencyID="PLN">200.00</cbc:TaxExclusiveAmount> <cbc:TaxInclusiveAmount currencyID="PLN">246.00</cbc:TaxInclusiveAmount> <cbc:PayableAmount currencyID="PLN">246.00</cbc:PayableAmount> </cac:LegalMonetaryTotal> <cac:InvoiceLine> <cbc:ID>1</cbc:ID> <cbc:InvoicedQuantity unitCode="C62">2.00</cbc:InvoicedQuantity> <cbc:LineExtensionAmount currencyID="PLN">200.00</cbc:LineExtensionAmount> <cac:Item> <cbc:Name>Produkt testowy</cbc:Name> <cac:ClassifiedTaxCategory> <cbc:ID>S</cbc:ID> <cbc:Percent>23.00</cbc:Percent> <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme> </cac:ClassifiedTaxCategory> </cac:Item> <cac:Price> <cbc:PriceAmount currencyID="PLN">100.00</cbc:PriceAmount> </cac:Price> </cac:InvoiceLine></Invoice>The mapper covers the core mandatory elements. Validate the output against the official EN 16931 / PEPPOL validator before relying on it for production B2B exchange.
JPK_FA report
Section titled “JPK_FA report”Where to find it
Section titled “Where to find it”Go to Polski > JPK_FA report. The form has two date fields, From and To, prefilled with the first and last day of the current month, and a Download JPK_FA XML button. The file is served as JPK_FA_<from>_<to>.xml.
What the report contains
Section titled “What the report contains”JPK_FA(3), with the structure the Ministry of Finance expects:
| Section | Content |
|---|---|
Naglowek |
KodFormularza JPK_FA, WariantFormularza 3, CelZlozenia 1, generation timestamp, DataOd and DataDo from the form |
Podmiot1 |
Seller NIP, name and street from the Polski general settings |
Faktura |
One per document: issue date, number, buyer name and address, seller and buyer NIP, per-rate net and VAT, gross total, document kind |
FakturaCtrl |
Number of invoices and their total gross value |
FakturaWiersz |
One per invoice line: invoice number, item name, unit, quantity, unit net price, line net value, VAT rate |
FakturaWierszCtrl |
Number of lines and their total net value |
Per-rate fields are written only when the invoice has lines at that rate: P_13_1 and P_14_1 for 23%, P_13_2 and P_14_2 for 8%, P_13_3 and P_14_3 for 5%, P_13_6 for 0%. RodzajFaktury is VAT, or KOREKTA for a correction.
What is included and what is skipped
Section titled “What is included and what is skipped”Only accounting documents are exported: VAT invoices and corrections. Proformas, receipts (paragon) and packing slips are skipped by design, and are not counted in FakturaCtrl.
Before you submit
Section titled “Before you submit”- Fill in company name, NIP and address in the Polski settings first. Empty values are written as placeholders.
- The address block carries the street from settings only.
Wojewodztwo,PowiatandGminago out empty, andMiejscowosc,KodPocztowyandPocztago out as-. KodUrzedu(the tax office code) is emitted empty. Add it to the file before submission.- The report reads up to 10 000 invoices and then filters them to the chosen range. On a high-volume store, generate month by month.
- Validate the file against the official Ministry of Finance XSD before sending it to the tax authority.
Troubleshooting
Section titled “Troubleshooting”The UBL box says “No invoice yet” The order has no invoice attached. Issue one first, then reload the order screen.
JPK_FA comes out with LiczbaFaktur 0
The chosen range contains no VAT invoices or corrections. Proformas and receipts do not count towards the report.
Seller data in the report shows placeholders Company name, NIP and address are empty in the Polski general settings. Fill them in and generate the file again.
“You do not have permission” or “Security check failed”
Both downloads require the manage_woocommerce capability, and the link or form carries a nonce. Reload the page and try again.
Next steps
Section titled “Next steps”- Report issues: GitHub Issues
- Related: PRO REST API