1. Prerequisites
Before you begin, ensure you have:- A Billing Session ID, Subscription ID, or Mandate ID
2. Initialize TBDropin
Initialize the SDK using your publishable key and session identifier. Setup for sandbox3. Initialize the SDK
Initialize the SDK using your publishable key and session identifier.| Environment | Type | Description |
|---|---|---|
| publishableKey | string | Your TransactBridge publishable key |
| sessionId | string | Billing Session / Subscription / Mandate ID |
3. Mount Payment Components
Create container elements in your HTML where components will be mounted.4. Create & Mount Components
All payment fields are created using TBDropin.create() and attached to the DOM using mount(). Card Payment ComponentsCard Number Object
Card Expirey Object
Card CVV Object
Card Holder Object
| Field | Type | Description |
|---|---|---|
| element | string | Component identifier |
| value | object | Component-specific data returned by the field |
| isValid | boolean | Field-specific value |
| error | object | null or Validation error (if any) |
| componentUrl | string | Hosted component URL |
UPI Collect Object
| Field | Type |
|---|---|
| upiId | string |
5. Terms & Conditions
Each component emits updates whenever the user types or validation changes.6. Customization & Configuration Options
TBDropin allows you to customize the appearance and behavior of all components using configuration objects. These options can be reused across Card, UPI, and Popup components. Fonts Configuration You can load and use custom fonts inside TBDropin components.- tb_cardNumber
- tb_cardHolder
- tb_cardExp
- tb_cardCvv
- tb_upiCollect
- Adjust spacing
- Match your design system
- Avoid iframe overflow issues
| Option | Purpose |
|---|---|
| fonts | Load and apply custom fonts |
| inputStyle | Style input fields |
| frameStyle | Style iframe container |
| iconConfig | Customize / hide icons |
| popupConfig | Customize payment popup |
7. Triggering a Payment
Once components are valid, call pay().- A Customize component styles
- Add multiple payment methods using tabs
- Handle payment confirmation on backend
- Set up webhooks for payment status
- API Reference
- Customization
- Examples
- FAQ