InlineCheckout) for web applications. You’ll learn how to initialise the SDK, configure payment data, display the checkout interface, and handle the complete payment flow including 3D Secure verification.
The JS Inline SDK is designed for quick, single-transaction payments and does not directly expose methods for enrolling or managing saved cards. Its primary purpose is to provide a complete, out-of-the-box checkout UI.To securely save and manage customer payment methods, you must use the JS Lite SDK, which provides the necessary methods and requires a custom UI.
Prerequisites
Before you can process payments with the Tonder JS Inline SDK, ensure you have completed the necessary setup and have the required components in place.- You have successfully installed the Tonder JS SDK.
- You have a checkout page on your website with an empty
divand a button.
div with the tonder-checkout ID will serve as the container where the payment form will be rendered, while the button will trigger the payment process.
Payment Integration Steps
Follow these steps to integrate payment processing into your web application. This process involves initialising the SDK, configuring payment data, displaying the checkout interface, and processing the transaction.Step 1: Initialize the SDK
Create an instance of theInlineCheckout class to establish a secure connection with Tonder’s payment services. This initialisation configures the SDK with your API credentials and sets up the operating mode for your environment. Finally, the initialization should mention the optional signatures parameter for HMAC validation.
Step 2: Inject the Checkout UI
Render the pre-built checkout interface within your designated container. TheinjectCheckout() method creates and displays the complete payment form with card input fields, validation, and styling.

Step 3: Process the Payment
Configure the payment processing by adding an event listener to your payment button. When clicked, the SDK will collect the payment data and initiate the secure transaction process.Step 4: Handle 3DS Verification
If a 3D Secure challenge is required, the SDK will automatically handle the redirection process. After the user returns to your returnUrl, callverify3dsTransaction() to get the final transaction status.
Next Steps
Now that you’ve successfully integrated payment processing into your web application, explore these advanced features to enhance your payment experience:- Explore the available SDK methods for advanced payment operations.
- Customise the SDK appearance and behavior to match your website’s design.
- Learn how to enroll payment methods for returning customers using the JS Lite SDK.

