Skip to main content
Primer Checkout iOS SDK is currently in beta (v3.0.0-beta.8). 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. Primer Checkout does not support it, and the checkout fails at start. To pass an idempotency key or to abort a payment before the SDK creates it, use idempotencyKey or onBeforePaymentCreate on PrimerCheckoutSession.
See Handle the payment result for how results reach your app.

PrimerLocaleData

Sets the locale that formats amounts, instead of the device locale. The SDK also sends its localeCode with Klarna, redirect, QR code, form redirect and Stripe ACH payment requests. It does not change the language of the SDK’s own UI text, which follows the app’s language.
If you pass only languageCode, regionCode is nil and localeCode is the language code alone, for example "de". Pass regionCode as well to get a language-region code.

PrimerPaymentMethodOptions

Payment method-specific configuration. Set urlScheme for flows that leave your app and return to it: PayPal, redirect-based payment methods, Adyen Klarna and Stripe ACH. Without a valid scheme, these flows fail with a PrimerError whose errorId is invalid-value. 3D Secure returns to your app through threeDsOptions.threeDsAppRequestorUrl instead.

PrimerApplePayOptions

PrimerApplePayOptions.ShippingOptions and PrimerApplePayOptions.BillingOptions are nested types that set the contact fields the Apple Pay sheet asks for. When the Express Checkout shipping handlers run, the SDK requests the postal address itself. Use ShippingOptions only to request extra shipping 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, and appearance mode.

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

PrimerCheckoutTheme

Theme the checkout UI with design tokens via primerTheme