Inline SDK Type
The Inline SDK simplifies payment integration by providing a fully functional payment UI with pre-built components. This integration is designed to enhance user experience and reduce development effort while allowing for customization.
Features and Benefits
The Inline SDK delivers powerful features for streamlined payment experiences:
- Pre-Built UI Components: Fully functional payment interface.
- Saved Cards Management: Manage stored cards for returning users.
- Multiple Payment Methods Support: Enable a variety of payment options.
- Built-In Error Handling and Validation: Ensure transactions are smooth and secure.
- Customizable Styling and Layout: Adapt the UI to align with your brand’s design and user needs.
Integration Steps
The following steps show you how to integrate the Inline type into your app:
Setup Tonder Provider
You need to start by setting up Tonder’s Provider into your application. Below are the available base configurations for the Provider:
Property | Type | Required | Description |
---|---|---|---|
mode | 'development' | 'production' | 'sandbox' | Yes | Specifies the environment mode for the SDK. Use development for testing, production for live operations, or sandbox for isolated testing. |
apiKey | string | Yes | Your unique Tonder Public API key used to authenticate SDK requests. |
type | SDKType | Yes | Indicates the integration type. Options: INLINE for inline integration, LITE for lightweight use, or ENROLLMENT for enrollment workflows. |
returnURL | string | No | The URL to redirect users to after completing the 3DS authentication process. |
The following code integrates our provider into the App component:
Remember to add the correct SDK type in the provider configuration.
Obtain a Secure Token
Before initialzing the mobile SDK, your checkout page should obtain the security token for card functionalities (save, delete, list). This should be obtained through your backend for security.
For detailed implementation instructions and best practices, please refer to the How to use SecureToken for secure card saving guide.
Gather Payment and Customer Data
Before creating the mobile SDK, your checkout page should already:
- Show the products being purchased and the total amount.
- Collect any required customer information.
Create the Full Payment Screen
The Full Payment integration provides a complete pre-built UI for payment processing. With a secure token, and the necessary data at hand, you can now create the payment screen.
After these steps, you have completed the integration. The following image exemplifies how the SDK will look in your app:
Inline Methods
The Inline integration provides methods for handling full payment processing with built-in UI components.
create
: Initializes the SDK with configuration.reset
: Resets the SDK state to its initial values and cleans up resources.payment
: Processes a payment using the configured payment data.
The payment function It is only used when you want to control the payment button on your own. Additionally, if there are any changes to the payment or customer data, you can pass the updated data again when calling the function.
The example code below uses the payment function along with the create:
Reference
Find below reference tables and interfaces for the methods and features found at the React Native guides.