{"id":21390189,"url":"https://github.com/jackbayliss/react-native-nfc-card-reader","last_synced_at":"2025-07-13T16:32:07.002Z","repository":{"id":42629520,"uuid":"278208291","full_name":"jackbayliss/react-native-nfc-card-reader","owner":"jackbayliss","description":"React Native NFC card reader, designed for reading debit/credit cards.","archived":false,"fork":false,"pushed_at":"2022-12-29T11:28:16.000Z","size":151,"stargazers_count":49,"open_issues_count":5,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-19T16:01:35.879Z","etag":null,"topics":["card-reader","card-scanner","nfc","react","react-native"],"latest_commit_sha":null,"homepage":"https://github.com/jackbayliss/react-native-nfc-card-reader","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jackbayliss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["jackbayliss"],"patreon":null,"open_collective":null,"ko_fi":"jackbayliss","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-07-08T22:36:51.000Z","updated_at":"2024-10-29T03:27:16.000Z","dependencies_parsed_at":"2023-01-31T08:46:06.124Z","dependency_job_id":null,"html_url":"https://github.com/jackbayliss/react-native-nfc-card-reader","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackbayliss%2Freact-native-nfc-card-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackbayliss%2Freact-native-nfc-card-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackbayliss%2Freact-native-nfc-card-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackbayliss%2Freact-native-nfc-card-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackbayliss","download_url":"https://codeload.github.com/jackbayliss/react-native-nfc-card-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225901192,"owners_count":17542183,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["card-reader","card-scanner","nfc","react","react-native"],"created_at":"2024-11-22T13:16:24.452Z","updated_at":"2024-11-22T13:16:25.055Z","avatar_url":"https://github.com/jackbayliss.png","language":"Java","funding_links":["https://github.com/sponsors/jackbayliss","https://ko-fi.com/jackbayliss"],"categories":[],"sub_categories":[],"readme":"# react-native-nfc-card-reader\n\n## Description \nThis package is specifically designed to scan credit/debit cards using an Android devices NFC reader and return the card number, expiry and card type.\n\nThis package will only work on Android and isn't available for iOS as of 2020  because Apple do not allow 3rd party iPhone apps to use the Core NFC framework.\n## Getting started\n\n`$ npm install react-native-nfc-card-reader --save`\n### For Gradle 7.0 and \u003c 7.2 you can do:\n`npm install \"https://github.com/jackbayliss/react-native-nfc-card-reader.git#gradle7.0\" --save`\n\n### For Gradle 7.2 you can do:\n`npm install \"https://github.com/jackbayliss/react-native-nfc-card-reader.git#gradle7.2\" --save`\n\n### Mostly automatic installation\n\n`$ react-native link react-native-nfc-card-reader`\n\n## Usage\n```javascript\nimport NfcCardReader from 'react-native-nfc-card-reader';\n\nNfcCardReader.startNfc(function(cardDetails){\n     // Card details contain the callback data below, see the options.\n     that.setState({cardNumber : cardDetails.cardNumber})\n     that.setState({expiryDate : cardDetails.expiryDate})\n     that.setState({cardType : cardDetails.cardType})\n })\n```\nEnsure you add the following to your `AndroidManifest.xml` located in `android\\app\\src\\main`\n```\n\u003cactivity android:name=\"com.jackbayliss.nfcreader.NfcCardReaderActivity\"/\u003e\n```\n## Methods\n `startNfc(callback)` -\u003e Will start the NFC Activity and expects a callback function that will return the card details it's scanned.\n     \n### Callback data\n`cardType` -\u003e Provides the type of the card scanned.\n\n`cardNumber` -\u003e Provides the full card number scanned.\n\n`expiryDate` -\u003e Providers the expiry date of the card scanned.\n\n`firstName` -\u003e Card owners first name.\n\n`lastName` -\u003e Card owners last name.\n\n### Example App\nYou can find the sample app [here](https://github.com/jackbayliss/react-native-nfc-card-reader-sample)\n\n# Contributing\nI am by no means an Android developer, but saw this as a huge thing no one had produced for React Native. So, if you can expand or improve on my basic implementation feel free to create a pull request. \n\n\n # License\n MIT - expanded from [here](https://github.com/pro100svitlo/Credit-Card-NFC-Reader)\n \n \n A special thanks to [pro100svitlo](https://github.com/pro100svitlo/Credit-Card-NFC-Reader) for their library which gave me the ability to create this module.\n A special thanks to [decoder10](https://github.com/decoder10) for fixing a few issues, and adding firstname / lastname - as well as allowing any NFC cards to be scanned.\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackbayliss%2Freact-native-nfc-card-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackbayliss%2Freact-native-nfc-card-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackbayliss%2Freact-native-nfc-card-reader/lists"}