Primer
var settings: PrimerSettings
(get only), use the configure
function to set the PrimerSettings
.func configure(settings: PrimerSettings?, delegate: PrimerDelegate?)
: Omit settings to initialize with the default
settings. Delegate can also be set like Primer.shared.delegate = self
.func showUniversalCheckout(clientToken: String, completion: ((Error?) -> Void)?)
: Show the Universal Checkout with a client token (that you got from a client session API call) and optionally register in the completion handler to get notified when the Universal Checkout has been presented.func showVaultManager(clientToken: String, completion: ((Error?) -> Void)?)
: Show the Vault Manager with a client token (that you got from a client session API call) and optionally register in the completion handler to get notified when the Vault Manager has been presented.func showPaymentMethod(_ paymentMethod: String, withIntent intent: PrimerSessionIntent, andClientToken clientToken: String, completion: ((Error?) -> Void)?)
: Present a payment method with a client token (that you got from a client session API call), and your intent
(.checkout
or .vault
). Optionally register in the completion handler to get notified when the Vault Manager has been presented.func dismiss()
: Dismisses the SDKThe paymentMethod
in showPaymentMethod
can be one of the following:
"ADYEN_ALIPAY"
"ADYEN_BLIK"
"ADYEN_DOTPAY"
"ADYEN_GIROPAY"
"ADYEN_IDEAL"
"ADYEN_INTERAC"
"ADYEN_MOBILEPAY"
"ADYEN_MBWAY"
"ADYEN_MULTIBANCO"
"ADYEN_PAYTRAIL"
"ADYEN_PAYSHOP"
"ADYEN_SOFORT"
"ADYEN_TRUSTLY"
"ADYEN_TWINT"
"ADYEN_VIPPS"
"ADYEN_BANCONTACT_CARD"
"APAYA"
"APPLE_PAY"
"ATOME"
"BUCKAROO_BANCONTACT"
"BUCKAROO_EPS"
"BUCKAROO_GIROPAY"
"BUCKAROO_IDEAL"
"BUCKAROO_SOFORT"
"COINBASE"
"GOCARDLESS"
"GOOGLE_PAY"
"HOOLAH"
"KLARNA"
"MOLLIE_BANCONTACT"
"MOLLIE_IDEAL"
"OPENNODE"
"PAY_NL_BANCONTACT"
"PAY_NL_GIROPAY"
"PAY_NL_IDEAL"
"PAY_NL_PAYCONIQ"
"PAYMENT_CARD"
"PAYPAL"
"PRIMER_TEST_KLARNA"
"PRIMER_TEST_PAYPAL"
"PRIMER_TEST_SOFORT"
"RAPYD_FAST"
"RAPYD_GCASH"
"RAPYD_GRABPAY"
"RAPYD_PROMPTPAY"
"RAPYD_POLI"
"TWOC2P"
"XENDIT_OVO"
"XFERS_PAYNOW"
"XENDIT_RETAIL_OUTLETS"
PrimerSettings
<aside> ⚠️ If no settings are provided, the SDK will get initialized with its default settings.
</aside>
paymentHandling: [PrimerPaymentHandling](<https://www.notion.so/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
: Can be auto
or manual
. auto
is the default value.localeData: [PrimerLocaleData](<https://www.notion.so/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
paymentMethodOptions: [PrimerPaymentMethodOptions](<https://www.notion.so/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
uiOptions: [PrimerUIOptions](<https://www.notion.so/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
debugOptions: [PrimerDebugOptions](<https://www.notion.so/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)