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
- You send an Admin request to activate the barcode scanner.
- The terminal operator presses and holds the barcode scanning button. The scanner scans every barcode that it faces.
- You receive an event notification for each scanned barcode.
- With the logic that you have created, you pass the content of the event notification to your POS app.
-
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:-
Create a JSON object with the following data elements:
Activate barcode scanner
-
Encode the JSON object to Base64.
Base64 encoded message
-
Make a Terminal API admin request, specifying:
-
The standard
SaleToPOIRequest.MessageHeaderobject, withMessageClassset to Service andMessageCategoryset to Admin.
The terminal operator can now start scanning barcodes. -
The standard
-
In the AdminResponse, note:
-
If successful, the following fields are returned:
Response.Result: SuccessAdditionalResponse: contains"message": "ScanBarcodeSession request was successfully started".
-
If unsuccessful, the following fields are returned:
Response.Result: FailureAdditionalResponse: contains the reason for failure, for example"message": "Admin ScanBarcode request canceled due to Timeout".
AdditionalResponsecan be a Base64-encoded or URL-encoded. To always receive theAdditionalResponsein one of those formats, contact our Support Team. -
If successful, the following fields are returned:
- Response for starting a scanning session
- Response for failed a batch scanning session
- Event notification of a successful scan
- Event notification of a failed scan
