{"id":13475506,"url":"https://github.com/stripe/stripe-react-native","last_synced_at":"2026-04-02T20:23:03.319Z","repository":{"id":37553353,"uuid":"322130535","full_name":"stripe/stripe-react-native","owner":"stripe","description":"React Native library for Stripe.","archived":false,"fork":false,"pushed_at":"2026-03-04T00:36:24.000Z","size":8586,"stargazers_count":1410,"open_issues_count":164,"forks_count":304,"subscribers_count":43,"default_branch":"master","last_synced_at":"2026-03-04T05:27:38.636Z","etag":null,"topics":["payments","react-native","stripe"],"latest_commit_sha":null,"homepage":"https://stripe.dev/stripe-react-native","language":"TypeScript","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/stripe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","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":"2020-12-16T23:51:01.000Z","updated_at":"2026-03-04T00:35:51.000Z","dependencies_parsed_at":"2023-09-27T01:28:18.775Z","dependency_job_id":"266a2b63-857e-43d7-8021-f1ff98a3a517","html_url":"https://github.com/stripe/stripe-react-native","commit_stats":{"total_commits":624,"total_committers":63,"mean_commits":9.904761904761905,"dds":0.5833333333333333,"last_synced_commit":"46f288441db9bd8df9ab20e369ff0e4daaa28bc0"},"previous_names":[],"tags_count":106,"template":false,"template_full_name":null,"purl":"pkg:github/stripe/stripe-react-native","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stripe","download_url":"https://codeload.github.com/stripe/stripe-react-native/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stripe%2Fstripe-react-native/sbom","scorecard":{"id":57721,"data":{"date":"2025-08-04","repo":{"name":"github.com/stripe/stripe-react-native","commit":"c9f83c7092504754169224d50ab0fd695f61ad4d"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":6,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 17 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/e2e-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/generate-docs.yml:1","Warn: no topLevel permission defined: .github/workflows/js-tests.yml:1","Warn: no topLevel permission defined: .github/workflows/unit-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: android/gradle/wrapper/gradle-wrapper.jar:1","Warn: binary detected: example/android/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:169: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:189: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:195: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:203: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:211: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:240: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:248: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/e2e-tests.yml:302: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/e2e-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-docs.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/generate-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-docs.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/generate-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-docs.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/generate-docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate-docs.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/generate-docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/js-tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/js-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/js-tests.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/js-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/js-tests.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/js-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:76: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:101: update your workflow using https://app.stepsecurity.io/secureworkflow/stripe/stripe-react-native/unit-tests.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/e2e-tests.yml:82","Warn: downloadThenRun not pinned by hash: .github/workflows/e2e-tests.yml:226","Info:   0 out of  26 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned","Info:   0 out of   2 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'master'","Info: 'force pushes' disabled on branch 'master'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'master'","Warn: required approving review count is 1 on branch 'master'","Info: codeowner review is required on branch 'master'","Info: status check found to merge onto on branch 'master'","Info: PRs are required in order to make changes on branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/stripe/.github/SECURITY.md:1","Info: Found linked content: github.com/stripe/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/stripe/.github/SECURITY.md:1","Info: Found text in security policy: github.com/stripe/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-m5qc-5hw7-8vg7","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T01:06:33.665Z","repository_id":37553353,"created_at":"2025-08-15T01:06:33.671Z","updated_at":"2025-08-15T01:06:33.671Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30092887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T20:42:30.420Z","status":"ssl_error","status_checked_at":"2026-03-04T20:42:30.057Z","response_time":59,"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":["payments","react-native","stripe"],"created_at":"2024-07-31T16:01:20.988Z","updated_at":"2026-04-02T20:23:03.312Z","avatar_url":"https://github.com/stripe.png","language":"TypeScript","readme":"# Stripe React Native SDK\n\n[![npm version](https://img.shields.io/npm/v/@stripe/stripe-react-native.svg?style=flat-square)](https://www.npmjs.com/package/@stripe/stripe-react-native)\n[![License](https://img.shields.io/github/license/stripe/stripe-react-native)](https://github.com/stripe/stripe-react-native/blob/master/LICENSE)\n\nThe Stripe React Native SDK allows you to build delightful payment experiences in your native Android and iOS apps using React Native. We provide powerful and customizable UI screens and elements that can be used out-of-the-box to collect your users' payment details.\n\n## Getting started\n\nGet started with our [📚 integration guides](https://stripe.com/docs/payments/accept-a-payment?platform=react-native) and [example project](./CONTRIBUTING.md#running-the-example-app), or [📘 browse the SDK reference](https://stripe.dev/stripe-react-native).\n\n\u003e Updating to a newer version of the SDK? See our [changelog](https://github.com/stripe/stripe-react-native/blob/master/CHANGELOG.md).\n\n## Features\n\n**Simplified Security**: We make it simple for you to collect sensitive data such as credit card numbers and remain [PCI compliant](https://stripe.com/docs/security#pci-dss-guidelines). This means the sensitive data is sent directly to Stripe instead of passing through your server. For more information, see our [Integration Security Guide](https://stripe.com/docs/security).\n\n**Apple Pay**: We provide a [seamless integration with Apple Pay](https://stripe.com/docs/apple-pay).\n\n**Payment methods**: Accepting more [payment methods](https://stripe.com/docs/payments/payment-methods/overview) helps your business expand its global reach and improve checkout conversion.\n\n**SCA-Ready**: The SDK automatically performs native [3D Secure authentication](https://stripe.com/docs/payments/3d-secure) if needed to comply with [Strong Customer Authentication](https://stripe.com/docs/strong-customer-authentication) regulation in Europe.\n\n**Native UI**: We provide native screens and elements to securely collect payment details on Android and iOS.\n\n**PaymentSheet**: [Learn how to integrate](https://stripe.com/docs/payments/accept-a-payment) PaymentSheet, our new pre-built payments UI for mobile apps.\n- PaymentSheet lets you accept cards, Apple Pay, Google Pay, and much more out of the box and also supports saving \u0026 reusing payment methods.\n- PaymentSheet currently accepts the following payment methods: Card, Apple Pay, Google Pay, SEPA Debit, Bancontact, Billie, iDEAL, EPS, P24, Afterpay/Clearpay, Klarna, Giropay, and ACH.\n- PaymentSheet provides card scanning on iOS and Android, with the Android functionality provided by [Google Payment Card Recognition](https://developers.google.com/pay/payment-card-recognition/debit-credit-card-recognition). To enable card scanning in your app, follow [our guide](https://docs.corp.stripe.com/payments/accept-a-payment?payment-ui=mobile\u0026platform=react-native#react-native-card-scanning).\n\n#### Recommended usage\n\nIf you're selling digital products or services within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use the app store's in-app purchase APIs. See [Apple's](https://developer.apple.com/app-store/review/guidelines/#payments) and [Google's](https://support.google.com/googleplay/android-developer/answer/9858738?hl=en\u0026ref_topic=9857752) guidelines for more information. For all other scenarios you can use this SDK to process payments via Stripe.\n\n## Installation\n\n```sh\nyarn add @stripe/stripe-react-native\nor\nnpm install @stripe/stripe-react-native\n```\n\n### Expo\n\n\u003e [Find Expo's full documentation here](https://docs.expo.io/versions/latest/sdk/stripe/).\n\nEach Expo SDK version requires a specific `stripe-react-native` version. See the [CHANGELOG](./CHANGELOG.md) for a mapping of versions. To install the correct version for your Expo SDK version run:\n\n```sh\nexpo install @stripe/stripe-react-native\n```\n\nNext, add:\n\n```json\n{\n  \"expo\": {\n    ...\n    \"plugins\": [\n      [\n        \"@stripe/stripe-react-native\",\n        {\n          \"merchantIdentifier\": string | string [],\n          \"enableGooglePay\": boolean\n        }\n      ]\n    ],\n  }\n}\n```\n\nto your `app.json` file, where `merchantIdentifier` is the Apple merchant ID obtained [here](https://stripe.com/docs/apple-pay?platform=react-native). Otherwise, Apple Pay will not work as expected. If you have multiple `merchantIdentifier`s, you can set them in an array.\n\n### Requirements\n\n#### Android\n\n- Android 5.0 (API level 21) and above\n  - Your `compileSdkVersion` must be `34`. See [this issue](https://github.com/stripe/stripe-react-native/issues/812) for potential workarounds.\n- Android gradle plugin 4.x and above\n- Kotlin 2.x and above. See [this issue](https://github.com/stripe/stripe-react-native/issues/1924#issuecomment-2867227374) for how to update the Kotlin version when using react-native 0.77 and below or Expo SDK 52.\n\n_Components_\n\nIn order to use [CardForm](https://stripe.dev/stripe-react-native/api-reference/index.html#CardForm) component, you need to install and configure [Material Components theme](https://github.com/material-components/material-components-android/blob/master/docs/getting-started.md#4-change-your-app-theme-to-inherit-from-a-material-components-theme) in your app.\n\n1. Add below dependency to your `app/build.gradle` file with specified version\n\n```tsx\nimplementation 'com.google.android.material:material:\u003cversion\u003e'\n```\n\n2. Set appropriate style in your `styles.xml` file\n\n```tsx\n\u003cstyle name=\"Theme.MyApp\" parent=\"Theme.MaterialComponents.DayNight\"\u003e\n    \u003c!-- ... --\u003e\n\u003c/style\u003e\n```\n\n#### iOS\n\nThe Stripe React Native SDK supports all [Apple supported Xcode versions](https://developer.apple.com/news/upcoming-requirements/) and is compatible with apps targeting iOS 13 or above. For iOS 12 support, please use [`@stripe/stripe-react-native@0.19.0`](https://github.com/stripe/stripe-react-native/releases/tag/v0.19.0).\n\nThe SDK uses TypeScript features available in Babel version `7.9.0` and above.\nAlternatively use the `plugin-transform-typescript` plugin in your project.\n\nYou'll need to run `pod install` in your `ios` directory to install the native dependencies.\n\n## Usage example\n\nFor a complete example, [visit our docs](https://docs.stripe.com/payments/accept-a-payment?platform=react-native).\n\n```tsx\n// App.ts\nimport { StripeProvider } from '@stripe/stripe-react-native';\n\nfunction App() {\n  return (\n    \u003cStripeProvider\n      publishableKey={publishableKey}\n      merchantIdentifier=\"merchant.identifier\" // required for Apple Pay\n      urlScheme=\"your-url-scheme\" // required for 3D Secure and bank redirects\n    \u003e\n      \u003cPaymentScreen /\u003e\n    \u003c/StripeProvider\u003e\n  );\n}\n\n// PaymentScreen.ts\nimport { useStripe } from '@stripe/stripe-react-native';\n\nexport default function PaymentScreen() {\n  const { initPaymentSheet, presentPaymentSheet } = useStripe();\n\n  const setup = async () =\u003e {\n    const { error } = await initPaymentSheet({\n      merchantDisplayName: 'Example, Inc.',\n      paymentIntentClientSecret: paymentIntent, // retrieve this from your server\n    });\n    if (error) {\n      // handle error\n    }\n  };\n\n  useEffect(() =\u003e {\n    setup();\n  }, []);\n\n  const checkout = async () =\u003e {\n    const { error } = await presentPaymentSheet();\n\n    if (error) {\n      // handle error\n    } else {\n      // success\n    }\n  };\n\n  return (\n    \u003cView\u003e\n      \u003cButton title=\"Checkout\" onPress={checkout} /\u003e\n    \u003c/View\u003e\n  );\n}\n```\n\n## Stripe initialization\n\nTo initialize Stripe in your React Native app, use the `StripeProvider` component in the root component of your application, or use the `initStripe` method.\n\n`StripeProvider` can accept `urlScheme`, `publishableKey`, `stripeAccountId`, `threeDSecureParams` and `merchantIdentifier` as props. Only `publishableKey` is required.\n\n```tsx\nimport { StripeProvider } from '@stripe/stripe-react-native';\n\nfunction App() {\n  const [publishableKey, setPublishableKey] = useState('');\n\n  const fetchPublishableKey = async () =\u003e {\n    const key = await fetchKey(); // fetch key from your server here\n    setPublishableKey(key);\n  };\n\n  useEffect(() =\u003e {\n    fetchPublishableKey();\n  }, []);\n\n  return (\n    \u003cStripeProvider\n      publishableKey={publishableKey}\n      merchantIdentifier=\"merchant.identifier\" // required for Apple Pay\n      urlScheme=\"your-url-scheme\" // required for 3D Secure and bank redirects\n    \u003e\n      // Your app code here\n    \u003c/StripeProvider\u003e\n  );\n}\n```\n\nor\n\n```tsx\nimport { initStripe } from '@stripe/stripe-react-native';\n\nfunction App() {\n  // ...\n\n  useEffect(() =\u003e {\n    initStripe({\n      publishableKey: publishableKey,\n      merchantIdentifier: 'merchant.identifier',\n      urlScheme: 'your-url-scheme',\n    });\n  }, []);\n}\n```\n\nYou can find more details about the `StripeProvider` component in the [API reference](https://stripe.dev/stripe-react-native/api-reference/index.html#StripeProvider).\n\n## Testing\n\nThis library includes a built in mock file for Jest.\nIn order to use it, add the following code to the Jest setup file:\n\n```tsx\nimport mock from '@stripe/stripe-react-native/jest/mock.js';\n\njest.mock('@stripe/stripe-react-native', () =\u003e mock);\n```\n\nTo have a more control over the mocks, you can extend and override particular methods e.g.:\n\n```tsx\nconst presentNativePayMock = jest.fn();\n\njest.mock('@stripe/stripe-react-native', () =\u003e ({\n  ...mock,\n  presentNativePay: presentNativePayMock,\n}));\n```\n\n## Contributing\n\nSee the [contributor guidelines](CONTRIBUTING.md) to learn how to contribute to the repository or to learn how to run the example app.\n\n## Troubleshooting\n\n### Android web browser windows close on backgrounding the app\n\nThis is known limitation of using `singleTask` as your `launchMode` on Android. See [here](https://github.com/stripe/stripe-react-native/blob/master/docs/android-chrome-tab-closes-on-background.md) for a workaround.\n\n### `Undefined symbols for architecture x86_64` on iOS\n\nWhile building your iOS project, you may see a `Undefined symbols for architecture x86_64` error. This is caused by `react-native init` template configuration that is not fully compatible with Swift 5.1.\n\n```\nUndefined symbols for architecture x86_64:\n  \"(extension in Foundation):__C.NSScanner.scanUpToString(Swift.String) -\u003e Swift.String?\", referenced from:\n      static Stripe.STPPhoneNumberValidator.formattedRedactedPhoneNumber(for: Swift.String, forCountryCode: Swift.String?) -\u003e Swift.String in libStripe.a(STPPhoneNumberValidator.o)\n  \"__swift_FORCE_LOAD_$_swiftUniformTypeIdentifiers\", referenced from:\n      __swift_FORCE_LOAD_$_swiftUniformTypeIdentifiers_$_Stripe in libStripe.a(PKPaymentAuthorizationViewController+Stripe_Blocks.o)\n```\n\nFollow these steps to resolve this:\n\n- Open your project via Xcode, go to `project -\u003e build settings`, find `library search paths` and remove all swift related entries such as:\n  `$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)` and `$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)`.\n- Create a new Swift file to the project (File \u003e New \u003e File \u003e Swift), give it any name (e.g. `Fix.swift`), check the appropriate Targets and create a bridging header when prompted by Xcode.\n\n### `TypeError: null is not an object (evaluating '_NativeStripeSdk.default.initialise')` on Android\n\nYou might see error this whilst initializing the `StripeProvider` component with Expo. This is caused by using an older version of Expo before stripe-react-native was [officially supported](https://github.com/stripe/stripe-react-native/issues/3#issuecomment-846225534). Updating Expo Go from the stores (or locally on simulators installed with `expo install:client:[ios|android]`) should fix the problem.\n\nIf you're still having troubles, please [open an issue](https://github.com/stripe/stripe-react-native/issues/new/choose) or jump in our [developer chat](https://stripe.com/go/developer-chat).\n\n### `Apple Pay Is Not Available in \"My App Name\"`\n\nThis can occur if you attempt to process an Apple Pay payment on a physical device (even in test mode) without having created **and uploaded** your Apple Pay Certificate to the Stripe Dashboard. Learn how to do that [here](https://stripe.com/docs/apple-pay#csr).\n\n### `UnsupportedModulePropertyParserError` on iOS\n\nWhile installing pods in your iOS project using a Stripe React Native version before 0.52, the old architecture, and a React Native version after 0.74, you may encounter the following error:\n\n```\nUnsupportedModulePropertyParserError: Module NativeStripeSdkModule: TypeScript interfaces extending TurboModule must only contain 'FunctionTypeAnnotation's. Property 'onConfirmHandlerCallback' refers to a 'TSTypeReference'.\n```\n\nIf possible, update to version 0.52 or above of the Stripe React Native SDK.\nIf you are unable to do so, please follow our [guide to apply the fix patch](https://github.com/stripe/stripe-react-native/tree/master/patches).\n","funding_links":[],"categories":["TypeScript","React Native","Payments \u0026 In-App Purchases"],"sub_categories":["Integrations","Graphics \u0026 Drawing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fstripe-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstripe%2Fstripe-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstripe%2Fstripe-react-native/lists"}