@stripe/stripe-react-native
.
This library has been deprecated in favor of expo-payments-stripe
Provides support for payments through Stripe and Apple Pay on iOS (in bare apps), and Stripe on Android (plus Android Pay with bare apps).
API documentation
Installation in managed Expo projects
For managed managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.
Installation in bare React Native projects
For bare React Native projects, you must ensure that you have installed and configured the react-native-unimodules
package before continuing.
Add the package to your npm dependencies
expo install expo-payments-stripe
- Include the config plugin in your
app.config.js
orapp.json
. Add the following props:-
scheme
is the redirect URI that's used for returning to the app after an external payment. This should not match one of your existing schemes as it'll redirect to a special Activity on Android. -
merchantId
is an Apple ID that's required for making payments. This value should match themerchantId
property used withsetOptionsAsync({ ... })
in your React code.
-
{
"plugins": [
[
"expo-payments-stripe",
{
"scheme": "your-redirect-uri",
"merchantId": "merchant.<com.example.development>"
}
]
]
}
- Regenerate the native folders with
expo eject
- Build the project with
yarn ios
andyarn android
Configure for iOS
Run npx pod-install
after installing the npm package.
Configure for Android
No additional set up necessary.
Contributing
Contributions are very welcome! Please refer to guidelines described in the contributing guide.