@monoku/react-native-payments-stripe

0.4.3 • Public • Published

react-native-payments-addon-stripe

React Native Payments add-on for processing payments with Stripe.

Installation

First, download the package:

$ yarn add react-native-payments-addon-stripe

Second, install the React Native Payments CLI:

$ yarn add react-native-payments-cli

Lastly, link the native dependencies with the React Native Payments CLI:

$ yarn react-native-payments-cli -- link stripe

NOTE: react-native-payments-cli adds a Build Phase Script to your Xcode project that depends on Carthage.

Usage

In order to receive chargeable Stripe tokens as part of your PaymentResponse, you'll need to add some Stripe specific parameters to your PaymentMethodData.

Here's an example of a Stripe enabled Payment Method Data:

const METHOD_DATA = [{
  supportedMethods: ['apple-pay'],
  data: {
    merchantIdentifier: 'merchant.com.your-app.namespace',
    supportedNetworks: ['visa', 'mastercard', 'amex'],
    countryCode: 'US',
    currencyCode: 'USD',
+   paymentMethodTokenizationParameters: {
+     parameters: {
+       gateway: 'stripe',
+       'stripe:publishableKey': 'your_publishable_key',
+       'stripe:version': '5.0.0' // Only required on Android
+     }
+   }
  }
}];

Resources

Package Sidebar

Install

npm i @monoku/react-native-payments-stripe

Weekly Downloads

16

Version

0.4.3

License

MIT

Unpacked Size

23.7 MB

Total Files

922

Last publish

Collaborators

  • monoku-admin