clientToken and your custom settings.
KOTLIN
fun start(
context: Context,
clientToken: String,
settings: PrimerSettings? = null,
checkoutListener: PrimerHeadlessUniversalCheckoutListener? = null,
uiListener: PrimerHeadlessUniversalCheckoutUiListener? = null
)
Parameters
Hide Parameters
Hide Parameters
String
required
A client token as returned by the create client session call.
PrimerSettings
⚠️ If no settings are provided, the SDK will initialize with its default settings.
Use
Indicates whether client session caching is enabled.When set to
Use
PrimerSettings to provide different options based on your use case.Hide child attributes
Hide child attributes
PrimerPaymentHandling
Default: PrimerPaymentHandling.AUTO
Force the payment handling in the SDK.
Show child attributes
Show child attributes
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.Locale
Force the SDK locale. By default, the locale will be set to the device’s
locale.
PrimerPaymentMethodOptions
Show child attributes
Show child attributes
String?
Sets the deeplink schema used when redirecting back from 3rd party
applications to your application.
PrimerThreeDsOptions
PrimerGooglePayOptions
⚠️ Required when using Google Pay in your integration.
Hide Properties
Hide Properties
String?
Set it the merchant name that you want to be shown on the Google Pay screen.
List<String>
deprecated
Default: listOf('AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA')
Deprecated — setting this no longer has any effect. Configure supported card networks with
orderedAllowedCardNetworks in your client session.Boolean
Default: true
Sets whether credit cards are allowed as a payment method through Google Pay. Set it to
false to prevent credit cards from being offered.Boolean
Default: true
Sets whether prepaid cards are allowed as a payment method through Google Pay. Set it to
false to prevent prepaid cards from being offered.Google Pay has no equivalent flag to disallow debit cards, so a credit-only configuration is not achievable on the platform.
GooglePayButtonStyle
Default: GooglePayButtonStyle.BLACK
Boolean
Default: false
Sets whether user’s billing address should be captured from Google Pay.
Boolean
Default: false
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.PrimerGoogleShippingAddressParameters
Default: null
Indicates whether the shipping address should be collected during the checkout
process. Note that setting at least one shipping method in Checkout. Shipping
module is necessary
Hide PrimerGoogleShippingAddressParameters
Hide PrimerGoogleShippingAddressParameters
Boolean
Default: false
Sets whether the phone number should also be collected.
Boolean
Default: false
Indicates whether selecting a shipping method is required during the checkout process.
At least one shipping option should be configured in order to use this option.This should be set to
true if the shippingAddressParameters are also used.Boolean
Default: false
Indicates whether the email address should be collected during the checkout
process.
GooglePayButtonOptions
A configuration class for customizing the appearance of the Google Pay button.
Hide Properties
Hide Properties
Int
Google Pay Button type as described in the official documentation.
Int
Google Pay button style as described in the official documentation
PrimerKlarnaOptions
PrimerStripeOptions
⚠️ Required when using Stripe ACH in your integration.
Hide Properties
Hide Properties
String?
Set the Stripe publishable key.
MandateData?
Data used for mandate in Drop-in
Show child attributes
Show child attributes
Data for the mandate allowing you to specify the name of the merchant that
would be used in a predefined mandate template.
Hide Properties
Hide Properties
String
The name of the merchant.
Data for the mandate allowing you to specify the string resource pointing
to the full mandate.
Hide Properties
Hide Properties
@StringRes Int
The string resource pointing to the full mandate.
PrimerUIOptions
Sets the different UI options in the SDK.
Hide Properties
Hide Properties
Boolean
Default: true
Set to
false to hide the loading screen before the Universal Checkout or the Vault Manager.Boolean
Default: true
Set to
false to hide the screen after a successful payment, or tokenization on the vault flow.Boolean
Default: true
Set to
false to hide the error screen when an error occurs.DismissalMechanism
Default: GESTURES
Set the mechanism for dismissing Universal Checkout. Options are:
GESTURES: The dialog can be dismissed by tapping outside or by swiping down.CLOSE_BUTTON: A close button is provided, allowing users to dismiss the dialog manually.
PrimerTheme
Set a custom theme for Primer SDK.
PrimerDebugOptions
Sets the different debug options in the SDK.
Hide Properties
Hide Properties
Boolean
Default: false
Sets whether the security warnings returned when performing 3DS are ignored.
Boolean
Default: false
Before enabling the flag to true it’s recommended to reach out to Primer
support for additional verification since there are edge cases where it’s not
advised.
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.PrimerApiVersion
Default: PrimerApiVersion.V2_4
Indicates the API version to use when interacting with the Primer backend. Options are:
PrimerApiVersion.V2_4- will use ApiVersion 2.4PrimerApiVersion.LATEST- will use the latest available ApiVersion version
V2.4 will be used by default.PrimerHeadlessUniversalCheckoutListener
Set Primer SDK’s Headless Checkout Listener and implement the required methods.
PrimerHeadlessUniversalCheckoutUiListener
Set Primer SDK’s Headless Checkout Ui Listener.