{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ios/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","step"]},"type":"markdown"},"seo":{"title":"Transactions | iOS Card Present SDK Reference","description":"Reference for startTransaction — process card-present sales with the PAX D135 using the Finix iOS SDK.","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/card-present/_filesets/transactions.swift","content":[{"start":0,"condition":{"steps":["signature"]},"children":["let amount = Currency(amount: 1000, code: .USD) // $10.00","finixClient.startTransaction(amount: amount, type: .SALE) { response, error in","    Task { @MainActor in","        // handle response and error","    }","}"]},"",{"start":9,"condition":{"steps":["currency"]},"children":["let amount = Currency(amount: 1000, code: .USD) // $10.00","","// Convert from a decimal string (e.g., \"10.00\")","if let amountDouble = Double(\"10.00\") {","    let amount = Currency(amount: Int(amountDouble * 100), code: .USD)","}"]},"",{"start":18,"condition":{"steps":["callback"]},"children":["let amount = Currency(amount: 1000, code: .USD)","finixClient.startTransaction(amount: amount, type: .SALE) { response, error in","    Task { @MainActor in","        if let error = error {","            // transaction declined or failed","            print(\"Error: \\(error.localizedDescription)\")","            return","        }","        if let response = response {","            // transaction approved — response contains transfer details","            print(\"Transfer ID: \\(response.id ?? \"\")\")","        }","    }","}"]},""],"metadata":{"steps":["signature","currency","callback"]},"basename":"transactions.swift","language":"swift"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"signature","heading":"Function signature"},{"id":"currency","heading":"Currency"},{"id":"callback","heading":"Completion handler"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"transactions","__idx":0},"children":["Transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startTransaction()"]}," after a successful device connection to initiate a card-present payment. The amount must be expressed in cents using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]}," type."]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"signature","heading":"Function signature"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"finixClient.startTransaction(\n    amount: Currency,\n    type: TransactionType,\n    splitTransfers: [SplitTransfer]? = nil,\n    tags: ResourceTags? = nil,\n    buyerIdentityId: String? = nil,\n    surchargeAmount: Int? = nil,\n    tipAmount: Int? = nil,\n    signaturePending: Bool? = nil\n) { (transferResponse: TransferResponse?, error: Error?) in\n    // handle result\n}\n","lang":"swift"},"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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$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":["amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction amount. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency(amount: Int, code: .USD)"]}," where ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}," is in cents (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000"]}," for $10.00)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of transaction. Supported values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".SALE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".AUTHORIZATION"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".REFUND"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["splitTransfers"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[SplitTransfer]?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Split the transaction across multiple merchants. Requires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_PARTNER"]}," credentials."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tags"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ResourceTags?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom key-value metadata attached to the transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buyerIdentityId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Finix Identity ID of the buyer."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["surchargeAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Int?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional surcharge amount in cents. The SDK passes this value through as-is — surcharge logic must be handled by your application."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tipAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Int?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional tip amount in cents. The SDK passes this value through as-is — tip logic must be handled by your application."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signaturePending"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bool?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if a signature will be captured and submitted via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/signature_uploads"]}," for this transfer."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"currency","__idx":1},"children":["Currency"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"currency","heading":"Currency"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Construct a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Currency"]}," value with the amount in cents and the ISO currency code."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"Currency(amount: Int, code: CurrencyCode)\n","lang":"swift"},"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":"Parameter"},"children":["Parameter"]},{"$$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":["amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer amount in the smallest currency unit (cents for USD). For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000"]}," represents $10.00."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ISO currency code. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".USD"]}," for US dollars."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"completion-handler","__idx":2},"children":["Completion handler"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"callback","heading":"Completion handler"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The completion closure receives a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransferResponse"]}," on success or an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Error"]}," on failure. Always dispatch UI updates back to the main actor."]},{"$$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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Trigger"},"children":["Trigger"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transferResponse"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction approved. Contains the transfer and authorization details."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction declined or failed. Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error.localizedDescription"]}," for details."]}]}]}]}]}]}]}]},"headings":[{"value":"Transactions","id":"transactions","depth":1},{"value":"Currency","id":"currency","depth":2},{"value":"Completion handler","id":"completion-handler","depth":2}],"frontmatter":{"seo":{"title":"Transactions | iOS Card Present SDK Reference","description":"Reference for startTransaction — process card-present sales with the PAX D135 using the Finix iOS SDK."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-08-06T01:23:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ios/card-present/transactions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}