kasseneck_api 4.3.0 copy "kasseneck_api: ^4.3.0" to clipboard
kasseneck_api: ^4.3.0 copied to clipboard

PlatformAndroid

A Flutter package for interacting with the Kasseneck Cashregister API. By Kreiseck.

Kreiseck โ€” Software Solutions

Kasseneck Flutter API

The Austrian RKSV-compliant cash register, right inside your Flutter app.
Issue signed receipts, take card payments and print โ€” in a few lines of Dart.

pub version pub points platform RKSV compliant by Kreiseck


kasseneck_api is the official Flutter client for Kasseneck โ€” a fully RKSV-compliant (Austrian Registrierkassensicherheitsverordnung) point-of-sale backend by Kreiseck Software Solutions. It takes care of the signed Datenerfassungsprotokoll, card-payment terminals, receipt printing and PDF reports, so you can focus on your app.

๐Ÿ”‘ You need an API key & a cashregister token to operate a register. Request yours at office@kreiseck.com ยท kreiseck.com

โœจ Features #

  • ๐Ÿงพ RKSV receipts โ€” standard, cancellation, zero & training; signed JWS chain + QR code
  • ๐Ÿ’ถ All Austrian VAT rates โ€” incl. the new 4.9 % Grundnahrungsmittel rate (from 1 Jul 2026)
  • ๐Ÿช™ Exact money โ€” amounts are integer cents internally (no floating-point drift)
  • ๐Ÿ’ณ Card payments out of the box โ€” Hobex (Cloud & on-terminal HPS), myPOS, GP Tom, SumUp โ€” and any other method via CreditCardProvider.custom
  • ๐ŸŽŸ๏ธ Vouchers โ€” value & promo, sell & redeem, with proportional VAT split
  • ๐Ÿ–จ๏ธ Printing โ€” Bluetooth & Wi-Fi (ESC/POS) plus the myPOS built-in printer
  • ๐Ÿ“ฑ Drop-in receipt widget for on-screen display
  • ๐Ÿ“Š Reports & invoices โ€” daily / monthly PDF
  • ๐Ÿ”— Stripe payment links for remote & online payments

๐Ÿงฉ Requirements #

  • Flutter ยท Dart >= 3.6
  • A Kasseneck API key + cashregister token (โ†’ Kreiseck)
  • An Android device/terminal for card payments & Bluetooth printing

๐Ÿ“ฆ Installation #

dependencies:
  kasseneck_api: ^3.0.0
flutter pub get

๐Ÿš€ Quick start #

import 'package:kasseneck_api/kasseneck_api.dart';
import 'package:kasseneck_api/models/kasseneck_item.dart';
import 'package:kasseneck_api/enums/vat_rate.dart';
import 'package:kasseneck_api/enums/keck_payment_method.dart';

final kasseneck = KasseneckApi(
  apiKey: 'YOUR_API_KEY',
  cashregisterToken: 'YOUR_CASHREGISTER_TOKEN',
);

// A cash sale with two items โ€” prices are integer cents (320 = โ‚ฌ 3.20)
final receipt = await kasseneck.sellReceipt(
  paymentMethod: KeckPaymentMethod.cash,
  customerDetails: ['Max Mustermann'],
  items: [
    KasseneckItem(name: 'Coffee', quantity: 2, vat: VatRate.vat20,      priceCents: 320),
    KasseneckItem(name: 'Bread',  quantity: 1, vat: VatRate.vat4komma9, priceCents: 240),
    // or, if you have euro doubles: KasseneckItem.euro(..., singlePrice: 3.20)
  ],
);

print('Receipt ${receipt?.receiptId} โ€” signed: ${receipt?.signatureSuccess}');

๐Ÿ’ก Models & enums live in their own files โ€” import the ones you use (models/โ€ฆ, enums/โ€ฆ). Payment, refund, cancellation, zero & training receipts all run through the same KasseneckApi instance.

๐Ÿ’ณ Card payments #

Card payments work out of the box with several terminals โ€” and you're never locked in:

Method How
Hobex Cloud kasseneck.hobexPay(...) / hobexRefund(...)
Hobex HPS (local terminal) import 'package:kasseneck_api/hobex_hps.dart'; โ†’ HpsClient
myPOS ยท GP Tom ยท SumUp supported & rendered on the receipt
Any other terminal/method CreditCardProvider.custom โ€” just pass your own card data

Whatever terminal you use, hand the result to sellReceipt(...) as cardPaymentData and it is stored and printed on the receipt.

Example โ€” local Hobex terminal (HPS) โ†’ signed receipt
import 'package:kasseneck_api/hobex_hps.dart'; // HpsClient, TransactionResponse, HobexReceipt

final hps = HpsClient(tid: '3600335'); // TID without leading zero

// 1) Charge the card on the terminal
final res = await hps.payment(amount: 12.50);
if (!res.isApproved) return; // declined -> res.responseCode / res.responseText

// 2) Adapt the terminal result, 3) create the signed receipt
final card = HobexReceipt.fromHps(res);
await kasseneck.sellReceipt(
  paymentMethod: KeckPaymentMethod.creditCard,
  creditCardProvider: card.creditCardProvider, // hobexHps
  cardPaymentId: card.transactionId,
  cardPaymentData: card.toCardPaymentData(),
  items: [KasseneckItem(name: 'Lunch', quantity: 1, vat: VatRate.vat10, priceCents: 1250)],
);

Also available: hps.refund(...), hps.cancel(...), hps.transactionStatus(...), hps.diagnosis(). A declined payment is not an exception โ€” it's res.isApproved == false.

๐Ÿ–จ๏ธ Printing #

// Bluetooth (ESC/POS)
await kasseneck.initBluetoothPrinter(printerAddress: 'AA:BB:CC:DD:EE:FF');
await receipt!.printReceiptBluetooth();

// QR garbled or missing? Printers differ in which command they support:
await receipt.printReceiptBluetooth(qrMode: QrPrintMode.imageBitImage); // or .native

// Wi-Fi
await kasseneck.initWifiPrinter('192.168.0.50', KeckPaperSize.mm80);
await receipt.printReceiptWifi();

// Open the cash drawer
await KasseneckApi.openCashDrawer();

๐Ÿ“ฑ On-screen receipt #

A ready-made widget renders the full receipt (logo, items, VAT table, QR, card details):

KeckReceiptWidget(receipt: receipt);

๐Ÿ“Š Reports & invoices #

final monthly = await kasseneck.downloadMonthlyReport(ReportMonth.now()); // Uint8List (PDF)
final daily   = await kasseneck.downloadDailyReport(DateTime.now());
final history = await kasseneck.getReceipts(start, end);

๐Ÿ‡ฆ๐Ÿ‡น RKSV compliance #

Every receipt is chained and signed (ES256 / JWS) and exposed as the machine-readable QR payload, exactly as required by the Austrian RKSV. Signature-device outages are detected (receipt.signatureSuccess / receipt.isSigFailed) and printed on the receipt.

๐Ÿ—‚๏ธ Versioning #

This package follows semantic versioning โ€” see the CHANGELOG. Latest: 3.2.0 โ€” optional Kreiseck branding at the end of receipts (print, widget & PDF).

๐Ÿ’ฌ Support #

Kreiseck Software Solutions โ€” office@kreiseck.com ยท kreiseck.com

๐Ÿ“„ License #

See LICENSE.

0
likes
150
points
505
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package for interacting with the Kasseneck Cashregister API. By Kreiseck.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_blue_plus, http, my_pos, path_provider, qr, qr_flutter, sumup

More

Packages that depend on kasseneck_api