Link https://widget.transactionlink.io/transactionlink-widget.umd.js to the file:
It should be located at the end of the file
Or added dynamically after completing points 1 and 2.
// Create a script elementconstscript=document.createElement('script');// Set the source attribute to the URL of the scriptscript.src='https://widget.transactionlink.io/transactionlink-widget.umd.js';// Append the script element to the document's headdocument.head.appendChild(script);
Simple code example:
Advanced code example:
Content Security Policy
To enhance security, include the following Content Security Policy (CSP) directive headers in the index.html file, within the tag:
WebView Support
Our widget is not fully supported in WebView environments, such as in-app browsers or embedded mobile views.
Due to technical limitations specific to WebViews, the widget may not function correctly. Examples include:
issues with document input handling,
unintended widget refresh after the app enters idle/sleep mode,
inconsistent camera behavior in third-party integrations on Android and iOS,
inability to open certain integrations in a new browser tab.
For the best experience, please ensure the widget is opened in a standard system browser (Safari, Chrome, Firefox, Edge).