AndroidManifest.xml
file, adding the internet permission to it:Import the SDK into your file
liteCheckout
class in your file. Following you find an example of how to import the liteCheckout
:Initialize Tonder's SDK Instance
Field | Description |
---|---|
baseUrlTonder | Tonder’s API base URL. -> Live server: https://stage.tonder.io -> Mock Server: https://stoplight.io/mocks/tonder/tonder-api-v1-2/3152148 |
apiKeyTonder | Your Tonder API key. You can find it in your Tonder dashboard. |
Use the methods available
GetBusinessResponse
customerRegister
allows you to retrieve a customer’s authorization token by adding their email address as the only parameter to this method. To retrieve it, execute the following:
CustomerRegisterResponse
createOrder
method. This method requires an object as parameter with the following data:
Field | Description |
---|---|
business | Your business’s API key. |
client | Authentication token for the client recovered with the customerRegister method. |
billing_address_id | ID of the billing address (null if not available). |
shipping_address_id | ID of the shipping address (null if not available). |
amount | Total amount of the order. |
status | Status of the order. |
reference | Reference information for the order. Recovered with the getBusiness method. |
is_oneclick | Boolean indicating one-click order (true/false). |
items | List of items in the shopping cart. |
item
has the following properties:
Field | Description |
---|---|
description | A textual description of the item. |
quantity | The quantity of the item. |
price_unit | The price per unit of the item. |
discount | The discount applied to the item, if any. |
taxes | The taxes applicable to the item. |
product_reference | A numerical reference or identifier for the item. |
name | The name of the item. |
amount_total | The total amount for the item, including taxes and discounts. |
CreateOrderResponse
createPayment
method. This method requires the following parameters:
Field | Description |
---|---|
business_pk | The primary key or identifier for the business associated with the payment. |
amount | The total amount of the payment. |
date | The date when the payment is made or processed. |
order | The identifier for the order associated with this payment. |
CreatePaymentResponse
startCheckoutRouter
method initiates the checkout process for the customer. This method requires the following to be added as parameter object:
Field Name | Description |
---|---|
card | Card details used in the transaction. |
name | The first name of the client or customer. |
last_name | The last name of the client or customer. |
email_client | The client’s email address. |
phone_number | The client’s phone number. |
return_url | URL to which users should be redirected after payment. |
id_product | Identifier for the product being purchased. |
quantity_product | Optional numerical value indicating the quantity of the product ordered. |
id_ship | Identifier for the shipping information. |
instance_id_ship | Identifier related to a specific instance of shipping. |
amount | The total amount of the transaction. |
title_ship | title or name for the shipping method. |
description | The transaction or product details. |
device_session_id | Dynamic field typically used for fraud prevention, identifying the device. |
token_id | Token associated with the payment method. |
order_id | The order identifier. |
business_id | The business identifier associated with the transaction. |
payment_id | The payment identifier. |
source | The source or origin of the transaction. |
StartCheckoutResponse
getVaultToken
to retrieve the vault credential that is required to register a customer’s card. Use the following example to call this method:
GetVaultTokenResponse
registerCustomerCard
method:
Field Name | Description |
---|---|
customerToken | A token that uniquely identifies the customer. Used for authentication and access control. |
data.skyflow_id | An identifier generated by Skyflow used to track or reference a customer in a secure and compliant way. |
registerCustomerCardResponse
getCustomerCards
to retrieve all registered cards for the customer, allowing them to use a saved card to perform transactions. Below are the parameters to execute this call, followed by an example call to it:
Field | Description |
---|---|
customerToken | A token that uniquely identifies and authenticates the customer making the request. |
query | A query string used to specify and filter the details required, such as card type or status. |
GetCustomerCardsResponse
deleteCustomerCard
to delete any registered card for the customer, allowing them to removed a saved card from the system. Below are the parameters to execute this call, followed by an example call to it:
Field | Description |
---|---|
customerToken | A token that uniquely identifies and authenticates the customer making the request. |
skyflowId | An optional identifier generated by Skyflow, used to specify which card should be deleted. If not provided, it defaults to an empty string. |
GetCustomerCardsResponse
getOpenpayDeviceSessionID
method, you can retrieve your device session id. This method requires you to add the following data to the parameter of the call:
Field Name | Description |
---|---|
merchant_id | The unique identifier for the merchant in the system. |
public_key | The public key associated with the merchant for transaction security. |
production_mode | Optional boolean indicating whether the system is in production mode or not. Defaults to null which might imply a test mode unless specified. |
verify3dsTransaction()
method to validate if a 3DS challenge was successful or not. Use the example below to call the method and handle the response as needed: