Core API
Card Form
Payment Methods
Theming
Common Objects
Session pattern
The iOS SDK exposes one managed entry point and one composable entry point. Both are built on the same observablePrimerCheckoutSession, which owns the checkout lifecycle: it loads the client session, tracks the lifecycle Phase, and delivers the final PrimerCheckoutState.
Composable (inline)
Hold aPrimerCheckoutSession as a @StateObject, then attach it to your view hierarchy with the .primerCheckoutSession(_:onCompletion:) modifier. The composable views — PrimerCardForm, PrimerPaymentMethods, and PrimerVaultedPaymentMethods — resolve their per-feature session from the SwiftUI environment and expose @ViewBuilder slots you can override.
Sessions are
@MainActor ObservableObjects. Observe them with @StateObject (when you own them) or @ObservedObject (when they are passed into a slot), and read their @Published state/phase directly in your views.Managed (modal)
For a turnkey flow that renders the SDK’s default screens, usePrimerCheckout in SwiftUI, or PrimerCheckoutPresenter from UIKit.
See also
PrimerCheckoutSession
Own the checkout lifecycle for inline, composable checkout.
PrimerCheckout
Drop in the managed SwiftUI checkout view.
PrimerCardForm
Build a custom card form with @ViewBuilder slots.
Handle payment result
React to the final PrimerCheckoutState.