- Collect payment details securely
- Trigger payments with a unified pay() API
What does the Drop-in SDK provide?
The Drop-in SDK offers a set of ready-to-use payment elements, including:- UPI Collect
- Card Number
- Card Expiry
- Card CVV
- Card Holder Name
- Payment status popup (success, failure, processing)
How TBDropin Works
TBDropin follows a component-based architecture similar to modern payment element SDKs.- Load the SDK
- Initialize TBDropin
- Create payment components
- Mount components into the DOM
- Trigger payment using pay()
Key Concepts
1. Initialization
Before using any component, the SDK must be initialized.- Sets the environment (sandbox / production)
- Loads payment atom definitions
- Prepares secure message handling between iframes
2. Payment Components (Elements)
TBDropin provides individual payment elements, such as:-
tb_upiCollect -
tb_cardNumber -
tb_cardExp -
tb_cardCvv -
tb_cardHolder -
tb_tnc
-
Is created using
TBDropin.create() - Is mounted into a DOM container
-
Emits lifecycle events like
ready,change,clear
3. Component Lifecycle & Events
Every component exposes event hooks:4. Secure Iframe Architecture
All payment fields are rendered inside secure iframes created by the SDK. Benefits:- PCI compliance
- No raw card / UPI data exposed to merchant
- Isolated DOM & styles
- Safe cross-origin communication via postMessage
- Iframe creation
- Styling constraints
- Event communication
- Data aggregation during payment
5. Making a Payment
Once the required components are mounted and valid, payment is initiated using:- Exactly one of billingSessionId, subscriptionId, or mandateId is required
- T&C (tb_tnc) must be visible and accepted
- All required inputs must be valid before payment proceeds
6. Getting Required IDs for Payment
Before callingTBDropin.pay(), merchants must obtain one of the following identifiers from the Transact Bridge APIs:
-
billingSessionId -
subscriptionId -
mandateId
One Time Payment API Docs
View the Postman API Collection