KOTLIN
Copy
Ask AI
data class PrimerSettings @JvmOverloads constructor(
var paymentHandling: PrimerPaymentHandling = PrimerPaymentHandling.AUTO,
var locale: Locale = Locale.getDefault(),
var paymentMethodOptions: PrimerPaymentMethodOptions = PrimerPaymentMethodOptions(),
var uiOptions: PrimerUIOptions = PrimerUIOptions(),
var debugOptions: PrimerDebugOptions = PrimerDebugOptions(),
var clientSessionCachingEnabled: Boolean = false,
var apiVersion: PrimerApiVersion = PrimerApiVersion.V2_4
)
Properties
⚠️ If no settings are provided, the SDK will initialize with its default settings.Use
PrimerSettings
to provide different options based on your use case.
Hide child attributes
Hide child attributes
Force the payment handling in the SDK.
Show child attributes
Show child attributes
AUTO
By default, the SDK operates in
PrimerPaymentHandling.AUTO
mode. In this case the SDK is responsible for creating the payment.MANUAL
You can use the
PrimerPaymentHandling.MANUAL
option
in order to handle the payment creation
by yourself.Force the SDK locale. By default, the locale will be set to the device’s
locale.
Show child attributes
Show child attributes
Sets the deeplink schema used when redirecting back from 3rd party
applications to your application.
⚠️ Required when using Google Pay in your integration.
Hide Properties
Hide Properties
Set it the merchant name that you want to be shown on the Google Pay screen.
Sets
the card networks
that your application accepts.
Sets whether user’s billing address should be captured from Google Pay.
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.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
Sets whether the phone number should also be collected.
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.Indicates whether the email address should be collected during the checkout
process.
A configuration class for customizing the appearance of the Google Pay button.
Hide Properties
Hide Properties
Google Pay Button type as described in the official documentation.
Google Pay button style as described in the official documentation
⚠️ Required when using Stripe ACH in your integration.
Hide Properties
Hide Properties
Set the Stripe publishable key.
Data used for mandate in Drop-in
Show child attributes
Show child attributes
TemplateMandateData
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
The name of the merchant.
FullMandateData
Data for the mandate allowing you to specify the string resource pointing
to the full mandate.
Hide Properties
Hide Properties
The string resource pointing to the full mandate.
Sets the different UI options in the SDK.
Hide Properties
Hide 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 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.
Set a custom theme for Primer SDK.
Sets the different debug options in the SDK.
Hide Properties
Hide Properties
Sets whether the security warnings returned when performing 3DS are ignored.
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.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.