{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-ios/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","step","admonition"]},"type":"markdown"},"seo":{"title":"Card Scanner | Finix iOS Reference","description":"Enable built-in camera card scanning in the Finix iOS Payment Sheet SDK using the enableCardScanning configuration option.","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/online/_filesets/card-scanner.swift","content":[{"start":0,"condition":{"steps":["permission"]},"children":["// Info.plist","// NSCameraUsageDescription: \"Used to scan credit cards for faster entry.\""]},"",{"start":5,"condition":{"steps":["enable"]},"children":["let config = Configuration(","    title: \"Card Entry\",","    branding: Branding(image: UIImage(named: \"MyLogo\"), title: \"My Company\"),","    buttonTitle: \"Pay Now\",","    enableCardScanning: true // set to false to disable",")","paymentAction = PaymentAction(","    credentials: credentials,","    delegate: self,","    configuration: config",")","","let sheet = paymentAction.paymentSheet(style: .complete)","paymentAction.present(from: self, paymentSheet: sheet, animated: true)"]},""],"metadata":{"steps":["permission","enable"]},"basename":"card-scanner.swift","language":"swift"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"permission","heading":"Add camera permission"},{"id":"enable","heading":"enableCardScanning"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"card-scanner","__idx":0},"children":["Card Scanner"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The iOS Payment Sheet SDK includes built-in card scanning powered by the device camera. When enabled, a scan button appears in the top-right corner of the navigation bar. The scanner reads the card number, expiry date, and name. CVV and postal code are not scanned and must be entered manually. Scanning results flow through the same ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/online/payment-action#param-delegate"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentActionDelegate"]}]}," callbacks as manual entry."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Card scanning is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["enabled by default"]},". No additional SDK setup is required beyond adding the camera permission to your app."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"camera-permission","__idx":1},"children":["Camera permission"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"permission","heading":"Add camera permission"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the following key to your app's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Info.plist"]},". Without it, the OS will deny camera access and scanning will not work."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<key>NSCameraUsageDescription</key>\n<string>Used to scan credit cards for faster entry.</string>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Required for scanning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NSCameraUsageDescription"]}," is missing from your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Info.plist"]},", camera access will be denied and the user will be directed to the Settings page to enable it."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"enabling-and-disabling","__idx":2},"children":["Enabling and disabling"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"enable","heading":"enableCardScanning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Control scanning via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enableCardScanning"]}," parameter on ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/ios/online/configuration"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Configuration"]}]},". It defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]},{"$$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":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Behavior"},"children":["Behavior"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," (default)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Scan button appears in the payment sheet."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Scan button is hidden. Users enter card details manually."]}]}]}]}]}]}]}]},"headings":[{"value":"Card Scanner","id":"card-scanner","depth":1},{"value":"Camera permission","id":"camera-permission","depth":2},{"value":"Enabling and disabling","id":"enabling-and-disabling","depth":2}],"frontmatter":{"seo":{"title":"Card Scanner | Finix iOS Reference","description":"Enable built-in camera card scanning in the Finix iOS Payment Sheet SDK using the enableCardScanning configuration option."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-10-29T17:23:32.763Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ios/online/card-scanner","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}