The fiskaly KassenSichV client is 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 (Kassensicherungsverordnung).
Conceptually this client is a thin (convenience) wrapper above the got HTTP client library for Node.js.
This means you will have to look up the API documentation of got to learn how this client is used. From a developer's point of view, the only difference is that you have to require('fiskaly-kassensichv-client')
instead of require('got')
.
- 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.
- [1] compliance regarding BSI CC-PP-0105-2019 which mandates a locally executed SMA component for creating signed log messages.
- Automatic offline-handling (collection and documentation according to Anwendungserlass zu § 146a AO)
$ npm install fiskaly-kassensichv-client
const apiKey = '...' // create your own API key and secret at https://dashboard.fiskaly.com
const apiSecret = '...'
const client = require('fiskaly-kassensichv-client')(apiKey, apiSecret)
const uuid = require('uuid')
async function main() {
const tssId = uuid.v4()
const response = await client({
url: `/tss/${tssId}`,
method: 'PUT',
body: {
state: 'INITIALIZED',
description: 'My first TSS created by the fiskaly KassenSichV Node.js client'
}
})
console.log(response.body)
//=> '{ state: 'INITIALIZED' ...'
}
main().catch(console.error)