{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Get started with the JS library","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"get-started-with-the-js-library","__idx":0},"children":["Get started with the JS library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Getting started with development for the JS library has four main steps:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the prerequisites."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Include the JS library."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Pair with the integration server simulator."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Register your POS software."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For step 4, check the certification criteria for the specific requirements around the POS"," ","Information fields and API key configuration:"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/assets/certification_criteria_iclient_retail_hospitality.7bf0b2b5462961db882fcba1f1e9ddbec0d942cc7ee96278907994599bebf62a.d564e73d.pdf"},"children":["Certification Criteria Document"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"js-library-api-reference","__idx":1},"children":["JS library API reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For a sample HealthPoint claiming code: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/assets/iclient-api.57e262928075df78cfa8a01bd63db2f4b79b8d58736bbb024a56daa62cd686fe.fbf1555a.zip"},"children":["JS library API reference"]},"."," ","After downloading the zip, unzip it and open the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iclient-api"]}," folder, then ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["index"]},". Under APIs in"," ","the top-left corner, click Classes, then ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TYRO.IClientWithUI"]},", scroll down to the index and method"," ","tabs, and click index."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"checking-for-prerequisites","__idx":2},"children":["Checking for prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before getting started, make sure the following prerequisites are met:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use a compatible browser for development. The JS library is only compatible with:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Google Chrome"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Mozilla Firefox"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Safari"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Microsoft Internet Explorer"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Microsoft Edge"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When using the integration server simulator, you'll also need your allocated Merchant ID (MID)"," ","and Terminal ID (TID) combination to pair with it. Reach out to the POS Integration team via"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"mailto:integrationsupport@tyro.com"},"children":["email"]}," and they'll provide the allocated pairing"," ","credentials."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"including-the-js-library","__idx":3},"children":["Including the JS library"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Headful library"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"<script type=\"text/javascript\" src=\"{Base URL}/iclient-with-ui-v1.js\"></script>\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Headless library"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"<script type=\"text/javascript\" src=\"{Base URL}/iclient-v1.js\"></script>\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["During testing and development, set the base URL to https://iclientsimulator.test.tyro.com"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The simulator uses pre-configured magic values to replicate specific scenarios in the transaction"," ","lifecycle — see them ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://integrationsimulator.test.tyro.com/docs/"},"children":["here"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once certified and live, your POS integration uses https://iclient.tyro.com as the base URL."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pairing-to-the-integration-server-simulator","__idx":4},"children":["Pairing to the integration server simulator"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pairing uses a MID and TID combination, provided to you by the Tyro POS integration team. The"," ","pairing request is initiated from an embedded pairing URL — this configuration page must be"," ","embedded in an iframe in the POS — found"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://iclientsimulator.test.tyro.com/configuration.html#expert"},"children":["here"]},". Once you start a"," ","pairing request, it needs to be confirmed physically on the terminal, and the pairing page then"," ","gets a response confirming the pairing."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/pairing.c0c09c0ec8540f935ffe1c9811ebc1203a301f0d57f5f7057939b8bd42c0fc61.68286485.png","alt":"Configuration page"},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the user clears local storage in the browser, the pairing details are deleted and the terminal"," ","needs to be re-paired."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/pay-in-person/integration-guide/js-library/pairing"},"children":["Pairing"]}," for the full pairing mechanism, including the alternative headless"," ","pairing API."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"registering-your-pos-software","__idx":5},"children":["Registering your POS software"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using the JS library, register your POS software using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POSInformation"]}," method, so the"," ","correct and relevant information about your POS integration is returned to the Tyro servers in"," ","integration requests. This helps Tyro identify integration requests and aids the support team in"," ","resolving any issues that come up in production. The specification and example for the headful and"," ","headless library are given below."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"headful-library","__idx":6},"children":["Headful library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Specification:"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TYRO.IClientWithUI(apiKey, posProductData)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiKey"]}," (String) — the API key provided by Tyro (not validated in test environments)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductData"]}," — an object containing the following properties (final values to be confirmed"," ","by Tyro):"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductVendor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of your company."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of your product."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductVersion"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Version of your product."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"var iclient = new TYRO.IClientWithUI(\"apiKey\", {posProductVendor: \"Awesome POS CO\", \nposProductName: \"AwesomePOS\", posProductVersion: \"1.0.1\"}); \n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"headless-library","__idx":7},"children":["Headless library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Specification:"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TYRO.IClient(apiKey, posProductData)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiKey"]}," (String) — the API key provided by Tyro (not validated in test environments)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductData"]}," — an object containing the following properties (final values to be confirmed"," ","by Tyro):"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductVendor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of your company."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of your product."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posProductVersion"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Version of your product."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All parameters are mandatory."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"working-example","__idx":8},"children":["Working example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A JS Fiddle example demonstrating the POS information being set in the method, then retrieved"," ","from the iClient object and displayed when the \"Show POS Information\" button is clicked:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://jsfiddle.net/IntegrationSupport/v581uceo/"},"children":["JS Fiddle demo"]}]}]},"headings":[{"value":"Get started with the JS library","id":"get-started-with-the-js-library","depth":1},{"value":"JS library API reference","id":"js-library-api-reference","depth":2},{"value":"Checking for prerequisites","id":"checking-for-prerequisites","depth":2},{"value":"Including the JS library","id":"including-the-js-library","depth":2},{"value":"Pairing to the integration server simulator","id":"pairing-to-the-integration-server-simulator","depth":2},{"value":"Registering your POS software","id":"registering-your-pos-software","depth":2},{"value":"Headful library","id":"headful-library","depth":3},{"value":"Headless library","id":"headless-library","depth":3},{"value":"Working example","id":"working-example","depth":2}],"frontmatter":{"title":"Get started with the JS library","seo":{"title":"Get started with the JS library"}},"lastModified":"2026-09-20T23:33:08.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/in-person-payments/pay-in-person/integration-guide/js-library/get-started","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}