Skip to main content

Single barcode

To scan only one barcode at a time, you can create a single scanning session. On Android payment terminals S1E Barcode, S1E2L, S1F2L, and S1U2 you can use Terminal API to start a batch barcode scanning session. In the request, you specify how long the barcode scanner stays active. During this time, the scanner scans every barcode that it faces when the terminal operator holds the scan button pressed. You do not need to set up the scanning button in the Customer Area to use this method.

Requirements

Before you begin, take into account the following requirements, limitations, and preparations.

How it works

  1. You send an Admin request to activate the barcode scanner.
  2. The terminal operator presses and holds the barcode scanning button. The scanner scans every barcode that it faces.
  3. You receive an event notification for each scanned barcode.
  4. With the logic that you have created, you pass the content of the event notification to your POS app.
  5. The barcode scanner stops being active:
    • After the specified timeout.
    • When you send an admin request to end the session before the timeout.

Start a batch barcode scanning session

To start a batch barcode scanning session:
  1. Create a JSON object with the following data elements: Activate barcode scanner
  2. Encode the JSON object to Base64. Base64 encoded message
  3. Make a Terminal API admin request, specifying:
    • The standard SaleToPOIRequest.MessageHeader object, with MessageClass set to Service and MessageCategory set to Admin.
    Activate barcode scanner request
    The terminal operator can now start scanning barcodes.
  4. In the AdminResponse, note:
    • If successful, the following fields are returned:
      • Response.Result: Success
      • AdditionalResponse: contains "message": "ScanBarcodeSession request was successfully started".
    • If unsuccessful, the following fields are returned:
      • Response.Result: Failure
      • AdditionalResponse: contains the reason for failure, for example "message": "Admin ScanBarcode request canceled due to Timeout".
    The format of the AdditionalResponse can be a Base64-encoded or URL-encoded. To always receive the AdditionalResponse in one of those formats, contact our Support Team.