Skip to main content
Explore the iOS Checkout scope hierarchy interactively. Click on any scope to see its customization points, available actions, state type, and copyable Swift code examples. Every property and method name reflects the latest SDK API.

Type Aliases

Scopes use type aliases for customization closures:
AliasSignatureUsed by
Component() -> any ViewsplashScreen, loadingScreen, cardInputSection
ContainerComponent(@escaping () -> any View) -> any Viewcontainer
ErrorComponent(String) -> any ViewerrorScreen
PaymentMethodItemComponent(CheckoutPaymentMethod) -> any ViewpaymentMethodItem
CountryItemComponent(PrimerCountry, @escaping () -> Void) -> any ViewcountryItem
CategoryHeaderComponent(String) -> any ViewcategoryHeader
CardFormScreenComponent(any PrimerCardFormScope) -> any ViewCard form screen
PaymentMethodSelectionScreenComponent(PrimerPaymentMethodSelectionScope) -> any ViewSelection screen
WebRedirectScreenComponent(any PrimerWebRedirectScope) -> any ViewWeb redirect screen
WebRedirectButtonComponent(any PrimerWebRedirectScope) -> any ViewWeb redirect payButton
FormRedirectScreenComponent(any PrimerFormRedirectScope) -> any ViewForm redirect screen
FormRedirectButtonComponent(any PrimerFormRedirectScope) -> any ViewForm redirect submitButton
FormRedirectFormSectionComponent(any PrimerFormRedirectScope) -> any ViewForm redirect formSection
QRCodeScreenComponent(any PrimerQRCodeScope) -> any ViewQR code screen

Base Protocol

All payment method scopes conform to PrimerPaymentMethodScope:
@MainActor
protocol PrimerPaymentMethodScope: AnyObject {
  associatedtype State: Equatable

  var state: AsyncStream<State> { get }
  func start()
  func submit()
  func cancel()
  func onBack()
  func onDismiss()
}