kasseneck_api 4.3.0
kasseneck_api: ^4.3.0 copied to clipboard
A Flutter package for interacting with the Kasseneck Cashregister API. By Kreiseck.
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.
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 sameKasseneckApiinstance.
๐ณ 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.