Documentation Index Fetch the complete documentation index at: https://primer.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
PrimerApplePayScope manages Apple Pay availability, button display, and payment initiation.
Declaration
@MainActor
public protocol PrimerApplePayScope : PrimerPaymentMethodScope where State == PrimerApplePayState
Properties
Property Type Description stateAsyncStream<PrimerApplePayState>Stream of Apple Pay state changes. Use state.isAvailable to check availability.
Customization
Property Type Description screen((any PrimerApplePayScope) -> any View)?Full screen replacement applePayButton((@escaping () -> Void) -> any View)?Custom Apple Pay button
Methods
Method Description submit()Initiate Apple Pay payment PrimerApplePayButton(action:)Returns the SDK’s Apple Pay button as AnyView
PrimerApplePayState
public struct PrimerApplePayState : Equatable {
var isLoading: Bool
var isAvailable: Bool
var availabilityError: String ?
var buttonStyle: PKPaymentButtonStyle
var buttonType: PKPaymentButtonType
var cornerRadius: CGFloat
}
Property Type Description isLoadingBoolLoading state isAvailableBoolDevice supports Apple Pay availabilityErrorString?Reason if unavailable buttonStylePKPaymentButtonStyleCurrent button style buttonTypePKPaymentButtonTypeCurrent button type (buy, checkout, etc.) cornerRadiusCGFloatButton corner radius
See also
Apple Pay integration Apple Pay integration guide