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.3.Inject the Dropin SDK
4. 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 |
5. Mount Payment Components
Create container elements in your HTML where components will be mounted.6. 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 |
7. Terms & Conditions
Each component emits updates whenever the user types or validation changes.8. 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
- 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 |
9. Triggering a Payment
Once components are valid, call pay().| Field | Type | Description |
|---|---|---|
| billingSessionId | string | Used for one-time payments. |
| subscriptionId | string | Used for recurring payments (subscriptions). |
| mandateId | string | Used during mandate setup for recurring payments. |
| sessionToken | string | Token received after creating a payment session; required to proceed with payment. |
| payMethod | Component | Payment component/interface used to process the transaction. |
| cardType | string | Type of card: CC (Credit Card) or DC (Debit Card). |
| updateMandateRequired | boolean | Set to true when a subscription is upgraded or downgraded and a new mandate setup is required. Use only with subscriptionId. |
- 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