SoftSDC v3

How S-SDC Works

Understanding the operational principles of SoftSDC

Architecture Overview

SoftSDC operates as a standalone service dedicated to a single POS device exclusively. This POS can be connected either to the same device (phone, tablet, or computer) or to a different one. Communication with SoftSDC happens through an API, where JSON messages are exchanged via HTTP protocol.

Core Functionality

Secure Element Integration

Information that contains taxpayer TIN, Business Name, Shop Name and POS location (Shop or HQ Address that will appear on the textual representation of the invoice)is extracted from digital certificate located on Secure Element when SoftSDC is configrued. SoftSDC does not accept and process receipt information from POS containing tax label that differs from the ones that are official. In order to create fiscal invoices, S-SDC service requires the use of Smart card containing Secure Element (SE), issued by Tax Authority.

Operations between S-SDC and SE do not delay normal POS operations so that it impacts operational efficiency in everyday use.

When secure elements are switched, SoftSDC will not stop the process of remote or local audit.

Data Storage and Persistence

S-SDC uses non-volatile memory of the device that can retrieve stored information even after having been power cycled (turned off and back on). This memory is considered internal memory of S-SDC which can hold internal data before successful Proof of Audit (POA).

S-SDC shall not overwrite or erase audit packages unless it's approved by POA.

Storage Requirements

The average size of an invoice ranges from 20 to 200 kB, depending on the number of the items on it. For devices working in offline mode, for each day of work in off-line mode, it is necessary to have space on the system drive, between audits, as follows:

  • 2MB daily - if issued on average 10 standard invoices (invoice up to 20 items)
  • 20MB daily - if issued on average 100 standard invoices
  • 200MB daily - if issued on average 1,000 standard invoices

Invoice Processing

S-SDC transfers internal data and invoice signature for each receipt processed of types:

  • N - Normal
  • C - Copy
  • T - Training
  • P - Proforma
  • A - Advance

QR Code Generation

S-SDC creates a unique URL for generating a QR code that provides means of verifying receipt data integrity and authenticity in accordance with Regulation.

Online and Offline Mode

S-SDC can generate an invoice in both online and off-line mode (no internet connection available).

Continuous Background Processes

Command Processing

S-SDC continuously processes the following commands received from Tax Authority server, or locally via drive:

  • Configure Time Server URL Command
  • Set Tax Rates Command
  • Update Verification URL Command
  • Proof of Audit Command

Note: Command execution takes precedence over local audit. SoftSDC shall process all commands received from the Tax Service's system in a consecutive order.

Time Synchronization

S-SDC continuously syncs date and time with NTP specified in command received from Tax Authority server.

Audit Submission

  • S-SDC submits proof of audit (PoA) requests to SE and Tax Authority server
  • S-SDC continuously submits audit packages to Tax Authority server
  • S-SDC continuously notifies Tax Authority server when it is online

Authentication

S-SDC shall authenticate with a valid Digital Accreditation (stored in the PKI applet of the Secure Element) when requesting authentication token from the Tax Authority backend. S-SDC uses authentication token when calling the Tax Authority backend API web services.

Receipt Fiscalization Process

When receipt entry is completed in POS and the invoice data sent to ESDC, the fiscalization process begins and consists of the following steps:

Step 1: Receipt Signing

SoftSDC, in communication with the security element (a card issued by Tax Authority located in the card reader), performs receipt signing, based on invoice request received from POS and verified. Note: SoftSDC applies and calculates taxes as per rates that coresponds to the tax labels sent by POS and also rounds all amounts to 4 decimal places, using the half-round up method.

Step 2: Temporary Storage

SoftSDC temporarily stores the receipt in its internal permanent memory (memory that is not erased when the device is turned off) and SE increases the amount of unconfirmed receipts by the amount of the fiscalized receipt.

On the Home screen of SoftSDC, information is available about the total amount of unconfirmed receipts.

Step 3: Reporting to Tax Authority

If an internet connection is available, SoftSDC reports the receipt to Tax Authority. Otherwise, SoftSDC will periodically attempt to send the receipt until it succeeds.

After the receipt is reported to Tax Authority (in the same format defined by technical guideline), it becomes available on the Portal but is still stored on the device and counted in the total sum of unconfirmed receipts.

Step 4: Reconciliation

Periodically, approximately every 15-20 minutes, SoftSDC performs reconciliation of receipts reported up to that point with TaxCore if an internet connection is available.

After successful reconciliation, receipts confirmed by TaxCore are:

  • Deleted from the device's permanent memory
  • SE reduces the amount of those receipts from the total sum of unconfirmed receipts

Step 5: Confirmation

When all receipts are confirmed, which usually happens within 15-20 minutes during which no receipts were issued, the status of unconfirmed receipts on the Home page will show 0.00 amount.

Handling Receipt Confirmation Issues

According to the design of the TaxCore fiscalization system, receipt reconciliation (step 4 and step 5) is not possible if one or more previous receipts are missing.

When This Can Happen

During regular system operation, this situation never occurs, but in practice it can happen in certain unforeseen situations that a receipt is fiscalized (step 1) but not saved to the device's permanent memory (step 2).

This can happen in the following situations:

  1. Device malfunction
  2. Device shutdown - Turned off by user, battery depletion, power outage between step 1 and step 2
  3. Card reader error - The card fiscalizes the receipt in step 1 but reports an error to the SoftSDC application

Impact and Resolution

If this situation occurs:

  • All future receipts will not be confirmed
  • The sum of unconfirmed receipts will grow in the future
  • SoftSDC will continue to report all receipts to Tax Authority
  • Receipts will be available for review on the TaxCore portal
  • Users can continue to use the system without interruption

In the future, TaxCore plans system modifications to prevent such situations in most cases.

Time Accuracy

For proper functioning of receipt fiscalization, it is very important that the real-time clock on the device shows accurate time at all times.

Real-Time Clock (RTC)

Every PC on which SoftSDC is installed contains a Real Time Clock (RTC) implemented in the hardware:

  • This clock runs continuously
  • Provides time to the operating system clock when the computer is booted
  • The RTC runs off the same power source as the system BIOS
  • Real-time clock should not differ by more than 3 minutes maximum per year at an ambient temperature of 20 degrees Celsius

Time Synchronization

Operating systems (Android, Windows, Linux) have built-in support for automatic time synchronization via the internet. In cases where internet is only occasionally available, it is necessary to regularly check the accuracy of the real-time clock.

Built-in Checks

SoftSDC has built-in additional checks for whether time deviates from expected values:

  • Checking whether the time of the previous receipt is not newer than the current time
  • Certificate validity date verification
  • And more...

IMPORTANT: Never change the date and time settings on the computer running S-SDC service. The accurate date and time of invoice issuance is critically important. Issuing invoices with incorrect date and time could result in legal consequences.

Working with incorrect time can lead to situations where receipt fiscalization is incorrect or disabled.

Local Receipt Reading

The local reading process enables the transfer of unconfirmed receipts in cases when internet connection is not available for extended periods at the point of sale.

Process Steps

  1. Connect a USB disk to the device
  2. A notification appears (on Android devices) or window (on PC Windows and Linux) to start copying receipts
  3. After copying is complete, an appropriate notification appears
  4. USB disk should be properly ejected
  5. Files transferred to the USB disk should be uploaded to the Tax Authority portal

This ensures business continuity even in environments with limited or no internet connectivity.