Skip to main content
Integrate TBDropin into your website in minutes. This guide provides a step-by-step walkthrough to help you integrate TBDropin into your website or application within minutes. You’ll learn how to load the SDK, initialize it, mount payment components, and trigger a payment.

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
You can obtain all the required credentials and payment identifiers from the TransactBridge platform and APIs. Refer to the documentation below.

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 Components
Terms & Conditions Use the TNC component to display Terms & Conditions and capture user consent before initiating payment. A component used to render Terms & Conditions text along with a configurable Pay button label.

5. Trigger payment using pay()

Once components are valid, call pay().

Response

pay() returns a promise that resolves with the transaction initiation status. Example Success Response
Example Failed Response
Note: 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.
Next Steps Need Help? If you need assistance, our support team is here to help 🚀