Skip to content

Quick Start

fiskaly provides fiscal compliance APIs across Europe. Choose your country below to jump straight to the integration guide, or scroll down for a hands-on SIGN DE walkthrough.


The walkthrough below uses Germany (SIGN DE) as a concrete example. The flow is: authenticate → create a TSS → sign a transaction.

Time to complete: ~5 minutes with cURL, ~15 minutes if you are building it into application code.

You need three things before you start:

  1. A fiskaly account — register free at hub.fiskaly.com
  2. API credentials — generate an API Key and Secret in the HUB under your organization
  3. An HTTP client — cURL, Postman, or your language’s HTTP library

This guide uses the sandbox (TEST) environment. All new organizations start here. No real fiscal data is created, and you will not be billed.

Sandbox (TEST)Production (LIVE)
Base URLhttps://kassensichv-middleware.fiskaly.com/api/v2https://kassensichv.fiskaly.com/api/v2
DataEphemeral — safe to experimentPermanent — audit-relevant
BillingFreePer contract
SwitchingDefault for new orgsEnable via HUB

Exchange your API key and secret for a Bearer token.

curl -X POST https://kassensichv-middleware.fiskaly.com/api/v2/auth \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "api_secret": "YOUR_API_SECRET"
  }'

Expected response (200 OK):

{
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"access_token_expires_in": 86400,
"refresh_token": "eyJhbGciOiJSUzI1NiIs...",
"refresh_token_expires_in": 172800
}

The access_token is valid for 24 hours. The refresh_token is valid for 48 hours. Include the access token as Authorization: Bearer <token> in all subsequent requests.

A TSS (Technical Security System) is the certified signing resource. You need one per physical location. Creating a TSS involves three sub-steps: create, set Admin PIN, and initialize.

a) Create the TSS

TSS_ID=$(uuidgen)

curl -X PUT "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "My first TSS"
  }'

Expected response (200 OK) — note the admin_puk field:

{
"_id": "a1b2c3d4-...",
"description": "My first TSS",
"state": "UNINITIALIZED",
"admin_puk": "123456"
}

b) Set the Admin PIN (using the admin_puk from the response above):

curl -X PATCH "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}/admin" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "admin_puk": "123456",
    "new_admin_pin": "your-secure-admin-pin"
  }'

c) Authenticate as Admin and initialize:

# Authenticate as admin
curl -X POST "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}/admin/auth" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ "admin_pin": "your-secure-admin-pin" }'

# Initialize the TSS
curl -X PATCH "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ "state": "INITIALIZED" }'

After initialization, the TSS state changes to INITIALIZED. You are ready to create clients and sign transactions.

A client represents a single POS terminal or application instance connected to the TSS.

CLIENT_ID=$(uuidgen)

curl -X PUT "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}/client/${CLIENT_ID}" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{ "serial_number": "POS-001" }'

Transactions have a lifecycle: start (state ACTIVE) then finish (state FINISHED). The finish response contains the cryptographic signature.

a) Start the transaction:

TX_ID=$(uuidgen)

curl -X PUT "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}/tx/${TX_ID}?tx_revision=1" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "ACTIVE",
    "client_id": "YOUR_CLIENT_ID"
  }'

b) Finish the transaction (this is where the signature is generated):

curl -X PUT "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}/tx/${TX_ID}?tx_revision=2" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "state": "FINISHED",
    "client_id": "YOUR_CLIENT_ID",
    "schema": {
      "standard_v1": {
        "receipt": {
          "receipt_type": "RECEIPT",
          "amounts_per_vat_rate": [
            { "vat_rate": "NORMAL", "amount": "10.00" }
          ],
          "amounts_per_payment_type": [
            { "payment_type": "CASH", "amount": "10.00" }
          ]
        }
      }
    }
  }'

Expected response (200 OK) — the key fields are signature and qr_code_data:

{
"_id": "tx-uuid-...",
"state": "FINISHED",
"number": 1,
"time_start": 1700000000,
"time_end": 1700000001,
"signature": {
"value": "dGVzdC1zaWduYXR1cmU=",
"algorithm": "ecdsa-plain-SHA384",
"counter": 1,
"public_key": "BHHz..."
},
"qr_code_data": "V0;TSS-ID;TX-NUMBER;..."
}

The qr_code_data string is what you encode into the QR code printed on the receipt.

After setup is complete, log the admin out of the TSS:

Terminal window
curl -X POST "https://kassensichv-middleware.fiskaly.com/api/v2/tss/${TSS_ID}/admin/logout" \
-H "Authorization: Bearer ${ACCESS_TOKEN}"
ErrorCauseFix
401 UnauthorizedExpired or incorrect tokenRe-authenticate with /auth. Check that you are using the correct API key for this environment.
400 E_TSS_NOT_INITIALIZEDTried to create a client or transaction on an uninitialized TSSComplete all three TSS setup steps: create, set Admin PIN, initialize.
400 with “admin_puk” errorWrong PUK when setting Admin PINUse the admin_puk value from the TSS creation response, not a value you chose.
409 ConflictReused a UUID that already existsGenerate a new UUID for each resource (TSS, client, transaction).
422 E_TX_INVALID_STATETried to finish a transaction that is not ACTIVEStart the transaction first (revision 1 with state: ACTIVE), then finish (revision 2).

For the complete error reference, see Error Codes.

If you prefer a GUI-based workflow, download the pre-configured Postman collection:

  1. Download

    Get the Postman Collection and Environment files.

  2. Import

    Import both files into Postman.
  3. Configure

    Set your api_key and api_secret in the environment variables.

  4. Run

    Execute the requests in order — the collection uses variables to chain responses automatically.

See the full Postman Tutorial for a detailed walkthrough.

Was this page helpful?