Flutter
The Flutter SDK's methods and parameters.
Reference for Tonder's Flutter SDK methods (iOS and Android): the InlineCheckout class (Full) and
the LiteCheckout class (Lite, tonder_sdk_lite package). Requires Skyflow Maven configuration.
InlineCheckout (Full)
Core methods
| Method | Description |
|---|---|
new InlineCheckout(..) | Initializes the SDK with configuration (apiKeyTonder, returnUrl, etc.). |
setPaymentData(data) | Loads the customer data (name, email, etc.) into the instance. |
setCartTotal(total) | Sets the total amount for the transaction. |
injectCheckout() | Renders the pre-built checkout UI. |
InlineCheckout constructor
| Parameter | Type | Description |
|---|---|---|
apiKeyTonder | String | Your Tonder API key for authentication. |
returnUrl | String | Redirect URL after payment completion. |
successUrl | String | URL for successful payment redirects. |
renderPaymentButton | bool | Whether to show the SDK's built-in payment button. |
InlineCheckout(
apiKeyTonder: "YOUR_API_KEY",
returnUrl: "https://your-app.com/return",
successUrl: "https://your-app.com/success",
renderPaymentButton: false,
)setPaymentData(data)
Configures the customer information used during the payment.
final customerData = {
'first_name': 'Juan',
'last_name': 'Pérez',
'email': 'juan.perez@example.com'
};
_fullPlugin!.setPaymentData(customerData);LiteCheckout (Lite)
Build your own payment UI while Tonder tokenizes sensitive card data.
| Method | Description |
|---|---|
new LiteCheckout(..) | Initializes the SDK with configuration (apiKey, returnUrl). |
configureCheckout(..) | Configures the customer email and the secureToken for card management. |
setPaymentData(data) | Loads the customer data (name, email, etc.) into the instance. |
setCartTotal(total) | Sets the total amount for the transaction. |
payment(cardData) | Processes a payment with card data from your custom form. |
saveCustomerCard(cardData) | Tokenizes and 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. |
LiteCheckout constructor
| Parameter | Type | Description |
|---|---|---|
apiKey | String | Your Tonder API key for authentication. |
returnUrl | String | URL where users are redirected after payment completion. |
LiteCheckout(
apiKey: "YOUR_API_KEY",
returnUrl: "YOUR_RETURN_URL",
)configureCheckout(..)
Sets the customer email and the secureToken required for card management operations.
_liteCheckout.configureCheckout(
customerEmail: 'customer@example.com',
secureToken: 'SECURE_TOKEN_FROM_BACKEND',
);payment(cardData)
final cardData = {
'card_number': '4111111111111111',
'cardholder_name': 'John Doe',
'expiration_month': '12',
'expiration_year': '25',
'cvv': '123',
};
final response = await _liteCheckout.payment(cardData);saveCustomerCard(cardData) / getCustomerCards() / removeCustomerCard(cardId)
// Save a card
final response = await _liteCheckout.saveCustomerCard(cardData);
// Retrieve saved cards
final cards = await _liteCheckout.getCustomerCards();
// Remove a saved card
await _liteCheckout.removeCustomerCard('card_abc123');Next steps
Was this page helpful?
