Skip to main content
Primer Checkout iOS SDK is currently in beta (v3.0.0-beta.1). The API is subject to change before the stable release.
PrimerSettings is the SDK’s top-level configuration object. Create it once and pass it to your checkout entry point, either as primerSettings: on PrimerCheckout or as settings: on PrimerCheckoutSession.

Definition

Each option group is optional. Pass nil (the default) to use the SDK defaults, or supply a configured object to override behavior for that group.

Usage

Define your settings outside the SwiftUI view body (for example, as a stored property) so they are not re-created on every render cycle.

PrimerPaymentHandling

Defines how payments are processed after the payment method has been tokenized.
See Handle the payment result for how each mode surfaces results.

PrimerLocaleData

Forces the SDK locale instead of inheriting the device locale.
v3.0 breaking change: in v2.x, providing languageCode without regionCode defaulted to the device region (for example "de-US"). In v3.0, regionCode is nil when not explicitly provided, producing "de" instead.

PrimerPaymentMethodOptions

Payment method-specific configuration. Set urlScheme for any flow that redirects to a third-party app (3DS, Klarna).

PrimerApplePayOptions

ShippingOptions and BillingOptions collect required Apple Pay contact fields:
See Apple Pay integration for end-to-end setup.

PrimerKlarnaOptions

PrimerStripeOptions

PrimerThreeDsOptions


PrimerUIOptions

Controls checkout UI behavior: which screens are shown, how the sheet is dismissed, appearance mode, and theme.

DismissalMechanism

PrimerAppearanceMode

PrimerCardFormUIOptions


PrimerDebugOptions


PrimerApiVersion


See also

PrimerCheckout

The managed checkout view that accepts these settings

PrimerCheckoutPresenter

Present checkout from UIKit with PrimerSettings

PrimerError

Error type surfaced through the completion handler

PrimerTheme

Theme the checkout UI via uiOptions.theme