{"id":43320369,"url":"https://github.com/xendit/fingerprint-sdk-react-native-public","last_synced_at":"2026-02-01T22:33:12.403Z","repository":{"id":83313453,"uuid":"431751770","full_name":"xendit/fingerprint-sdk-react-native-public","owner":"xendit","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-01T15:34:25.000Z","size":522,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-10-01T17:32:43.419Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xendit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-25T07:26:20.000Z","updated_at":"2025-10-01T15:34:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3e52432-bc3b-4b80-abd2-11636e5d7116","html_url":"https://github.com/xendit/fingerprint-sdk-react-native-public","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xendit/fingerprint-sdk-react-native-public","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-react-native-public","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-react-native-public/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-react-native-public/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-react-native-public/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xendit","download_url":"https://codeload.github.com/xendit/fingerprint-sdk-react-native-public/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-react-native-public/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-01T22:33:11.774Z","updated_at":"2026-02-01T22:33:12.389Z","avatar_url":"https://github.com/xendit.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xendit Fingerprint SDK React Native\n\nReact Native SDK for device identification and fingerprinting with Xendit services.\n\nSupports Android and iOS React Native mobile applications.\n\n## Basic Usage\n\nInitialize the SDK with your public API key on application start up and\nperform a scan.\n\n\u003e The SDK must be initialized before use.\n\n```js\n// App.js\nimport React from 'react';\nimport { SafeAreaView } from 'react-native';\nimport FingerprintSdk from 'xendit-fingerprint-rn';\n\nconst App = () =\u003e {\n    React.useEffect(() =\u003e {\n        // Initialize the SDK on every application start up\n        FingerprintSdk.init('MY_PUBLIC_API_KEY').then((sessionID) =\u003e {\n            // Run a scan after completing initialization\n            FingerprintSdk.scan();\n        });\n    });\n\n    return \u003cSafeAreaView\u003e{appContents}\u003c/SafeAreaView\u003e;\n};\n\nexport default App;\n```\n\nSession ID is retrievable from either `FingerprintSdk.init()` on SDK\ninitialization or from the `FingerprintSdk.getSessionId()` convenience method.\n\nBoth of these functions returns a `Promise` that resolves to a Session ID of type `string`\n\n```js\n// On SDK init\nconst sessionID = await FingerprintSdk.init('MY_PUBLIC_API_KEY');\n\n// After SDK init\nconst sessionID = await FingerprintSdk.getSessionId();\n```\n\nThis Session ID can then be passed on to other Xendit APIs that support device\nfingerprinting. Please refer to the respective API's documentation for further info.\n\n## Requirements\n\n-   React native (0.60 or newer recommended for autolinking)\n-   Android 5.0 (API 21) or newer\n-   iOS 11.0 or newer\n\n## Installation\n\nWith Yarn:\n\n```sh\n$ yarn add xendit-fingerprint-sdk-rn\n```\n\nInstall the package with NPM:\n\n```sh\n$ npm install --save xendit-fingerprint-sdk-rn\n```\n\nLinking the library:\n\n\u003e note for React Native 0.60 and above, [autolinking](https://reactnative.dev/blog/2019/07/03/version-60#native-modules-are-now-autolinked) is available and this step should be skipped.\n\n```sh\n$ npx react-native link xendit-fingerprint-sdk-rn\n```\n\n### iOS Setup\n\nFrameworks must be enabled in CocoaPods by adding `use_frameworks!` into\nyour Podfile.\n\n```ruby\ntarget 'MyProject' do\n  use_frameworks!\n  # ...etc\nend\n```\n\nEnable the `BUILD_LIBRARY_FOR_DISTRIBUTION` setting for every Cocoapod target using a `post_install` block\nin your iOS `Podfile`. Either by including this snippet into an existing `post_install` block or\ncreating a new block at the bottom of your `Podfile`.\n\n```ruby\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    target.build_configurations.each do |config|\n      config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'\n    end\n  end\nend\n```\n\nRun `pod install` in your iOS directory containing the `Podfile`.\n\n```bash\n$ (cd ios; pod install)\n```\n\n### Android Setup\n\nEnsure that mavenCentral is included as a repository in `build.gradle`.\n\nFor example:\n\n```groovy\nallprojects {\n    repositories {\n        mavenCentral()\n        mavenLocal()\n        maven {\n            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm\n            url(\"$rootDir/../node_modules/react-native/android\")\n        }\n        maven {\n            // Android JSC is installed from npm\n            url(\"$rootDir/../node_modules/jsc-android/dist\")\n        }\n        google()\n        maven { url 'https://www.jitpack.io' }\n    }\n}\n```\n\n## Methods\n\nAll SDK methods are asynchronous, returning a `Promise` object. Refer to the\nreturns section of each method for the resolved type.\n\n### `init()`\n\nThe SDK must be initialized before it can be used.\n\n-   Initialization must be ran on every application start up.\n-   The SDK will associate a session ID for the running app until it's killed.\n-   A new session ID will be assigned on every application start up .\n\n```javascript\nconst sessionId = await FingerprintSdk.init(publicKey);\n```\n\n#### **Parameters**\n\n| Name      | Type   | Required | Description                                                                         |\n| --------- | ------ | -------- | ----------------------------------------------------------------------------------- |\n| publicKey | string | Yes      | A valid public API key provided by [Xendit Dashboard](https://dashboard.xendit.co/) |\n\n\u003e Do not use your private API key!\n\n#### **Returns**\n\n| Name      | Type   | Description          |\n| --------- | ------ | -------------------- |\n| sessionId | string | Generated session ID |\n\n### `scan()`\n\nScans the device mobile device and sends the device fingerprint data to Xendit.\n\n-   Scan should be called immediately after initializing the SDK.\n-   Scan can be called multiple times within a session.\n-   Do not `await` the scan, let it run in the background. This avoids blocking\n    any foreground application code execution.\n\n```javascript\nFingerprintSdk.scan();\n// Or\nFingerprintSdk.scan(customerEventName, customerEventID);\n```\n\n#### **Parameters**\n\n| Name              | Type   | Required | Description                                                                                                         |\n| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------- |\n| customerEventName | string | No       | Optional event name to associate with this scan. Recommended to use snake case formatting. e.g. `'some_event_name'` |\n| customerEventID   | string | No       | Optional identifier associated with the event. e.g. user account ID                                                 |\n\n### `getSessionId()`\n\nConvenience method to retrieve Session ID after SDK initialization.\n\n```javascript\nconst sessionId = await FingerprintSdk.getSessionId();\n```\n\n#### **Returns**\n\n| Name      | Type   | Description          |\n| --------- | ------ | -------------------- |\n| sessionId | string | Generated session ID |\n\n### `setEnabled()`\n\nEnables or disables the SDK.\n\n-   When disabled, the scan method will do nothing. No data will be sent to Xendit.\n-   When enabled, the SDK will resume operating as normal.\n-   `await` should be used to ensure the SDK is completely enabled/disabled.\n-   The SDK can be disabled before initializing.\n\n```javascript\nawait FingerprintSdk.setEnabled(enable);\n```\n\n#### **Parameters**\n\n| Name   | Type    | Required | Description                                          |\n| ------ | ------- | -------- | ---------------------------------------------------- |\n| enable | boolean | Yes      | `true` enables the SDK.\u003cbr\u003e`false` disables the SDK. |\n\n#### **Returns**\n\n| Name | Type | Description                                  |\n| ---- | ---- | -------------------------------------------- |\n|      | void | Resolves once SDK is enabled/disabled fully. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Ffingerprint-sdk-react-native-public","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxendit%2Ffingerprint-sdk-react-native-public","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Ffingerprint-sdk-react-native-public/lists"}