The JS library provides a diagnostic function that lets the POS check whether a given terminal is currently paired to and reachable by the POS. This is particularly useful where multiple terminals are paired to the POS and it needs to determine their status, and it's also helpful diagnostically — it helps identify any offline, disconnected, or unpaired terminals.
terminalInfo() is only available with the headless JS library: <script src="https://iclient.tyro.com/iclient-v1.js" type="text/javascript"></script>
terminalInfo(responseReceivedCallback, requestParams) — callback invoked when the terminal responds, called with a single object containing the following properties.
Parameters:
requestParams (Object) — an object containing the following parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
tid | Integer | Override the configured tid for multi-merchant terminals or if your browser does not support local storage. | Yes |
mid | Integer | Override the configured mid for multi-merchant terminals or if your browser does not support local storage. | Yes |
integrationKey | String | Supply the integration key if your browser does not support local storage. | Yes |
responseReceivedCallback (Function) — a callback invoked to indicate the status of a pairing.
The JS library captures all the interactions between the EFTPOS terminal and the POS, along with the POS information, in the form of logs. Contact Tyro customer support for assistance understanding these log messages. The POS has to embed the iClient logs URL https://iclientsimulator.test.tyro.com/logs.html in an iframe in its POS or PMS application.
To learn more about the implementation of embedded pairing (see Pairing) and embedded iClient logs:
Don't click Save if you make changes in the JS Fiddle — click Run instead. Clicking Save may break the fiddle's functionality.