A small React Native library that provides a client for the Stripe REST API, primarily focused on creating tokens from card details. Version 0.1.0 is the latest and only stable release. It is a lightweight alternative to the official Stripe SDK for React Native, but note that many advertised methods (createCustomer, createCharge, etc.) are marked as deprecated in the README and may not work reliably. The library has a fixed security issue (issue #8) and has minimal maintenance. It requires React Native 0.27.2+ and has not been updated since 2016.
npm install react-native-stripe-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Imports Stripe, instantiates with API key, and creates a token from test card details.
Update to version 0.1.0 or later.
Use only createToken. For other Stripe operations, use the official Stripe SDK or a backend proxy.
Ensure React Native version is >=0.27.2 and Android API level >=19.
Consider using the official Stripe SDK for React Native or a more modern alternative.
Migrate to the official Stripe SDK (@stripe/stripe-react-native) or a modern wrapper.
Wrap calls in try-catch and handle errors manually. For better error handling, use the official Stripe SDK.
npm install react-native-stripe-api --save
const Stripe = require('react-native-stripe-api').default;Provide a valid Stripe publishable key to the Stripe constructor.
Check network connectivity and ensure the API key is correct. On Android emulator, use 10.0.2.2 for localhost.
Use a valid Stripe publishable key (starts with 'pk_test' or 'pk_live').