fiskaly Java/JRE SDK

fiskaly Cloud-TSE SDK for Java/JRE

License

License

GroupId

GroupId

com.fiskaly.sdk
ArtifactId

ArtifactId

fiskaly-sdk
Last Version

Last Version

1.2.200-jre
Release Date

Release Date

Type

Type

jar
Description

Description

fiskaly Java/JRE SDK
fiskaly Cloud-TSE SDK for Java/JRE
Project URL

Project URL

https://github.com/fiskaly/fiskaly-sdk-java
Source Code Management

Source Code Management

https://github.com/fiskaly/fiskaly-sdk-java

Download fiskaly-sdk

How to add to project

<!-- https://jarcasting.com/artifacts/com.fiskaly.sdk/fiskaly-sdk/ -->
<dependency>
    <groupId>com.fiskaly.sdk</groupId>
    <artifactId>fiskaly-sdk</artifactId>
    <version>1.2.200-jre</version>
</dependency>
// https://jarcasting.com/artifacts/com.fiskaly.sdk/fiskaly-sdk/
implementation 'com.fiskaly.sdk:fiskaly-sdk:1.2.200-jre'
// https://jarcasting.com/artifacts/com.fiskaly.sdk/fiskaly-sdk/
implementation ("com.fiskaly.sdk:fiskaly-sdk:1.2.200-jre")
'com.fiskaly.sdk:fiskaly-sdk:jar:1.2.200-jre'
<dependency org="com.fiskaly.sdk" name="fiskaly-sdk" rev="1.2.200-jre">
  <artifact name="fiskaly-sdk" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.fiskaly.sdk', module='fiskaly-sdk', version='1.2.200-jre')
)
libraryDependencies += "com.fiskaly.sdk" % "fiskaly-sdk" % "1.2.200-jre"
[com.fiskaly.sdk/fiskaly-sdk "1.2.200-jre"]

Dependencies

runtime (3)

Group / Artifact Type Version
com.google.code.gson : gson jar 2.8.6
net.iharder : base64 jar 2.3.9
net.java.dev.jna : jna jar 5.5.0

Project Modules

There are no modules declared in this project.

fiskaly SDK for Java/JRE and Java/Android

The fiskaly SDK includes an HTTP client that is needed1 for accessing the kassensichv.io 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).

Features

  • 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)

Integration

Maven / Gradle

The fiskaly Java SDK is available via Maven.

JRE (version 1.6+)

Add the following to your build.gradle:

dependencies {
    implementation 'com.fiskaly.sdk:fiskaly-sdk:1.2.200-jre'
}

Additionaly to the SDK, you'll also need the fiskaly client. Follow these steps to integrate it into your project:

  1. Go to https://developer.fiskaly.com/downloads
  2. Download the appropriate client build for your platform
  3. Move the client into your project output directory or somewhere within the OS search path

Android

First of all, download the fiskaly Client for android (e.g. com.fiskaly.client-android-all-v1.2.200.aar) and copy the Android Archive to app/libs/

Then, add the following to your app/build.gradle:

dependencies {
    implementation 'com.fiskaly.sdk:fiskaly-sdk:1.2.200-android'
    implementation files('libs/com.fiskaly.client-android-all-v1.2.200.aar')
}

Usage

Demo

package com.fiskaly.sdk.demo.jre;

import com.fiskaly.sdk.*;

public class Main {
    public static void main(String[] args) throws Exception {
        final String apiKey = System.getenv("FISKALY_API_KEY");
        final String apiSecret = System.getenv("FISKALY_API_SECRET");
        final FiskalyHttpClient client = new FiskalyHttpClient(apiKey, apiSecret, "https://kassensichv.io/api/v1");
        final FiskalyHttpResponse response = client.request("GET", "/tss");
        System.out.println(response);
    }
}

Proguard Configuration

-keep class com.sun.jna.* { *; }
-keepclassmembers class * extends com.sun.jna.* { public *; }

Client Configuration

The SDK is built on the fiskaly Client which can be configured through the SDK.

Related

com.fiskaly.sdk

fiskaly

fiscalization done right - KassenSichV (Germany) RKSV (Austria) and soon many more

Versions

Version
1.2.200-jre
1.2.200-android
1.2.100-jre
1.2.100-android
1.2.001-jre
1.2.001-android
1.2.000-jre
1.2.000-android
1.1.602-jre
1.1.602-android
1.1.601-jre
1.1.601-android
1.1.600-jre
1.1.600-android
1.1.500-jre
1.1.500-android
1.1.401-jre
1.1.401-android
1.1.301-jre
1.1.301-android