{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ios/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","step","admonition"]},"type":"markdown"},"seo":{"title":"Installation & Initialization | iOS Tap to Pay on iPhone SDK Reference","description":"Add the Finix Tap to Pay on iPhone SDK via Swift Package Manager, build a TapToPayConfiguration, and initialize the SDK entry point.","siteUrl":"https://docs.finix.com/","llmstxt":{"hide":false,"sections":[{"title":"Getting Started","includeFiles":["guides/getting-started/**/*.md"],"excludeFiles":[]},{"title":"Online Payments","includeFiles":["guides/online-payments/**/*.md"],"excludeFiles":["guides/online-payments/payment-features/fsa-hsa-non-healthcare-mcc.md"]},{"title":"In-Person Payments","includeFiles":["guides/in-person-payments/**/*.md"],"excludeFiles":[]},{"title":"Subscriptions","includeFiles":["guides/subscriptions/**/*.md"],"excludeFiles":[]},{"title":"After the Payment","includeFiles":["guides/after-the-payment/**/*.md"],"excludeFiles":[]},{"title":"Managing Operations","includeFiles":["guides/managing-operations/**/*.md"],"excludeFiles":[]},{"title":"Platform Payments","includeFiles":["guides/platform-payments/**/*.md"],"excludeFiles":[]},{"title":"Payouts","includeFiles":["guides/payouts/**/*.md"],"excludeFiles":[]},{"title":"Low-Code / No-Code","includeFiles":["low-code-no-code/**/*.md"],"excludeFiles":[]},{"title":"Developers","includeFiles":["additional-resources/developers/**/*.md"],"excludeFiles":[]},{"title":"Plugins","includeFiles":["additional-resources/plugins/**/*.md"],"excludeFiles":[]},{"title":"Industry Considerations","includeFiles":["guides/industry-considerations/**/*.md"],"excludeFiles":[]},{"title":"Regional Considerations","includeFiles":["guides/regional-considerations/**/*.md"],"excludeFiles":[]},{"title":"Release Notes","includeFiles":["release-notes/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeWalkthrough","attributes":{"__idx":1,"filters":{},"filesets":[{"files":[{"path":"ios/tap-to-pay/_filesets/installation.swift","content":[{"start":0,"condition":{"steps":["add-package"]},"children":["// Swift Package Manager - add via Xcode:","// File > Add Package Dependencies","// https://github.com/finix-payments/finix-taptopay-ios-sdk","//","// Or in Package.swift:","// dependencies: [","//     .package(url: \"https://github.com/finix-payments/finix-taptopay-ios-sdk\", from: \"1.0.0\")","// ],","// targets: [","//     .target(","//         name: \"YourApp\",","//         dependencies: [","//             .product(name: \"FinixTapToPaySDK\", package: \"finix-taptopay-ios-sdk\")","//         ]","//     )","// ]","import FinixTapToPaySDK"]},"",{"start":20,"condition":{"steps":["create-configuration","configuration-reference"]},"children":["import FinixTapToPaySDK","","let configuration = TapToPayConfiguration(","    credentials: TapToPayConfiguration.APICredentials(","        username: \"USxxxxxxxxxxxxx\",","        password: \"{your_api_secret}\"","    ),","    merchant: TapToPayConfiguration.MerchantInfo(","        merchantId: \"MUxxxxxxxxxxxxx\",","        merchantMid: \"123456789012345\",","        merchantName: \"Bluebird Coffee\"","    ),","    environment: .sandbox,","    deviceId: \"DVxxxxxxxxxxxxx\"",")","","let tapToPay = FinixTapToPay(configuration: configuration)"]},"",{"start":40,"condition":{"steps":["transaction-options"]},"children":["let configuration = TapToPayConfiguration(","    credentials: credentials,","    merchant: merchant,","    environment: .sandbox,","    deviceId: deviceId,","    transactionOptions: TapToPayConfiguration.TransactionOptions(","        returnReadResultImmediately: true,","        autoPrepareOnForeground: true,","        linkStatusCacheDuration: 300","    ),","    crashReportingEnabled: false // e.g. your app ships its own crash reporter",")"]},"",{"start":55,"condition":{"steps":["runtime-configuration"]},"children":["// After your backend reconfigures the merchant or Device:","tapToPay.refreshConfiguration()","// The reader session is now invalid. Prepare again before transacting:","try await tapToPay.prepareReader()","","// Full reset of cached SDK state (tokens, link status, session).","// Does NOT unlink the merchant's Apple Account.","tapToPay.clearAllCaches()"]},"",{"start":66,"condition":{"steps":["api-quick-reference"]},"children":["// All members of FinixTapToPay:","protocol FinixTapToPayAPI {","    init(configuration: TapToPayConfiguration)","    static func isSupported() -> Bool","    func isAccountLinked() async -> Bool","    func linkAccount() async throws","    func forceRefreshLinkStatus() async -> Bool","    func clearLinkStatus()","    func prepareReader() async throws","    var transactionEvents: AnyPublisher<TapToPayTransactionEvent, Never> { get }","    func startTransaction(","        amount: Int,","        currency: String,","        type: TransactionType,","        identityId: String?","    ) async throws -> TapToPayTransactionResult","    func cancelTransaction() async throws","    func setUserInterfaceLanguage(_ language: Locale.Language?)","    func refreshConfiguration()","    func clearAllCaches()","}"]},""],"metadata":{"steps":["add-package","create-configuration","configuration-reference","transaction-options","runtime-configuration","api-quick-reference"]},"basename":"installation.swift","language":"swift"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"add-package","heading":"Add the package"},{"id":"create-configuration","heading":"Create a configuration"},{"id":"configuration-reference","heading":"Configuration reference"},{"id":"transaction-options","heading":"Transaction options"},{"id":"runtime-configuration","heading":"Managing configuration at runtime"},{"id":"api-quick-reference","heading":"API quick reference"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"installation-and-initialization","__idx":0},"children":["Installation and initialization"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Before you start:"]}," you need the five values from ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/credentials"},"children":["Credentials and environments"]},", including an activated Device ID from ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/device-setup"},"children":["Set up a Device"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-the-package","__idx":1},"children":["Add the package"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"add-package","heading":"Add the package"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK is distributed as a binary XCFramework via Swift Package Manager."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Xcode: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File ▸ Add Package Dependencies…"]},", enter the package URL ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://github.com/finix-payments/finix-taptopay-ios-sdk"]},", and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Up to Next Major Version"]}," starting at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1.0.0"]},". Or add it to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Package.swift"]}," as shown."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Bundled dependency"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The package includes Datadog ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dd-sdk-ios"]}," 3.6.1 (DatadogCore, DatadogLogs, DatadogCrashReporting), which the SDK uses to report diagnostics and crashes to Finix. ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/privacy"},"children":["Privacy and data collection"]}," describes exactly what is collected and how to opt out of crash reporting."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-configuration","__idx":2},"children":["Create a configuration"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"create-configuration","heading":"Create a configuration"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TapToPayConfiguration"]}," and create the SDK entry point, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FinixTapToPay"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializing the SDK makes no network calls. Authentication happens the first time you link an account, prepare the reader, or start a transaction."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-reference","__idx":3},"children":["Configuration reference"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"configuration-reference","heading":"Configuration reference"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credentials"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["APICredentials"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None (required)."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Finix API ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["username"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["password"]}," for the target environment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MerchantInfo"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None (required)."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The merchant receiving the payments (see below)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None (required)."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".sandbox"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".production"]},"; must match the credentials, merchant, and Device."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None (required)."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The activated Device ID from ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/device-setup"},"children":["Set up a Device"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionOptions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionOptions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionOptions()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Behavior tuning. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"#transaction-options"},"children":["Transaction options"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["crashReportingEnabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the SDK's diagnostics include crash reporting. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/privacy"},"children":["Privacy and data collection"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MerchantInfo"]}," fields:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Finix Merchant ID (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MUxxxxxxxxxxxxx"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantMid"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The merchant's processing MID. Required; never pass an empty string."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Display name; Apple shows it to the Buyer on the tap screen."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"transaction-options","__idx":4},"children":["Transaction options"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"transaction-options","heading":"Transaction options"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Option"},"children":["Option"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default"},"children":["Default"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["returnReadResultImmediately"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dismiss Apple's tap sheet as soon as the card read completes, instead of holding it while the payment processes. Apple recommends this for a smoother checkout flow. Show your own processing screen while the payment completes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["autoPrepareOnForeground"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Re-warm the reader automatically when your app returns to the foreground, if a reader session already exists. This does not replace your initial ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/transactions#prepare-the-reader"},"children":["prepare"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["linkStatusCacheDuration"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["300"]}," (seconds)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How long ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isAccountLinked()"]}," can return a cached value before re-checking with Apple. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["forceRefreshLinkStatus()"]}," to bypass the cache."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Crash reporting opt-out."]}," When the SDK initializes its own diagnostics, it also enables crash reporting so Finix can diagnose SDK crashes. If your app ships its own crash reporter, pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["crashReportingEnabled: false"]},", because two crash reporters in the same process can conflict. If your app already initializes Datadog before creating the SDK, the flag has no effect: the SDK uses your existing Datadog instance and does not enable crash reporting."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"managing-configuration-at-runtime","__idx":5},"children":["Managing configuration at runtime"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"runtime-configuration","heading":"Managing configuration at runtime"},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FinixTapToPay"]}," instance per merchant session and reuse it. Recreate it only when the merchant, MID, or environment changes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When rebuilding a configuration, don't overwrite a known-good value with an empty one. In particular, don't replace a real ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantMid"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"\""]}," while a lookup is still in flight. Transactions submitted without a MID fail at processing."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refreshConfiguration()"]}," if your backend reconfigures the merchant or Device (for example, a terminal-profile change). This invalidates the SDK's cached tokens and reader session, so you must call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prepareReader()"]}," again before the next transaction."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clearAllCaches()"]}," resets all cached state (tokens, link status, session) for a full re-setup. It does not unlink the merchant's Apple Account. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/account-linking"},"children":["Account linking"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api-quick-reference","__idx":6},"children":["API quick reference"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"api-quick-reference","heading":"API quick reference"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every member of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FinixTapToPay"]}," and where this guide covers it:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Member"},"children":["Member"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Covered in"},"children":["Covered in"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init(configuration:)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This page"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["static isSupported() -> Bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/apple-entitlement"},"children":["Apple entitlement setup"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isAccountLinked() async -> Bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/account-linking"},"children":["Account linking"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["linkAccount() async throws"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/account-linking"},"children":["Account linking"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["forceRefreshLinkStatus() async -> Bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/account-linking"},"children":["Account linking"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clearLinkStatus()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/account-linking"},"children":["Account linking"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prepareReader() async throws"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/transactions#prepare-the-reader"},"children":["Prepare the reader"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionEvents: AnyPublisher<TapToPayTransactionEvent, Never>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/transactions#take-a-payment"},"children":["Take a payment"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startTransaction(amount:currency:type:identityId:) async throws -> TapToPayTransactionResult"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/transactions#take-a-payment"},"children":["Take a payment"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancelTransaction() async throws"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/transactions#take-a-payment"},"children":["Take a payment"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setUserInterfaceLanguage(_:)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/transactions#localize-the-payment-experience"},"children":["Localize the payment experience"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refreshConfiguration()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This page"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clearAllCaches()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This page"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next:"]}," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/tap-to-pay/account-linking"},"children":["Account linking"]},"."]}]}]},"headings":[{"value":"Installation and initialization","id":"installation-and-initialization","depth":1},{"value":"Add the package","id":"add-the-package","depth":2},{"value":"Create a configuration","id":"create-a-configuration","depth":2},{"value":"Configuration reference","id":"configuration-reference","depth":2},{"value":"Transaction options","id":"transaction-options","depth":2},{"value":"Managing configuration at runtime","id":"managing-configuration-at-runtime","depth":2},{"value":"API quick reference","id":"api-quick-reference","depth":2}],"frontmatter":{"seo":{"title":"Installation & Initialization | iOS Tap to Pay on iPhone SDK Reference","description":"Add the Finix Tap to Pay on iPhone SDK via Swift Package Manager, build a TapToPayConfiguration, and initialize the SDK entry point."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-08-11T19:49:07.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ios/tap-to-pay/installation","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}