Create a session and start Headless Universal Checkout with its clientToken
and your custom settings.
1234567
fun start( context: Context, clientToken: String, settings: PrimerSettings? = null, checkoutListener: PrimerHeadlessUniversalCheckoutListener? = null, uiListener: PrimerHeadlessUniversalCheckoutUiListener? = null)
Parameters
A client token as returned by the create client session call.
⚠️ If no settings are provided, the SDK will initialize with its default settings.
Use PrimerSettings
to provide different options based on your use case.
Force the payment handling in the SDK.
By default, the SDK operates in PrimerPaymentHandling.AUTO
mode. In this case the SDK is responsible for creating the payment.
You can use the PrimerPaymentHandling.MANUAL
option
in order to handle the payment creation
by yourself.
Properties
Set the App link that's used to call your app after an out-of-band (OOB) authentication. Supported in 3D Secure protocol versions 2.2.0 and after.
Properties
Sets the card networks that your application accepts.
GooglePayButtonStyle
If set to true
, this specifies that Google Pay can only be used for payments if the user's Google Pay wallet already contains allowed payment methods.
Properties
⚠️ This option is Deprecated
.
Sets the toolbar title of the Activity displaying Klarna views.
Properties
⚠️ This option is Deprecated
.
Sets the toolbar title of the Activity displaying Klarna views.
Properties
Set the Stripe publishable key.
Properties
Properties
Properties
Properties
Set to false
to hide the loading screen before the Universal Checkout or the Vault Manager.
Set to false
to hide the screen after a successful payment, or tokenization on the vault flow.
Set to false
to hide the error screen when an error occurs.
Set a custom theme for Primer SDK.
Properties
Indicates whether client session caching is enabled.
When set to true
, responses from the server will be cached on the client side, allowing for faster subsequent
access to the same data within the cache duration. When set to false
, every request to the server will be
processed without utilizing any client-side cache, ensuring that the client always receives the most up-to-date data.
Set Primer SDK's Headless Checkout Listener and implement the required methods.
Set Primer SDK's Headless Checkout Ui Listener.