- 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 Intent
- UPI QR
- Card Number
- Card Holder Name
- Card Expiry
- Card CVV
- Payment status popup (success, failure, processing)
- Compliance Checks (rendered only when required)
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_upiIntent -
tb_upiQr -
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. The Compliance Checks are also rendered inside a secure iframe when compliance information is required for a payment. 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:How Compliance Flow works
Some payment sessions may require additional customer information before payment can be initiated. When compliance is required, the SDK automatically opens a secure Compliance Check popup. The SDK:- Detects whether compliance is required.
- Displays the Compliance Check automatically.
- Collects the required customer information securely.
- Continues the payment automatically after successful submission.
- 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 -
sessionToken
For Drop-in integration, do not reuse the same session token for every
request. Always use the latest session token generated for each new session,
as session tokens are unique and valid only for their respective session
One Time Payment API Docs
View the Postman API Collection