PrimerCheckoutScope is the top-level scope providing access to checkout state, payment method scopes, and screen-level customization.
Declaration
Properties
State
| Property | Type | Description |
|---|---|---|
state | AsyncStream<PrimerCheckoutState> | Stream of checkout state changes |
paymentMethodSelection | PrimerPaymentMethodSelectionScope | Access to the payment method selection scope |
paymentHandling | PrimerPaymentHandling | Current payment handling mode (.auto or .manual) |
Customization
| Property | Type | Description |
|---|---|---|
container | ContainerComponent? | Wraps all checkout content. Receives a content closure. |
splashScreen | Component? | Shown during initialization |
loading | Component? | Shown during payment processing |
errorScreen | ErrorComponent? | Shown on error. Receives error message. |
Methods
getPaymentMethodScope
Access a specific payment method scope:Examples
onDismiss
Programmatically dismiss the checkout:PrimerCheckoutState
| Case | Associated values | Description |
|---|---|---|
.initializing | — | Loading configuration |
.ready | totalAmount: Int, currencyCode: String | Ready for interaction |
.success | PaymentResult | Payment completed |
.failure | PrimerError | Payment failed |
.dismissed | — | Checkout dismissed |
See also
Scopes overview
Scope hierarchy and access patterns
State and events
State observation patterns