Skip to content

Government system integration / 2023

efakture.exe: POS software sends to SEF without a rewrite

Case study: POS software could not send to SEF. A Go service has sent more than 10,000 invoices and 5,000 delivery notes since 2023.

Flow diagram: BKC Soft POS software on the left, the efakture.exe service in the middle, and SEF, the Central Invoice Register, e-delivery notes, Moj e-Račun, email and an online store on the right
Client
BKC Soft
Year
2023
Role
Full development and maintenance of the service
Technologies
Go, HTTP, UBL XML, JSON, SMTP

10,000+

invoices sent to SEF

5,000+

e-delivery notes sent

50+

routes, almost all with a test twin

This is a case study of efakture.exe, a service I built for the BKC Soft point of sale software. It is part of a longer collaboration with BKC Soft, described in the case study of their portal.

Client and context

BKC Soft makes point of sale software accredited with the Serbian Tax Administration under registration number 88. Since January 1, 2023, private sector companies in Serbia that are VAT payers issue and store e-invoices between each other through SEF, the Ministry of Finance e-invoicing system. Software running in shops and cafés had to start sending invoices to the government system, and later electronic delivery notes too.

Problem

The law brought e-invoices, electronic delivery notes and VAT records, all through government systems, over HTTP calls with UBL XML (the prescribed document format), keys and an encrypted connection. The POS software was written to talk to a local database and a fiscal printer, not to web services whose specification keeps changing.

Rewriting it was not an option. It runs in the venues, people know it by heart, and every larger change means a new installation at every customer.

Constraints

An invoice sent to the government system is sent: there is no pulling it back. So every flow has to be tested before a real invoice goes out. The specification changes with every amendment, and the e-invoicing law has been amended six times since 2021. The third constraint is the computers in the venues: the service has to run with no installation and no extra software, because nobody visits every venue.

Solution

One file between the software and the government

Everything that leaves the venue was moved into a separate service: one executable file, no installation, no dependencies. The software calls a local address and gets an answer. It knows nothing about XML, keys or certificates. When the government changes the specification, only that file changes.

What it does for SEF

It sends outgoing invoices to SEF, registering them in the Central Invoice Register where needed, checks the status of sent invoices, downloads incoming invoices as XML and PDF and accepts or rejects them. It also files individual electronic VAT records and validates the XML before sending, so mistakes are caught before they leave. A second intermediary, Moj e-Račun, is available as an alternative to the government one, with the same flows.

E-delivery notes and more

The same service sends and fetches electronic delivery notes, incoming and outgoing, more than 5,000 so far. It also carries jobs that have nothing to do with the government: it sends email with attachments through Gmail, Outlook or Yahoo, passing the mail details per call and storing them nowhere; it sends fiscal receipts to an online store (that is how EcoLED customers get their receipt by email); and it sends daily sales reports to large suppliers.

A test version of every route

The service now has more than 50 routes, and almost every one has a test twin that sends to the demo environment. The whole flow, from building the document through validation and sending to status checks, runs on the test system first, so a new version goes out without nerves. The government system's response is saved to a file, so an error can be looked at later.

How one invoice travels

  1. The invoice is created in the POS software, as before.
  2. The software calls the service at a local address and hands it the data.
  3. The service builds the XML to the UBL 2.1 standard.
  4. The service validates the XML before sending.
  5. The invoice goes to SEF, or to the demo environment for a test.
  6. The government system's response is saved to a file, and the software gets the status: sent, accepted or rejected.

Everything the service covers

Area What it does
SEF sending outgoing invoices, Central Invoice Register entries, status, receiving, accepting and rejecting incoming ones
VAT individual electronic records
E-delivery notes sending and fetching, incoming and outgoing
Companies a list of companies registered in the system
Register reading the daily report and preparing it for sending
Documents base64 both ways, PDF to text and back, downloads as XML and PDF
Email sending with attachments through Gmail, Outlook or Yahoo
Store and suppliers fiscal receipts to an online store, daily sales reports to suppliers

Technologies and why

Go was chosen for one reason: it compiles to a single executable with no dependencies. There is no runtime to install on the venue computer and no version mismatch; the file is copied and started. Documents go out as UBL 2.1 over HTTP and an encrypted connection, and email over SMTP.

Result

The POS software meets its legal obligation without being rewritten. More than 10,000 invoices and 5,000 delivery notes have gone through the service. It has run since 2023, the first year of mandatory e-invoicing between companies, and grows with the rules: e-delivery notes, VAT records and the second intermediary came later, each time as an update of the same file. The legal changes that apply from January 1, 2027, are already in (as of October 2026).

Sources

Dates were checked on October 4, 2026, in the consolidated text of the Law on Electronic Invoicing (Official Gazette nos. 44/2021 to 80/2026), Article 24, and on the official site efaktura.gov.rs.

Services used on this project

Questions about the project

What does efakture.exe do?

It is a service written in Go that the POS software calls on the same computer. It builds the XML, sends invoices to SEF and delivery notes to the e-delivery note system, downloads incoming documents, tracks statuses and returns the response to the software.

Can other companies use the service?

Right now only BKC Soft uses it. It can be adapted for other software, arranged as a SEF integration project.

What would a similar integration cost for other software?

Connecting software to SEF is quoted per project, from around 300 EUR, and takes 20 days or more. Details are on the SEF e-invoicing integration page.

What happens when the government changes the specification?

Only the service changes. Users receive one new file and the POS software stays the same. The legal changes that apply from January 1, 2027, are already in.

Got a similar job?

Describe what you need in a few sentences. Messages sent before 5 pm CET get a same day reply with an estimate of price and timeline.