Flutter SDK Full
The Tonder Flutter SDK Full is a solution for integrating our system into your mobile application. This solution ensures PCI DSS (Payment Card Industry Data Security Standard) by securely collecting and tokenizing sensitive data in the browser, without exposing your front-end infrastructure to any sensitive data.
Integrating Tonder is made effortless with our Full SDK. Our SDK offers complete checkout and enrollment flows, making integration, maintenance, and operational efforts minimal.
This guide will walk you through all the steps, from installation and configuring our SDK to fit your application.
Installation
Tonder’s Flutter SDK Full can be installed using the following command:
Requirements
You need to add the following code blocks to android.build.gradle
and android.gradle.properties
to be able to use the SDK:
- Add to
android.build.gradle
:
- Add to
android.gradle.properties
:
Configuration
With Tonder’s SDK installed, and requirements met, you are ready to configure and use the SDK. The following step-by-step process takes you through everything, from starting a new instance, to performing a new transaction using the needed methods:
Initialize Tonder's SDK Instance
First, remove any existing checkout instances to avoid duplicates:
Now, initialize Tonder’s Flutter SDK Full instance with the following parameters:
Field Name | Description |
---|---|
platforms | A list or null that specifies which platforms the checkout is available on. If null, it implies universal compatibility. |
apiKeyTonder | Your Tonder API key. You can find it in your Tonder dashboard. |
returnUrl | The URL to which the user will be redirected after the transaction is completed. |
renderPaymentButton | A boolean that specifies whether a payment button should be rendered by the checkout plugin. Setting this to false implies that the button rendering is handled elsewhere or not needed. |
Ensure all API keys and sensitive data are secured and not hardcoded in production applications. Use environment variables or a secure way to load such configurations.
Set Payment Data
Set the payment data on the checkout instance using the customer and cart data you collected from the customer:
Below you find an example of the data needed in the customerData
parameter:
Launch the Checkout Interface
Use the injectCheckout
to inject Tonder’s checkout into the current widget tree:
Add 3DS verification
Use Tonder’s SDK verify3dsTransaction()
method to validate if the 3DS challenge was successful or not. Use the example below to call the method and handle the response as needed:
Display the Checkout UI
Use a Scaffold
widget to contain and display the checkout interface:
Update the application
Update the state to reflect the changes: