NexiCore
public final class NexiCore : NSObject
The main entry point for interacting with the Nexi Paygate SDK.
NexiCore provides a centralized interface for configuring the SDK, managing global settings,
and initiating payment flows (Card and Apple Pay). It also exposes helper methods for creating
payment views.
-
The current version of the NexiPaygateSDK.
Declaration
Swift
public static let sdkVersion: String -
The shared configuration object for the SDK.
This object manages global settings like language, appearance, and enabled card schemes. It is observable, allowing UI components to react to configuration changes.
Declaration
Swift
public static let configuration: NexiConfiguration -
The language used for the CardView and other UI components.
Defaults to
.english. Setting this property updates theconfiguration.languageproperty. If set to.automatic, the SDK will attempt to resolve the language based on the device’s system settings.Declaration
Swift
public static var language: CardViewLanguage { get set } -
The central point for managing the appearance of the SDK’s UI components.
You can assign your own custom appearance object that conforms to
CustomizableComponentsto this property to theme the entire SDK. This updatesconfiguration.appearance.Declaration
Swift
public static var appearance: CustomizableComponents { get set } -
The set of currently enabled card schemes.
This property determines which card brands are accepted by the SDK. Updates
configuration.enabledCardSchemes.Declaration
Swift
public static var enabledCardSchemes: Set<CardScheme> { get set } -
All available card schemes that are supported by the SDK.
This static property provides a comprehensive list of all card schemes (e.g., Visa, Mastercard) that the SDK is capable of processing.
Declaration
Swift
public static let availableCardSchemes: Set<CardScheme>
-
Creates a
CardPaymentinstance configured with optional merchant preferences.Use this method to initiate a standard card payment flow where the user enters card details manually.
Declaration
Swift
public static func cardPayment( with merchant: CardMerchantPreferences = Merchant() ) -> CardPaymentParameters
merchantThe merchant preferences and configuration options. Defaults to a new
Merchantinstance with standard settings.Return Value
A new
CardPaymentinstance ready to process a transaction.
-
Creates an
ApplePayPaymentinstance configured with merchant preferences.Use this method to initiate an Apple Pay transaction.
Declaration
Swift
public static func applePayPayment( ) -> ApplePayPaymentReturn Value
A new
ApplePayPaymentinstance ready to process an Apple Pay transaction.
-
Provides a SwiftUI view for manual card entry.
This method returns a view that renders the card input form, handling user interaction and validation.
Declaration
Swift
@ViewBuilder public static func cardDetailsEntry( for cardPayment: Binding<CardPayment>, bannerTitle: String?, saveCardToggleOption: SaveCardToggleOption, onFormAction: @escaping (FormEvent) -> Void ) -> some ViewParameters
cardPaymentA binding to the
CardPaymentinstance that manages the payment state.bannerTitleAn optional title to display on the banner of the card entry view.
saveCardToggleOptionSpecifies the visibility and labeling of the “Save Card” toggle within the form. Use
.noneto hide it,.defaultLabelfor standard localized text, or.customLabel(String)for custom text.onFormActionA closure triggered to propagate form events (e.g., validation changes, completion) to the parent view.
Return Value
A view for card details entry.
-
Provides a Apple Pay button
Declaration
Swift
@ViewBuilder public static func applePayButton( onTapAction: @escaping () -> Void) -> some ViewParameters
onFormActionA closure triggered to propagate tap gesture action
Return Value
A view for Apple Pay button