Skip to content
fiskaly KassenSichV client for Java Desktop / Android -
Java Other
  1. Java 98.5%
  2. Other 1.5%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
sma @ d599422

fiskaly KassenSichV client for Java

The fiskaly KassenSichV client is an HTTP client that is needed1 for accessing the API that implements a cloud-based, virtual CTSS (Certified Technical Security System) / TSE (Technische Sicherheitseinrichtung) as defined by the German KassenSichV (Kassen­sich­er­ungsver­ord­nung).

Conceptually this client is a thin (convenience) wrapper around the OkHttp library for Java. This means you will have to look up the API documentation of OkHttp to learn how this client is used. From a developer's point of view, the only difference is that you have to instantiate your OkHttpClient through the ClientFactory provided by the SDK.

Be sure to have a look at our integration guide / tutorial.


  • Automatic authentication handling (fetch/refresh JWT and re-authenticate upon 401 errors).
  • Automatic retries on failures (server errors or network timeouts/issues).
  • Automatic JSON parsing and serialization of request and response bodies.
  • Future: [1] compliance regarding BSI CC-PP-0105-2019 which mandates a locally executed SMA component for creating signed log messages.
  • Future: Automatic offline-handling (collection and documentation according to Anwendungserlass zu § 146a AO)

Build project

First of all, you have to initialize the required git submodule(s) using:

$ git submodule update --init

The project uses Gradle as a build and dependency management tool. In order to build the project, use the following command:

$ ./gradlew jar

This will result in multiple JAR-files for each sub-project that can be used in your project.

Each built library will be available at <sub-project-name>/build/libs/<sub-project-name>-<version>.jar.


Be sure to have a look at our integration guide / tutorial.

To integrate the client into your project, use the appropriate client build for your target platform.

  • client/build/libs/com.fiskaly.kassensichv.client.general-<version>.jar for standard Java platforms
  • client/build/libs/<version>.jar for Android

Usage example

The following example demonstrates how to instantiate an OkHttpClient using the SDK as well as how to issue requests against the KassenSichV-API.

public class Main {
  // com.fasterxml.jackson.databind.ObjectMapper
  private static final ObjectMapper mapper = new ObjectMapper(); 

  public static void Main(String[] args) {
    // Instantiate the appropriate SMA implementation for your target platform
    GeneralSMA sma = new GeneralSMA();

    // Instantiate the OkHttpClient using the provided Factory class
    OkHttpClient client = ClientFactory.getClient(apiKey, apiSecret, sma);

    // Create a basic TSS

    Map<String, String> tssMap = new HashMap<>();

    tssMap.put("state", "INITIALIZED");
    tssMap.put("description", "An example TSS");

    String jsonBody = mapper.writeValueAsString(tssMap);

    RequestBody body = RequestBody.create(jsonBody, MediaType.parse("application/json"));
    UUID uuid = UUID.randomUUID();

    Request request = new Request
        .url("" + uuid)

    Response response = client

Enable Offline Functionality (Beta)

To enable offline functionality, use this factory call to instantiate an OkHttpClient:

OkHttpClient betaClient = ClientFactory.getPersistingClient(apiKey, secret, sma, persistenceStrategy);

The PersistanceStrategy interface defines a contract for a concrete persistence implementation (read more about the strategy pattern here).

A demo implementation for standard JVM platforms based on SQLite can be found in


You can’t perform that action at this time.