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 SDKPrimerSettings
<aside> ⚠️ If no settings are provided, they SDK will get initialized with its default settings.
</aside>
paymentHandling: [PrimerPaymentHandling](<https://primerio.notion.site/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
: Can be auto
or manual
. auto
is the default value.localeData: [PrimerLocaleData](<https://primerio.notion.site/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
paymentMethodOptions: [PrimerPaymentMethodOptions](<https://primerio.notion.site/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
uiOptions: [PrimerUIOptions](<https://primerio.notion.site/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
debugOptions: [PrimerDebugOptions](<https://primerio.notion.site/API-Reference-f62b4be8f24642989e63c25a8fb5f0ba>)
PrimerPaymentHandling
auto
: Universal Checkout creates and handles payments automatically (default flow)manual
: Create and handle payments manually