LiteCheckout class of the Flutter Lite SDK.
Core Methods
The Tonder Flutter Lite SDK provides these essential methods for payment processing and card management with complete UI control. Each method serves a specific purpose in the payment integration workflow.| Method | Description |
|---|---|
new LiteCheckout(..) | Initializes the SDK with configuration like apiKey and returnUrl. |
configureCheckout(..) | Configures customer email and secure token for card management operations. |
setPaymentData(data) | Loads the customer data (name, email, etc.) into the SDK instance. |
setCartTotal(total) | Sets the total amount for the transaction. |
payment(cardData) | Processes a payment with the provided card data from your custom form. |
saveCustomerCard(cardData) | Saves a customer’s card for future use. |
getCustomerCards() | Retrieves all saved cards for the customer. |
removeCustomerCard(cardId) | Removes a saved card by its ID. |
Method Details
Each method in the Tonder Flutter Lite SDK serves a specific purpose in the payment integration workflow. Below you’ll find detailed information about each method, including their parameters, usage examples, and practical implementation guidance.LiteCheckout Constructor
LiteCheckout Constructor
Creates a new instance of the LiteCheckout class with the necessary configuration for secure payment processing. This constructor establishes the connection with Tonder’s services and configures the payment environment.
Here’s an example of how to initialize the LiteCheckout class:
| Parameter | Type | Description |
|---|---|---|
apiKey | String | Your Tonder API key for authentication |
returnUrl | String | URL where users are redirected after payment completion |
configureCheckout
configureCheckout
Sets customer email and the secure token required for card management operations.
Here’s an example:
| Parameter | Type | Description |
|---|---|---|
customerEmail | String | Customer’s email address |
secureToken | String | Secure token obtained from your backend (required for card operations) |
setPaymentData
setPaymentData
Configures the customer information that will be used during the payment process. This data is used to associate the transaction with the customer.
Here’s an example of how to set the customer data:
| Parameter | Type | Description |
|---|---|---|
data | Map<String, dynamic> | Customer information including name, email, etc. |
setCartTotal
setCartTotal
Sets the total amount for the transaction. This value is used for payment processing.
Here’s an example of how to set the cart total:
| Parameter | Type | Description |
|---|---|---|
total | int | Total amount in cents (e.g., 399 for $3.99) |
payment
payment
Processes a payment using the provided card data collected from your custom form.
Here’s an example of how to process a payment:
| Parameter | Type | Description |
|---|---|---|
cardData | Map<String, dynamic> | Card information collected from your custom UI |
saveCustomerCard
saveCustomerCard
Securely tokenizes and saves new card details for the customer.
Here’s an example:
| Parameter | Type | Description |
|---|---|---|
cardData | Map<String, dynamic> | Card information to be saved |
getCustomerCards
getCustomerCards
Retrieves a list of saved cards for the configured customer.
Here’s an example:
| Parameter | Type | Description |
|---|---|---|
| None | - | This method takes no parameters |
removeCustomerCard
removeCustomerCard
Deletes a previously saved card using its unique ID.
Here’s an example:
| Parameter | Type | Description |
|---|---|---|
cardId | String | Unique identifier of the card to remove |
Next Steps
Now that you’re familiar with the available methods in the Flutter Lite SDK, explore these guides to enhance your implementation:- Learn how to make a payment using the Flutter Lite SDK.
- Learn how to enroll payment methods for returning customers.
- Learn more about customization options to match your app’s design.

