Payment Screen
Setup Tonder 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. |
Obtain a Secure Token
Gather Payment and Customer Data
Create the Full Payment Screen
Enrollment Screen
Setup Tonder 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. |
Obtain a Secure Token
Gather Customer Data
Create the Enrollment Screen
payment
: Processes a payment using the configured payment data.saveCustomerCard
: Tokenizes and saves the current card information.getCustomerCards
: Retrieves the list of saved cards for the customer.getPaymentMethods
: Retrieves available payment methods.removeCustomerCard
: Deletes a saved card.ILiteCheckoutOptions
Option | Type | Required | Description |
---|---|---|---|
paymentData | IBaseProcessPaymentRequest | Yes | Contains the payment information, including customer and cart data necessary for the transaction. |
customization | IInlineCustomizationOptions | No | Options for customizing the user interface of the payment process. |
callbacks | IInlineCallbacks | No | Functions to handle callback events during the payment process, such as success or failure. |
returnURL | string | No | The URL to redirect users to after completing the 3D Secure (3DS) authentication process. |
Callbacks Structure
Callback | Parameters | Description | Return |
---|---|---|---|
beforePayment | none | Triggered before the payment process begins. Use this to display a loading state, validate data, or perform pre-payment tasks. | Promise |
onFinishPayment | response: IBaseResponse<ITransaction> | Called when the payment process finishes (success or error). Provides the result of the transaction or error details. | Promise |
Payment Data
Field | Type | Required | Description |
---|---|---|---|
email | string | Yes | Customer’s email address. |
firstName | string | Yes | Customer’s first name. |
lastName | string | Yes | Customer’s last name. |
phone | string | No | Customer’s contact phone number. |
address | string | No | Customer’s street address. |
city | string | No | Customer’s city. |
state | string | No | Customer’s state or province. |
country | string | No | Customer’s country. |
postCode | string | No | Customer’s postal or ZIP code. |
Field | Type | Required | Description |
---|---|---|---|
total | number | Yes | Total amount of the transaction. |
items | Array<IItem> | Yes | Array containing details of items in the cart. |
metadata | Record<string, any> | No | Additional custom data for the transaction. |
currency | string | No | Currency code for the transaction (default: MXN ). |
Field | Type | Required | Description |
---|---|---|---|
name | string | Yes | Name of the product. |
amount_total | number | Yes | Total amount for the item (calculated as quantity × price ). |
description | string | Yes | Brief description of the product. |
price_unit | number | Yes | Unit price of the product. |
product_reference | string | Yes | Unique identifier for the product. |
quantity | number | Yes | Quantity of the product being purchased. |
discount | number | No | Discount amount applied to this item. |
taxes | number | No | Tax amount applied to this item. |
Field | Type | Required | Description |
---|---|---|---|
card | string | No | The ID of the card selected by the user. |
payment_method | string | No | The payment method chosen by the user. |
Customization Options
Option | Type | Default | Description |
---|---|---|---|
saveCards.autoSave | boolean | false | Automatically saves the card without displaying the save option to the user. |
Form Labels & Placeholders
Property | Type | Default | Description |
---|---|---|---|
name | string | ”Titular de la tarjeta” | Label for the cardholder’s name field. |
cardNumber | string | ”Número de tarjeta” | Label for the card number field. |
cvv | string | ”CVV” | Label for the security code field. |
expiryDate | string | ”Fecha de expiración” | Label for the expiration date fields. |
Property | Type | Default | Description |
---|---|---|---|
name | string | ”Nombre como aparece en la tarjeta” | Placeholder for the cardholder’s name field. |
cardNumber | string | ”1234 1234 1234 1234” | Placeholder for the card number field. |
cvv | string | ”3-4 dígitos” | Placeholder for the security code field. |
expiryMonth | string | ”MM” | Placeholder for the expiration month field. |
expiryYear | string | ”AA” | Placeholder for the expiration year field. |