{"id":43320366,"url":"https://github.com/xendit/fingerprint-sdk-web-public","last_synced_at":"2026-02-01T22:33:11.750Z","repository":{"id":83313475,"uuid":"473872511","full_name":"xendit/fingerprint-sdk-web-public","owner":"xendit","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-01T15:40:34.000Z","size":83,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":11,"default_branch":"feature/sample-project","last_synced_at":"2025-10-01T17:34:08.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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":"2022-03-25T04:51:00.000Z","updated_at":"2025-10-01T15:40:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc5561e3-5330-40af-abc6-da7b0a283483","html_url":"https://github.com/xendit/fingerprint-sdk-web-public","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xendit/fingerprint-sdk-web-public","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-web-public","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-web-public/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-web-public/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-web-public/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xendit","download_url":"https://codeload.github.com/xendit/fingerprint-sdk-web-public/tar.gz/refs/heads/feature/sample-project","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Ffingerprint-sdk-web-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.648Z","updated_at":"2026-02-01T22:33:11.744Z","avatar_url":"https://github.com/xendit.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xendit Fingerprint Web SDK\n\nWeb SDK for device identification and fingerprinting with Xendit services.\n\n## Running The Sample App\n\nInstall with NPM\n\n```\n$ npm install\n```\n\nUpdate `MY_PUBLIC_API_KEY` value in `src/index.html` with a valid key provided\nby [Xendit Dashboard](https://dashboard.xendit.co/)\n\nRun the sample app\n\n```\n$ npm start\n```\n\nThe sample app is now running on http://localhost:1234\n\n\u003e If HTTP 401 errors are occurring in the browser JS console, ensure the public API key used is valid.\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// Initialize the SDK on every page load\nXenditFingerprintSDK.init({\n    apiKey: 'MY_PUBLIC_API_KEY',\n});\n// Run a scan immediately after initialization\nXenditFingerprintSDK.scan();\n```\n\nThe session ID is retrievable from either `XenditFingerprintSDK.init()` on SDK\ninitialization or from the `XenditFingerprintSDK.getSessionID()` convenience method\nany time after initialization.\n\nBoth of these functions returns a Session ID of type `string`.\n\n```js\n// On SDK init\nvar sessionID = XenditFingerprintSDK.init('MY_PUBLIC_API_KEY');\n\n// After SDK init\nvar sessionID = XenditFingerprintSDK.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\nSupported web browsers:\n\n-   Chrome 49+\n-   Firefox 52+\n-   Edge 93+\n-   Desktop Safari 12.1+\n-   Mobile Safari 10.3+\n-   Samsung Internet 14.0+\n-   Android Browser 4.4+\n\n## Installation\n\nIn a browser:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/xendit-fingerprint-sdk-web/dist/xendit-fingerprint-sdk-web.js\"\u003e\n```\n\nUsing NPM:\n\n```sh\n$ npm install --save xendit-fingerprint-sdk-web\n```\n\n## Methods\n\nAsynchronous SDK methods have been labeled `async`, these return 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 web page load.\n-   The SDK will associate a session ID for the webpage until it's closed.\n-   A new session ID will be assigned on every page load.\n-   Single page apps (SPAs) will have the same session ID if JS based routing is used.\n    Because the web page is only loaded once.\n\n```javascript\nconst sessionId = XenditFingerprintSDK.init({ apiKey: publicKey });\n```\n\n#### **Parameters**\n\n| Name        | Type               | Required | Description            |\n| ----------- | ------------------ | -------- | ---------------------- |\n| initOptions | InitOptions Object | Yes      | Initialization options |\n\n\u003e Do not use your private API key!\n\n`InitOptions` Object\n\n| Name   | Type   | Required | Description                                                                         |\n| ------ | ------ | -------- | ----------------------------------------------------------------------------------- |\n| apiKey | string | Yes      | A valid public API key provided by [Xendit Dashboard](https://dashboard.xendit.co/) |\n\n#### **Returns**\n\n| Name      | Type   | Description          |\n| --------- | ------ | -------------------- |\n| sessionId | string | Generated session ID |\n\n### `async scan()`\n\nScans the web browser 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\nXenditFingerprintSDK.scan();\n// Or\nXenditFingerprintSDK.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 = XenditFingerprintSDK.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-   The SDK can be disabled before initializing.\n\n```javascript\n// Disables the SDK\nXenditFingerprintSDK.setEnabled(false);\n// Re-enables the SDK\nXenditFingerprintSDK.setEnabled(true);\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Ffingerprint-sdk-web-public","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxendit%2Ffingerprint-sdk-web-public","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Ffingerprint-sdk-web-public/lists"}