Skip to main content
Primer Checkout iOS SDK is currently in beta (v3.0.0-beta.5). 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

Primer Checkout supports .auto only. The SDK tokenizes the payment method, creates the payment, and delivers the result through the completion handler.
The .manual case exists because PrimerSettings is shared with the Drop-In and Headless SDKs. If your Headless integration creates payments from your backend with .manual, switch to .auto when you move to Primer Checkout. Use onBeforePaymentCreate to pass an idempotency key or to abort a payment before the SDK creates it. Manual payment approval driven by your backend is available on Web today and is coming to iOS, see Migrate the manual flow.
See Handle the payment result for how results reach your app.

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