Explanation of the event

The scanCode event occurs whenever a code of any kind is scanned in MplusKASSA. This can be a barcode, a RFID chip or a QR code.

When you subscribe to this event, you can specify regex-based filter patterns to only receive certain kind of codes. For example, to receive only barcodes that start with 25, define the pattern 25.*.

When you respond with a recognized-value of true, we will not try to match the scanned code in our own system. This allows you to override our default code scanning behaviour.

scanCode A barcode is scanned


This event occurs when a barcode labeled “2512345678901” is scanned at workplace 1.1.

Property Type Explanation
scanCode.scannedCode string A textual representation of the code that was scanned.
scanCode.codeType string barcode, rfid, qrcode


In the response, you can show whether or not you recognized the code. But you can also make changes to the session. For example, apply an external discount.

Property Type Explanation
scanCode.recognized boolean Did you recognize the code or not?
scanCode.message text A message to show on the cashier side.
scanCode.customerMessage text A message to show on the customer side (displayed if applicable).
scanCode.relationNumber bigint Specificy to automatically load this relation into the software. The relation must already be present in the MplusKASSA administration.
lineChanges.lineId uuid The UUID of the session line that you want to change.
lineChanges.externalDiscount.discountId uuid This is an UUID you
generate and store to remember that you applied this discount.
lineChanges.externalDiscount.discountPercentage number The discount percentage that you want to apply to the line.
lineChanges.externalDiscount.discountDescription text A descriptive text for the discount.