PaySwitcher
  • About PaySwitcher
    • 🛒For Online Businesses
    • 🪜For Small & Medium Enterprises
    • 🏢For Enterprises
    • 🖥️For SaaS Providers
    • 🛍️For E-Commerce Businesses
    • 📦For Marketplace/Platforms
    • 🏦For Banks & Financial Institutions
  • PaySwitcher Cloud
    • ⚡Quickstart
      • 📥Migrate from Stripe
        • Web
        • Android
        • iOS
        • React Native
      • 🥗Payment Recipes
        • Use PayPal With Stripe
    • ⚙️Control Centre Account setup
    • 📦Integration guide
      • 🌐Web
        • Node And React
        • Customization
        • Error Codes
        • Node and HTML
        • Vanilla JS and REST API Integration
      • 📱Android
        • Kotlin with Node Backend
        • Customization
        • Features
      • 📱iOS
        • Swift with Node Backend
        • Customization
        • Features
      • ⏺️React Native
        • React Native with Node Backend (Beta)
        • Card Widget (Beta)
        • Customization
      • ⏺️Flutter
        • Flutter with Node Backend
        • Customization
      • Headless SDK
      • Payment Methods Management
    • 💳Payment methods setup
      • 💳Cards
      • 📱Wallets
        • Apple Pay
          • Web Domain
          • iOS Application
        • Google Pay
        • PayPal
      • 📆Pay Later
      • 🏦Banks
        • Bank Debits
        • Bank Redirects
        • Bank Transfers
      • 🪙Crypto
      • 🔑Test Credentials
    • 🔌Connectors
      • 🖲️Available Connectors
        • ACI
        • Adyen
        • Airwallex
        • Authorizedotnet
        • Bambora
        • Bank of America
        • Billwerk
        • Bluesnap
        • Braintree
        • Checkout
        • Coinbase
        • Cybersource
          • Apple Pay
          • Google Pay
        • dLocal
        • Fiserv
        • GlobalPayments
        • GoCardless
        • Klarna
        • Mollie
        • MultiSafepay
        • Nuvei
        • OpenNode
        • Paypal
        • PayU
        • Prophetpay
        • Rapyd
        • Shift4
        • Stripe
        • TrustPay
        • Volt
        • Worldline
        • Worldpay
        • Zen
      • Activate connector on PaySwitcher
      • Test a Payment with connector
    • 🪝Webhooks
  • Features
    • 🔀Payment flows
      • 🔁Saving payment methods & recurring payments
      • 💵Payouts
        • ➕Get started with payouts!
        • 🔗Process payouts using saved payment methods
        • 🛣️Route your payout transactions using Smart Router
        • ♻️Smart Retries in Payout
        • 🔗Payout links
      • 0️ 0️ 0️ Zero Amount Authorization
      • 🔓Tokenization & saved cards
      • 🔗Payment links
      • ⏭️External Authentication for 3DS
      • 💰Manual Capture
      • 🛑Fraud Blocklist
      • 🔁Subscriptions
      • 🔃PG Agnostic Recurring Payments
    • 🕹️Merchant controls
      • 🛣️Smart Router
        • Rule Based Routing
        • Volume Based Routing
        • Default Fallback Routing
      • 🛡️Fraud & risk management
      • 🔃Smart retries
      • 🎛️Analytics & operations
      • 📋3DS decision manager
        • Setup guide
      • 📋Surcharge
        • Surcharge Setup guide
      • 🔼3DS Step-up retries
      • 🚩Disputes/Chargebacks Management
      • 🤝Reconciliation
        • Getting Started with Recon
    • 🔑Account management
      • 🔢Exporting payments data
      • 🤹Multiple accounts & profiles
      • 🛂Manage your team
    • 🛍️E-commerce platform plugins
      • WooCommerce Plugin
        • Setup
        • Compatibility
        • FAQs
  • SECURITY AND COMPLIANCE
    • 🔏Overview
    • 💳PCI Compliance
    • 🔐Data Security
    • 💽GDPR compliance
    • 🕵️Identity and Access Management
  • Learn more
    • 🍡SDK Reference
      • Node
      • React
      • JS
    • 📐PaySwitcher Architecture
      • Router
      • Storage
      • A Payments Switch with virtually zero overhead
    • 🌊Payment flows
Powered by GitBook
On this page
  1. PaySwitcher Cloud
  2. Quickstart
  3. Migrate from Stripe

React Native

Migrate from Stripe on your react native app

PreviousiOSNextPayment Recipes

Last updated 11 months ago

Migrate from Stripe on your React Native app in less than 15 mins!

If you are already integrated with Stripe as your payment processor, we have made migrating to PaySwitcher much simpler for you. And we will be adding quick migration support for more leading payment processors in the near future. And once you migrate, get immediate access to 40+ payment processors and features such as Smart Router, Digital Payments Manager and many more.

React Native - Node Backend and JS Frontend

The code from your Stripe integration to be removed and replaced is explained below in a step by step manner.

Step 1: Install PaySwitcher’s SDK and server side dependencies from npm

 $ npm install @payswitcher/react-native-payswitcher
 $ npm install @payswitcher/hyper-node --save-dev

Install peer dependencies:

 $ npm install react-native-code-push react-native-gesture-handler react-native-inappbrowser-reborn react-native-pager-view react-native-safe-area-context react-native-screens react-native-svg @sentry/react-native

Step 2: Change the API key on the server side and modify the paymentIntent endpoint from your server side. You can get the API key from page on the dashboard.

// from
const stripe = require("stripe")("your_stripe_api_key");
// to
const stripe = require("@payswitcher/hyper-node")("your_payswitcher_api_key");

Step 3: Call useStripe() with your PaySwitcher publishable key to configure the SDK library, from your website

// from
import { StripeProvider } from "@stripe/stripe-react-native";
// to
import { HyperProvider } from "@payswitcher/react-native-payswitcher";
// from
import { useStripe } from "@stripe/stripe-react-native";
// to
import { useStripe } from "@payswitcher/react-native-payswitcher";

Step 4: Configure your checkout form to import from PaySwitcher

// from
<StripeProvider ... > ... </StripeProvider>
// to
<HyperProvider ... > ... </HyperProvider>

Step 5: Run your application to make a test payment. And verify the status of the transaction on PaySwitcher Dashboard and Stripe Dashboard. Congratulations ! You have successfully integrated PaySwitcher to your payments stack and you now have access to a suite of 40+ payment processors and acquirers.

⚡
📥
Developers