{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ios/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Tokenize with Payment Sheet iOS SDK | Finix","description":"Reference for the Finix iOS online tokenization library — securely collect and tokenize card and bank account details in your iOS app.","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":"Heading","attributes":{"level":1,"id":"tokenize-with-payment-sheet-ios-sdk","__idx":0},"children":["Tokenize with Payment Sheet iOS SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Finix iOS SDK lets you securely collect card and bank account details in your iOS app using a pre-built payment sheet. Payment data is tokenized before it reaches your application, keeping sensitive card data out of your code and ensuring PCI compliance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tokens are created in Finix's vault and returned to your app. Use the token immediately to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/api/payment-instruments"},"children":["create a Payment Instrument"]}," via the Finix API."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Token Expiration"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tokens expire ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30 minutes"]}," after creation. Create a Payment Instrument as soon as you receive the token."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installing-the-library","__idx":1},"children":["Installing the library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The library is distributed via CocoaPods. Add it to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Podfile"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ruby","header":{"controls":{"copy":{}}},"source":"pod 'FinixPaymentSheet', :git => 'https://github.com/finix-payments/FinixPaymentSheet.git', :tag => 'v1.0.10'\n","lang":"ruby"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then run:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"pod install\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After installation, import the SDK in your source files:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"import FinixPaymentSheet\n","lang":"swift"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No bridging headers or additional configuration are required."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"system-requirements","__idx":2},"children":["System requirements"]},{"$$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":"Requirement"},"children":["Requirement"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["iOS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["12.0+"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Xcode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["14.0+"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Swift"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["5.8+"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start","__idx":3},"children":["Quick start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initialize ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FinixCredentials"]},", create a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentAction"]},", present a payment sheet, and handle the token response via the delegate."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"swift","header":{"controls":{"copy":{}}},"source":"class CheckoutViewController: UIViewController {\n    var paymentAction: PaymentAction!\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        let credentials = FinixCredentials(\n            applicationId: \"YOUR_APPLICATION_ID\",\n            environment: .Sandbox // set to .Production for production\n        )\n        paymentAction = PaymentAction(credentials: credentials, delegate: self)\n    }\n\n    func showPaymentSheet() {\n        let sheet = paymentAction.paymentSheet(style: .complete)\n        paymentAction.present(from: self, paymentSheet: sheet, animated: true)\n    }\n}\n\nextension CheckoutViewController: PaymentActionDelegate {\n    func paymentAction(_ action: PaymentAction, didSucceedWith response: TokenResponse) {\n        // response.id — use this to create a Payment Instrument via the Finix API\n        print(\"Token: \\(response.id)\")\n    }\n\n    func paymentAction(_ action: PaymentAction, didFailWith error: Error) {\n        print(\"Error: \\(error.localizedDescription)\")\n    }\n}\n","lang":"swift"},"children":[]}]},"headings":[{"value":"Tokenize with Payment Sheet iOS SDK","id":"tokenize-with-payment-sheet-ios-sdk","depth":1},{"value":"Installing the library","id":"installing-the-library","depth":2},{"value":"System requirements","id":"system-requirements","depth":2},{"value":"Quick start","id":"quick-start","depth":2}],"frontmatter":{"seo":{"title":"Tokenize with Payment Sheet iOS SDK | Finix","description":"Reference for the Finix iOS online tokenization library — securely collect and tokenize card and bank account details in your iOS app."}},"lastModified":"2026-08-20T01:30:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ios/online","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}