Skip to main content
TBIframe (Version 1) is a simple JavaScript-based integration that allows merchants to embed Transact Bridge’s hosted payment flow inside an iframe.
This version of the TransactBridge Web SDK has been deprecated and will be removed in a future release. Please use the latest SDK version v1.1 for new integrations.

Setup your development

To manually load Checkout.js, simply add the script link to the <head> of any page.
This version focuses on callback-based communication, where the merchant application listens to important payment events through function parameters passed during initialization. Using v1.0, you can:
  • Open a secure payment iframe
  • Receive payment session updates
  • Track transaction creation
  • Detect when the iframe is closed (manually or automatically) This version is best suited for basic payment flows where advanced event handling or KYC tracking is not required.

Usage

1. Required HTML Structure

Include a Buy Now button, a modal dialog, and an iframe container:
📝 Note: Root element ID must be tb_root — this is where the iframe will be injected.

2. Initialize and Use TBIframe

When the user clicks Buy Now, the following happens:
  1. A TBIframe instance is created.
  2. init() is called with the session URL.
  3. The iframe opens and loads the payment flow.
  4. During the payment lifecycle:
  • onSessionUpdate is called when payment status changes
  • onTransactionUpdate is called when a transaction is initiated
  • onClose is called when the iframe closes
Create an instance and handle the payment session:

TBIframe API Reference

Constructor

  • Initializes the TBIframe instance.

Methods

1. init

Loads the payment iframe and manages session updates and UI customization.
Parameters:
Options TBIframeOptions Properties:
Example:

2. close()

Closes the iframe and removes it from the DOM.
Also triggers the onClose callback if it was provided during init.
Example: