{"id":15649552,"url":"https://github.com/a-tokyo/react-native-stripe-identity","last_synced_at":"2025-04-30T17:12:34.870Z","repository":{"id":39325384,"uuid":"306152344","full_name":"a-tokyo/react-native-stripe-identity","owner":"a-tokyo","description":"🆔 React Native implementation for Stripe.js Identity","archived":false,"fork":false,"pushed_at":"2023-01-01T05:07:06.000Z","size":871,"stargazers_count":23,"open_issues_count":5,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-30T17:12:27.850Z","etag":null,"topics":["expo","flow","identity","identity-verification","online-payments","payments","react-native","react-native-expo","react-native-stripe","security","stripe","stripe-identity","typescript","verification"],"latest_commit_sha":null,"homepage":"https://stripe.com/docs/identity","language":"JavaScript","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/a-tokyo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-10-21T21:29:44.000Z","updated_at":"2025-04-17T20:08:45.000Z","dependencies_parsed_at":"2023-01-31T20:45:59.185Z","dependency_job_id":null,"html_url":"https://github.com/a-tokyo/react-native-stripe-identity","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-tokyo%2Freact-native-stripe-identity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-tokyo%2Freact-native-stripe-identity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-tokyo%2Freact-native-stripe-identity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-tokyo%2Freact-native-stripe-identity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-tokyo","download_url":"https://codeload.github.com/a-tokyo/react-native-stripe-identity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251748950,"owners_count":21637418,"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":["expo","flow","identity","identity-verification","online-payments","payments","react-native","react-native-expo","react-native-stripe","security","stripe","stripe-identity","typescript","verification"],"created_at":"2024-10-03T12:30:13.896Z","updated_at":"2025-04-30T17:12:34.843Z","avatar_url":"https://github.com/a-tokyo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native Stripe Identity\nReact Native implementation for [Stripe.js Identity](https://stripe.com/docs/identity).\n\n\u003ca href=\"https://npmjs.com/package/react-native-stripe-identity\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/react-native-stripe-identity.svg\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dt/react-native-stripe-identity.svg\"\u003e\u003c/img\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/A-Tokyo/react-native-stripe-identity\"\u003e\n  \u003cimg src=\"https://codecov.io/gh/A-Tokyo/react-native-stripe-identity/branch/main/graph/badge.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=ahmad_tokyo\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/ahmad_tokyo.svg?label=Follow%20@ahmad_tokyo\" alt=\"Follow @ahmad_tokyo\"\u003e\u003c/img\u003e\u003c/a\u003e\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.imgur.com/zgMBFXm.png\" width=\"340px\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n\n## Description\nThe library allows you to use [Stripe.js Identity](https://stripe.com/docs/identity) with react-native/expo without ejecting. You can use it with both server-side implementations and client-side implementations. Simply ensure you follow the [url structure guidelines below](#important-notes-about-urls).\n\n#### API version\n`identity_beta=v3`\n\n## Prequisites\n- This library relies on [React Native Webview](https://www.npmjs.com/package/react-native-webview). Please follow [this guide](https://github.com/react-native-community/react-native-webview/blob/HEAD/docs/Getting-Started.md) to install in your project first.\n\n\n## Installation\n\n- Ensure you've completed the setps in [prequisites.](#prequisites)\n\n- Install package via npm or yarn:\n\n`npm install --save react-native-stripe-identity` OR `yarn add react-native-stripe-identity`\n\n- Import in your project\n\n```javascript\nimport StripeIdentity from 'react-native-stripe-identity';\n```\n\n\n## Usage\n```jsx\nimport StripeIdentity from 'react-native-stripe-identity';\n\nconst MyStripeIdentity = () =\u003e (\n  \u003cStripeIdentity\n    redirectUrl=\"https://verify.stripe.com/start#XXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n    refreshUrl=\"https://example.com/refresh\"\n    onSuccess={({ verificationIntentId }) =\u003e {\n      console.log(`Stripe identity session succeeded. verification intent id: ${verificationIntentId}.`);\n    }}\n    onRefresh={() =\u003e {\n      console.log(`Stripe identity session requested refresh.`);\n    }}\n  /\u003e\n);\n\nexport default MyStripeIdentity;\n```\n\n\n## Important Notes about URLs\n\n- [return_url](https://stripe.com/docs/identity/intents#create-a-verificationintent) must have the query string param `?vi={VERIFICATION_INTENT_ID}`.\n  - vi must be the last param - passed to the onSuccess function as verificationIntentId\n- A simple way to do this is using [url-join](https://www.npmjs.com/package/url-join). eg: `urlJoin(myReturnUrl, '?vi={VERIFICATION_INTENT_ID}')`.\n\n\n## Component props\n\n- `redirectToUrl` (string) - The Identity webpage url - Stripe's [`identity.next_action.redirect_to_url`](https://stripe.com/docs/identity/intents#create-a-verificationintent).\n- `refreshUrl` (string) - The Identity return url - Stripe's identity.refresh_url - Intercepted to call onRefresh.\n- `onSuccess` (?Function) - Called upon success of the identity session with `{ ...props, verificationIntentId: 'VERIFICATION_INTENT_ID' }`\n- `onRefresh` (?Function) - Called upon identity session redirecting to refreshUrl with `{ ...props }`\n- `onLoadingComplete` (?Function) - Called when the Stripe identity session webpage loads successfully.\n- `webViewProps` (?Object) - WebView Component props, spread on the WebView Component.\n- `renderOnComplete` (?(props) =\u003e React$Node) - Optional rendering function returning a component to display upon identity completion. note: You don't need this if your onSuccess and onRefresh functions navigate away from the component.\n\n### Troubleshooting\n- If you face Camera/Gallery permissions issues checkout the solutions in [this react-native-permissions issue](https://github.com/react-native-webview/react-native-webview/issues/508#issuecomment-543758204)\n\n\n## Contributing\nPull requests are highly appreciated! For major changes, please open an issue first to discuss what you would like to change.\n\n### Notice\nStripe identity is still in beta.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-tokyo%2Freact-native-stripe-identity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-tokyo%2Freact-native-stripe-identity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-tokyo%2Freact-native-stripe-identity/lists"}