Setup your development
To manually load Checkout.js, simply add the script link to the <head> of any page.Overview
TBIframe v1.1 introduces an event-driven architecture using.on() and .off().
This version supports:
- Multiple event listeners
- KYC lifecycle tracking
- Popup & redirection handling
- Better iframe lifecycle control
Required HTML Elements
Make sure to add the following elements to your page:
Note: Root container must have the ID tb_root.
Quick Start Example
⚠️ Important Note on Mandatory Handlers
Currently, the following handlers are mandatory parameters when callinginit():
onSessionUpdateonCloseonTransactionUpdate
🔄 Upcoming Change (Future Versions)
In a future release, these handlers will no longer be required in theinit() method.
Instead, all event subscriptions will be handled exclusively using the event-driven pattern:
1. Create Instance ( Constructor ).
2. Initialization & Its Behavior
Theinit() method can only be executed once per TBIframe instance.
If you need to load a new session, create a new instance.
Parameters for init(...):
Options (TBIframeOptions)
3. Register Handlers using on
Parameters for on(...):
4. Remove Handlers using off
Parameters for off(...):
close()
Closes the iframe manually and triggers the onClose callback (if set).
Handler Reference
Functions that can be registered using the on method.
Example Output
Notes
- The
tb_rootcontainer must be present in your DOM for the iframe to be injected. - You must provide a valid session URL for payments to work.