PrimerCheckout is the root SwiftUI view that renders the entire checkout experience.
Declaration
Initializer
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
clientToken | String | Required | A token from the Client Session endpoint that authenticates the session |
primerSettings | PrimerSettings | PrimerSettings() | SDK behavior configuration |
primerTheme | PrimerCheckoutTheme | PrimerCheckoutTheme() | Design token overrides |
scope | ((PrimerCheckoutScope) -> Void)? | nil | Closure providing access to the checkout scope for customization and state observation |
onCompletion | ((PrimerCheckoutState) -> Void)? | nil | Callback invoked when the checkout reaches a terminal state |
Usage
Minimal
With settings and theme
With scope and completion
UIKit support
For UIKit-based apps, usePrimerCheckoutPresenter:
See also
PrimerCheckoutScope
Top-level scope API
Common objects
PrimerSettings, PrimerCheckoutState, PaymentResult