Skip to main content

Fiscal Requirements

Features of the EFR​

The EFR serves as system interfacing to certified fiscal printers. It does not replace a fiscal printer, this is still needed to fulfill the requirements of Polish fiscal law. EFR keeps secure journals, as it does for other fiscal countries. Sales transactions have to be printed using the fiscal functions of the printer. For this to work two elements have to be in place:

  • a transaction, sent via REST web request to the EFR, which contains sales data, and
  • a formatting file, which defines formal representation of this data.

Application Requirements​

  • For normal transactions the fiscal printer does not allow mixing of positive and negative positions (quantities), except voids directly following an item sale, because returns have to be printed non fiscal. Else the registration will be rejected with RC="BAD".
  • Return transactions may contain negative position amounts only. A non fiscal receipt is printed
  • Transactions with zero value are not accepted. It is not possible to close sales phase when receipt total is equal zero.
  • In a case of power failure, printer mechanism failure or lack of paper printing receipt will be continued after removing the cause of failure.

VAT Handling​

As in other countries transaction data is normalized upon registration (details see EFR Reference: ESR Format). Tax rates are controlled via ESR.TaxA, Tax.Prc is matched against the printer configuration, which is loaded with rates valid before the first transaction on a day.

Current rates are:

PrcDescriptionTaxG
23%standardA
8%zredukowanyB
5%zredukowanyC
0%zeroD
0%wyjątekE
0%nie podlegaF
nieużywanyG

Other Printing Functions​

Line Display​

Display Item​

During position and payment entry the cash register application should send referring description and price/amount information immediately to the customer display:

URL:          http://localhost:5618/peri/display
Method:   POST
Body:        text

The first two text lines are sent to the standard customer display, capacity is 20 characters per line. Like with all other requests UTF-8 encoding is expected by default. Alternatively the following call may be used: /peri/display?text=This+is+test+line+1+Line+2

Cash Drawer​

By default the cash drawer should be managed by the cash register application.

Open Drawer and Wait​

URL:          http://localhost:5618/peri/drawer/wait
Method:   POST

The cash drawer is opened immediately, after closing the response is sent. As the drawer might be left open longer time, an intermediate HTTP status "102 Processing" is sent within every 30 seconds till final closing "200 OK". Usually the application shows a message DRAWER OPEN and locks further operator actions while the drawer is open.

Open Drawer and Poll​

Opens and responds immediately

URL:          http://localhost:5618/peri/drawer
Method:   POST

Afterwards you can poll the drawer state using request

URL:          http://localhost:5618/peri/drawer
Method:   GET (e.g. once per second), which will signal

{"PeriDrawer":0}

or (when request header accept=text/xml is set):

<DrawerState>
<PeriDrawer>0</PeriDrawer>
</DrawerState>

until final closing

{"PeriDrawer":1}

Manual Drawer Open​

Manual drawer open (with key) and close events are logged in the transaction journal.

Printer State​

URL:          http://localhost:5618/peri/print/state
Method:   GET

Response:

{
"ModuleName": "FP_T88FVA",
"ID": "ZAE1901005432",
"Info": "",
"Drawer": 1,
"Serial": "ZAE1901005432",
"SimpleState": {
"DayOpen": true,
"ZRequired": null,
"NextZRequired": null,
"DrawerOpen": false,
"PaperNearEnd": false,
"PaperEnd": false,
"CoverOpen": false,
"MemAlmostFull": false,
"MemFull": false,
"CertExpires": null
},
"PrinterTimeAndDate": "2025-11-19T09:12:20",
"ZI": 78,
"LastZIUpdate": 1763539901624,
"PrinterState": {
"drawer": 1,
"online": 0,
"cover": 0,
"feed": 0,
"nearEnd": 0,
"paperEnd": 0
},
"CashRegisterState": {
"openDay": 1,
"openReceipt": 0,
"printerFiscal": 1,
"vat": 1,
"memAlmostFull": 0,
"memFull": 0,
"fiscal": 1,
"busy": 0,
"display": 1
},
"LastStateUpdate": 1763539929781
}

and with request header accept=text/xml:

<PrintState>
<ModuleName>FP_T88FVA</ModuleName>
<ID>ZAE1901005432</ID>
<Info/>
<Drawer>1</Drawer>
<Serial>ZAE1901005432</Serial>
<SimpleState>
<DayOpen>true</DayOpen>
<ZRequired/>
<NextZRequired/>
<DrawerOpen>false</DrawerOpen>
<PaperNearEnd>false</PaperNearEnd>
<PaperEnd>false</PaperEnd>
<CoverOpen>false</CoverOpen>
<MemAlmostFull>false</MemAlmostFull>
<MemFull>false</MemFull>
<CertExpires/>
</SimpleState>
<PrinterTimeAndDate>2025-11-19T09:15:24</PrinterTimeAndDate>
<ZI>78</ZI>
<LastZIUpdate>1763540112372</LastZIUpdate>
<PrinterState>
<drawer>1</drawer>
<online>0</online>
<cover>0</cover>
<feed>0</feed>
<nearEnd>0</nearEnd>
<paperEnd>0</paperEnd>
</PrinterState>
<CashRegisterState>
<openDay>1</openDay>
<openReceipt>0</openReceipt>
<printerFiscal>1</printerFiscal>
<vat>1</vat>
<memAlmostFull>0</memAlmostFull>
<memFull>0</memFull>
<fiscal>1</fiscal>
<busy>0</busy>
<display>1</display>
</CashRegisterState>
<LastStateUpdate>1763540114382</LastStateUpdate>
</PrintState>

Specifics​

Foreign Currency Payments​

In addition to the default fields needed for foreign currency payments, a third field ConvR (conversion rate) is required. For more information on foreign currency payments, please check our Business Cases.

Daily Closure / Z-report​

The fiscal printer's closure function ("Z") is invoked by sending a non-fiscal signed transaction.

see business case Z-Report / End of Day

Response​

<TraC SQ="7757">
<Result RC="OK"/>
<ESR D="2019-07-05T13:20:12" TN="271"/>
<Z T="5799.00">
<ZTaxA>
<ZTax TaxG="A" Prc="23.00" TAmt="850.00" Amt="4545.00"/>
<ZTax TaxG="B" Prc="8.00" TAmt="68.00" Amt="923.00"/>
<ZTax TaxG="C" Prc="5.00" TAmt="3.00" Amt="78.00"/>
<ZTax TaxG="D" Prc="0.00" TAmt="0.00" Amt="244.00"/>
<ZTax TaxG="E" Prc="" TAmt="0.00" Amt="6.00"/>
<ZTax TaxG="F" Prc="" TAmt="0.00" Amt="0.00"/>
<ZTax TaxG="G" Prc="" TAmt="0.00" Amt="0.00"/>
</ZTaxA>
</Z>
</TraC>

ZTax elements are given per TaxG.

Invoice​

To print a direct invoice, tag the transaction with Document Type ("Invoice") and include customer information as ESR.Ctm.

tip

For invoices, the EFR generates and increments its own counter in the Document Numbering (DN).

To print a customer’s NIP send the value as ESR.Ctm.TaxId:

<Tra>
<ESR TL="01" TT="1" TN="1234">
<Ctm TaxId="PL123456789"/>
…

See business case Invoices

For printing with DT= a referring layout file (Invoice.pug) is required.