SDK Initialization
The Checkout SDK is initialized using the CheckoutArguments
class, which includes the properties listed below.
To initialize the SDK, an instance of CheckoutArguments
must be passed as an argument to the OttuCheckoutWidget
object.
For a detailed implementation example, refer to the Example section.
It is used to define the Ottu merchant domain and must be set to the root domain of the Ottu account, excluding the https://
or http://
prefix.
For example, if the Ottu URL is https://example.ottu.com
, the corresponding merchant_id is example.ottu.com
.
This property is required to ensure that the checkout process is correctly linked to the associated Ottu merchant account.
It is the Ottu API public key, used for authentication when communicating with Ottu's servers during the checkout process.
Ensure that only the public key is used. The private key must remain confidential and must never be shared with any clients.
It is a unique identifier for the payment transaction associated with the checkout process.
This identifier is automatically generated when a payment transaction is created. For further details on how to use the session_id
parameter in the Checkout API, refer to the session_id documentation.
The formsOfPayment
parameter is used to customize the forms of payment displayed in the checkout process. By default, all forms of payment are enabled.
Available options for formsOfPayment:
applePay
: The Apple Pay payment method is supported, allowing purchases to be made using Apple Pay-enabled devices.cardOnsite
: A direct (onsite) payment method, where customers are required to enter their card details directly within the SDK.tokenPay
: A method utilizing tokenization, ensuring that customer payment information is securely stored and processed.redirect
: A payment method where customers are redirected to an external payment gateway or a third-party processor to complete the transaction.stcPay
: A method where customers enter their mobile number and authenticate using an OTP sent to their mobile device.
An ApiTransactionDetails
class object is used to store transaction details. If provided, transaction details will not be requested from the backend, thereby reducing processing time.
A Theme class object is used for UI customization. All fields are optional and may include values for background colors, text colors, and fonts for various UI components.
For more details, refer to Android Customization Theme.
The displaySettings
object accepts a PaymentOptionsDisplaySettings
configuration, which defines how payment options are presented to the user during checkout. For more details, refer to the Payment Options Display Mode section.
Callback functions are used to retrieve the payment status. These must be provided directly to the Checkout initialization function. For more information, please check here.
Last updated