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

Web

Migrate from Stripe on your web app

PreviousMigrate from StripeNextAndroid

Last updated 11 months ago

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

Migrate from Stripe

If you are already integrated to Stripe as your payment processor, we have made migrating to PaySwitcher much simpler for you. And once you migrate, get immediate access to 40+ payment processors and features such as Smart Router, Unified analytics and many more.

Stripe’s paymentRequestButton is available under PaySwitcher’s UnifiedCheckout, therefore importing UnifiedCheckout would be sufficient.

The code from your Stripe integration to be removed and replaced is explained below in a step by step manner for both React and HTML frontend. You can find the details for both below.

Web - Node Backend and React Frontend

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

  $ npm install @payswitcher/react-hyper-js
  $ npm install @payswitcher/hyper-js
  $ npm install @payswitcher/payswitcher-node

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 hyper = require("@payswitcher/payswitcher-node")(
  "your_payswitcher_api_key"
);
// from
const paymentIntent = await stripe.paymentIntents.create({
// to
const paymentIntent = await hyper.paymentIntents.create({

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

// from
import { loadStripe } from "@stripe/stripe-js";
import { Elements } from "@stripe/react-stripe-js";
// to
import { loadStripe } from "@payswitcher/hyper-js";
import { hyperElements } from "@payswitcher/react-hyper-js";
// from
const stripePromise = loadStripe("your_stripe_publishable_key");
// to
const hyperPromise = loadHyper("your_payswitcher_publishable_key");

Step 4: Configure your checkout form to import from PaySwitcher

//from
import {
  PaymentElement,
  useStripe,
  useElements,
} from "@stripe/react-stripe-js";
//to
import {
  UnifiedCheckout,
  useStripe,
  useElements,
} from "@payswitcher/react-hyper-js";

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.

Web - Node Backend and HTML Frontend

Step 1: Install PaySwitcher's node server dependency from npm

  $ npm install @payswitcher/payswitcher-node

Step 2: Change the API key on the server side and modify the paymentIntent endpoint from your server side

// from
const stripe = require("stripe")("your_stripe_api_key");
// to
const hyper = require("@payswitcher/payswitcher-node")(
  "your_payswitcher_api_key"
);
// from
const paymentIntent = await stripe.paymentIntents.create({
// to
const paymentIntent = await hyper.paymentIntents.create({

Step 3: Load the PaySwitcher directly from beta.payswitcher.com to remain PCI compliant while collecting the customer's payment details

// from
<script src="https://js.stripe.com/v3/"></script>
// to
<script src="https://beta.payswitcher.com/v1/HyperLoader.js"></script>

Step 4: Initiate the SDK with your PaySwitcher publishable key from your website

// from
const stripe = Stripe("your_stripe_publishable_key");
// to
const hyper = Hyper("your_payswitcher_publishable_key");

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.

Want an easy migration from Stripe for Apps? We got you covered. Follow the docs for Android, iOS and React Native apps.

⚡
📥
Developers