Prerequisites
Before you begin, ensure you have:- A Billing Session ID, Subscription ID, or Mandate ID
- Your TransactBridge Publishable Key
- A Session Token returned when creating a Billing Session, Subscription, or Mandate
API Reference
View the API documentation
1. Load the SDK
To manually load Checkout.js, simply add the script link to the <head> of any page.2. Initialize TBDropin
Initialize the SDK using your publishable key and mode (sandbox or production).3. Create payment components
Create container elements in your HTML where components will be mounted.4. Mount components into the DOM
All payment fields are created using TBDropin.create() and attached to the DOM using mount(). Card Payment Components5. Trigger payment using pay()
Once components are valid, call pay().Response
pay() returns a promise that resolves with the transaction initiation status. Example Success ResponseNote: The pay() method initiates the payment flow and returns the transaction
state. The final payment outcome (Success or Failed) is determined through the
payment status flow and status events.