Mobile settings
AndroidManifest.xml
file. Add the following code to your XML:Add the required ID to your HTML
tonder-checkout
ID to work, which needs to be added to an empty div as shown below:Initialize Tonder's SDK Instance
InlineCheckout
object includes all the functionalities of LiteCheckout and adds the capability to handle the rendering of the card payment form. InlineCheckout not only manages transactions but also facilitates the visual integration of the payment form in your application, providing a complete payment experience.Property | Type | Required | Description |
---|---|---|---|
mode | string | ➖ | Environment mode. Options: stage , production , sandbox . Default: stage |
apiKey | string | ✔️ | The API key used for authentication and authorization. |
returnUrl | string | ✔️ | The URL to which the user is redirected after the checkout process, regardless of success or failure. |
renderPaymentButton | boolean | ➖ | Use this flag if you need render Tonder’s default payment button. Default: false |
style | object | ➖ | The custom styles object to customize the checkout |
containerId | string | ➖ | If a custom checkout container ID is required. Default value: tonder-checkout . |
collectorIds | object | ➖ | If you require custom div container IDs.Default value: |
callBack | function | ➖ | Callback function to be invoked after the payment process ends successfully. |
isOpenpaySandbox | boolean | ➖ | Defines if Openpay works on the sandbox. Default value: true . |
isEnrollmentCard | boolean | ➖ | Use the SDK as an enrollment card. |
customization | object | ➖ | Object to customize the checkout behavior and UI. Default value: |
Inject checkout method
injectCheckout
method with your inlineCheckout instance, with the code below:tonder-checkout
added in Step 2 to render the checkout elements, as exemplified by the image below:configureCheckout
method to set initial customer information, such as their email address, allowing to retrieve the respectives user’s saved cards.
injectCheckout
method is a function that allows you to incorporate Tonder’s Checkout feature into your application. This function leverages the element with the ID tonder-checkout
that was added in Step 1 to display the checkout components on your page. To use this method, use the following code:
payment
method. This method requires an object as parameter with the following data:
Key | Description |
---|---|
customer | An object containing customer information |
cart | An object containing cart and item details |
currency | The currency code for the transaction (e.g., “MXN”) |
metadata | An object for additional metadata (e.g., order ID) |
card | An object containing card details for a new card |
payment_method | The selected payment method (optional) |
customer
Key | Description |
---|---|
firstName | Customer’s first name |
lastName | Customer’s last name |
country | Customer’s country |
address | Customer’s street address |
city | Customer’s city |
state | Customer’s state or region |
postCode | Customer’s postal code |
Customer’s email address | |
phone | Customer’s phone number |
cart
Key | Description |
---|---|
total | Total amount for the cart |
items | An array of item objects |
Key | Description |
---|---|
description | Description of the product |
quantity | Quantity of the product |
price_unit | Unit price of the product |
discount | Discount applied to the product |
taxes | Taxes applied to the product |
product_reference | Reference code for the product |
name | Name of the product |
amount_total | Total amount for this product (after discount and taxes) |
card
Key | Description |
---|---|
card_number | The credit card number without spaces or dashes |
cvv | Card Verification Value (3 or 4-digit code) |
expiration_month | Card’s expiration month (e.g., “12”) |
expiration_year | Card’s expiration year (e.g., “25”) |
cardholder_name | Name on the credit card |
card
object with the saved card’s identifier:payment_method
Key | Description |
---|---|
payment_method | The selected payment method (e.g., “Spei”) |
metadata
Key | Description |
---|---|
order_id | Unique identifier for the order |
Create Payment response
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:
isEnrollmentCard
.
setPaymentData
method requires a checkoutData object as a parameter to pass checkout data to Tonder. This is useful when using the default Tonder payment button renderPaymentButton
. Use the code example below to call it:
Customer
Field | Description |
---|---|
firstName | The first name of the customer. |
lastName | The last name of the customer. |
country | The customer’s country of residence. |
address | The customer’s street address. |
city | The city of residence of the customer. |
state | The state or region within the country. |
postCode | The postal code or ZIP code of the customer’s address. |
email | The email address for communication with the customer. |
phone | The contact phone number of the customer. |
Currency
Field | Description |
---|---|
currency | The currency used by the customer. |
Cart
Field | Description |
---|---|
total | The total amount for the customer’s purchase. |
items | An array containing details of individual items in the purchase. |
items[n].description | The description of the item. |
items[n].quantity | The quantity of the item in the purchase. |
items[n].price_unit | The unit price of the item. |
items[n].discount | The discount applied to the item. |
items[n].taxes | The taxes applied to the item. |
items[n].product_reference | The reference number of the product for the item. |
items[n].name | The name of the item (e.g., “T-Shirt”). |
items[n].amount_total | The total amount for the item. |
checkoutData example
InlineCheckout
instance or use HTML and CSS.
styles
parameter when creating the instance, like presented below:
customStyles example
CSS
Form
Cards list
Ionic Angular - Checkout
Ionic Angular - Enrollment Card