{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["json-schema"]},"type":"markdown"},"seo":{"title":"Tyro.js","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"tyrojs","__idx":0},"children":["Tyro.js"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tyro.js is a public Javascript library provided by Tyro. It provides a simple interface to enable integration with the Pay API from your frontend code."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"including-tyrojs","__idx":1},"children":["Including Tyro.js"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Include the Tyro.js script on the checkout page of your HTTPS website."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For PCI Compliance, Tyro.js should always be loaded directly from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://pay.connect.tyro.com/v1/tyro.js"]}," rather than included in a bundle or hosted yourself."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"implementation","__idx":2},"children":["Implementation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<!-- HTML sample code -->\n<script src=\"https://pay.connect.tyro.com/v1/tyro.js\"></script>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"instantiate-tyrojs","__idx":3},"children":["Instantiate Tyro.js"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After adding the Tyro.js script tag in the header, we need to instantiate it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Tyro(config)"]}," to create an instance of the Tyro.js object. The Tyro.js object is the entrypoint to the rest of the methods of Tyro.js."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"config-parameters","__idx":4},"children":["Config Parameters"]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"type":"object","properties":{"liveMode":{"type":"boolean","description":"Toggles between the live and sandbox environment. Defaults to false."}},"required":["liveMode"]},"options":{"schemaExpansionLevel":1},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"type":"object","properties":{"liveMode":{"type":"boolean","description":"Toggles between the live and sandbox environment. Defaults to false."}},"required":["liveMode"]}}}},"schemaResolvedErrors":[]},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"implementation-1","__idx":5},"children":["Implementation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"// Javascript sample code\nconst tyro = Tyro({\n  liveMode: false\n});\n","lang":"javascript"},"children":[]}]},"headings":[{"value":"Tyro.js","id":"tyrojs","depth":1},{"value":"Including Tyro.js","id":"including-tyrojs","depth":1},{"value":"Implementation","id":"implementation","depth":2},{"value":"Instantiate Tyro.js","id":"instantiate-tyrojs","depth":1},{"value":"Config Parameters","id":"config-parameters","depth":2},{"value":"Implementation","id":"implementation-1","depth":2}],"frontmatter":{"title":"Set Up Tyro.js","seo":{"title":"Tyro.js"}},"lastModified":"2026-09-01T06:34:43.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/online-payments/pay-online/integration-guide/tyro-js/setup","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}