Hyperswitch React Native and Flutter SDKs

Plan a cross-platform checkout with the Hyperswitch React Native (including Expo) and Flutter SDKs, including setup order, customization limits, common build issues and what your team must confirm against your self-hosted server version.

On this page

How the Hyperswitch React Native and Flutter SDKs fit your app

The Hyperswitch React Native and Flutter SDKs are client libraries that let a team ship one mobile checkout across iOS and Android from a single codebase. The Hyperswitch repository lists client SDKs for React Native and Flutter alongside its web, Android and iOS SDKs, so either framework can render the payment screens for both platforms. This page covers setup, widgets, customization and common build issues. Exact package names, minimum iOS and Android versions and Expo support change between releases, so confirm each of them in the current SDK documentation before you commit to a stack.

The SDK renders the payment screens on the device, but it does not decide what gets charged. Your app asks your own backend to create a payment, the backend calls the Hyperswitch server with its secret credentials, and the server returns the client details the SDK needs to collect and confirm the payment. Your backend also receives the outcome through the server side, so the final status never depends on the app alone. Keep the API keys and any processor credentials out of the mobile bundle, and check which publishable key and endpoint each build environment uses before you release. Pointing the SDK at a self-hosted server is a separate step covered elsewhere on this page's sibling topics.

Before you choose between React Native and Flutter, confirm three things with your mobile team: whether your app already runs one of these frameworks, whether you need Expo managed workflow or bare native builds, and which native payment methods such as Apple Pay and Google Pay must work on day one. Each of these affects native configuration, signing and the version pairing with your self-hosted server. Ask your platform owner to confirm the pairing matrix for the release you plan to deploy, because the SDK and the app server are expected to move together. A short proof of concept on both target platforms, run against your own backend, will expose most build and configuration issues early.

Choosing the Hyperswitch React Native or Flutter SDK for your app

This table compares the four ways a team can ship Hyperswitch checkout in a mobile app: React Native with Expo, React Native bare, Flutter, and native Android and iOS SDKs. Read each row as a question to answer with your own team and codebase, then confirm the listed prerequisites against the current SDK documentation before you commit. The main takeaway is that the decision usually turns on the codebase you already have and how much native code your app is willing to own.

OptionFitWhat to confirmMain trade-off
React Native with ExpoSuits teams with JavaScript or TypeScript skills and an existing Expo app that can use the SDK without ejectingSupported Expo SDK version, the config plugin or prebuild path the SDK needs, and EAS build compatibilityFastest path for JavaScript teams, but native configuration is constrained by what Expo supports for the SDK
React Native bareSuits JavaScript teams whose app already has custom native modules or native build pipelinesReact Native version, Android Gradle and iOS CocoaPods setup, and the native module linking steps in the current docsFull control of native code, at the cost of owning upgrades of both the React Native and native layers
FlutterSuits teams with Dart skills or an existing Flutter codebase serving Android and iOS from one projectFlutter channel and version, plugin dependencies, and minimum Android and iOS targets stated in the SDK docsOne Dart codebase for both platforms, but plugin updates and Flutter upgrades must be tested against the checkout flow
Native Android and iOS SDKsSuits apps that already have separate Android and iOS teams or need the deepest platform integrationAndroid and iOS requirements in the native SDK guides, including payment sheet and Apple Pay or Google Pay setupTwo implementations to build, test and maintain, but the lowest distance between checkout and platform payment features

How Expo, bare React Native and Flutter projects differ at setup

An Expo project usually reaches native code through configuration rather than by editing the android and ios folders directly. In a managed workflow you add the SDK as a JavaScript dependency and register any native modules through config plugins. In prebuild, Expo generates the native projects on demand, so changes you make by hand in those folders can be overwritten the next time they are regenerated. Plan the payment sheet hosting around this, because the checkout screen lives in your React tree and is opened from your own navigation.

  • Dependencies: install the React Native SDK with the package manager your project uses, then rebuild the development client after any native module is added, since Expo Go may not include it.
  • Native configuration: keep Android and iOS settings in the Expo config and plugin files so they survive prebuild regeneration.
  • Hosting the sheet: call the SDK from a screen or handler inside your React tree and keep the payment initialization on your backend.
  • Where builds fail: usually at prebuild or the first native compile, when a plugin is missing or the development client is stale.
  • Version pinning: Expo SDK versions constrain which React Native versions you can run, so check compatibility before upgrading either.

Before you build, confirm the exact package versions, plugin requirements and minimum native versions in the SDK's own installation guide for your Expo release.

How a mobile payment moves between the app, your backend and Hyperswitch

The payment starts in the mobile app, where the React Native or Flutter SDK collects payment details and shows the payment sheet. The app never holds the secret API key: your backend creates the payment with Hyperswitch and passes back only a client-scoped value for the SDK to use. The self-hosted Hyperswitch router sends the payment to the processor, and the processor's status events return through webhooks to your backend, which is the source of truth for order status. When testing, confirm that no secret credential appears in the app bundle and that webhook results reach your backend.

Trust boundary between the app and the backend that holds the secret key.

Hyperswitch React Native and Flutter SDK setup sequence

This sequence takes a team from version matching through a verified end-to-end test payment, so the React Native or Flutter checkout works against the self-hosted router and Control Center the team actually runs.

  1. Confirm SDK and server version compatibility

    Before installing anything, the lead engineer checks the SDK version against the self-hosted router and Control Center versions. Hyperswitch publishes a compatibility matrix with each GitHub release, so read the matrix for the release line you run and record the pair in the project's documentation. If your router is on a version that requires Superposition as a configuration dependency, confirm that service is running first. Done when the team has a written version pair and a running router that matches it.

  2. Create the payment on the merchant backend

    Your backend, not the mobile or Flutter app, creates the payment against the self-hosted router using your secret API key and returns only the client secret and publishable details the SDK needs. Keep card data out of this step entirely. Verify by calling the create-payment endpoint from a backend test and confirming the router returns a payment ID and a client secret with a status that awaits payment method selection.

  3. Install the SDK in the project

    The mobile developer adds the Hyperswitch React Native package (including Expo projects, which need a development build rather than the standard Expo Go client for native modules) or the Flutter package to the project at the version confirmed in step one. Pin the exact version in the lockfile or pubspec. Verify with a clean dependency install and a project that compiles with the SDK imported but no screen yet mounted.

  4. Configure native build settings per platform

    Set the platform-specific requirements in the iOS and Android projects, such as minimum OS and SDK levels, pod or Gradle dependencies, and any wallet entitlements you plan to offer. Confirm each requirement against the SDK's own setup guide for your version rather than an older tutorial. Verify by producing a successful debug build on both iOS and Android from a clean checkout.

  5. Point the SDK at the correct environment

    Configure the SDK to call your self-hosted router rather than a default endpoint, and use publishable keys that belong to the same environment as the backend that created the payment. Keep sandbox and production keys and URLs in separate build configurations so a test build cannot send live traffic. Verify by logging the resolved base URL in a debug build and confirming a session request reaches your router's logs.

  6. Mount the payment screen

    Add the SDK's payment component or screen to the checkout flow, passing the client secret created by the backend. Confirm which payment methods appear for your configured connectors and wallets. Verify on a simulator or emulator for each platform that the payment screen renders, lists the expected methods, and accepts a test card from the processor's sandbox list.

  7. Handle success, failure and pending results

    Handle every outcome the SDK returns: success, failure, and pending, where a payment waits on an asynchronous method or redirect. Do not treat the in-app result as final. Have your backend confirm the payment status with the router and rely on webhooks for fulfillment, so a closed app or dropped connection does not leave an order in an unknown state. Verify by forcing each outcome in the test environment and checking that the order record matches the router's status.

  8. Run end-to-end tests in a test environment

    Run complete purchases on both platforms against the self-hosted test environment, covering success, decline, abandoned checkout, pending methods, and webhook delivery. Check that router logs, the Control Center and your order system agree on each payment. Confirm the results with your payment and security owners before promoting the same version pair to production. Done when every test case passes on iOS and Android and the team records the version pair it validated.

What you can customize in the cross-platform checkout and where it stops

The React Native and Flutter SDKs give you configuration levers for branding, payment method presentation, placement and text. Each lever has a boundary, and past that boundary the work moves from configuration to frontend engineering or to the headless approach. Confirm each item against the SDK configuration reference for the version you pin before you commit to a design.

Branding and appearance options

Appearance settings cover colors, fonts and shape values that the SDK applies to its own screens. Check which tokens your pinned React Native or Flutter version exposes, and whether they reach every screen, including sheets opened by wallet flows. Anything beyond those tokens, such as custom icons, bespoke animations or non-standard input fields, means you are styling the SDK's internals or building your own UI. Test on both iOS and Android, because the same token can render differently across platforms.

Hyperswitch docs

Payment method ordering and visibility

Ordering and filtering let you choose which payment methods appear and in what sequence, usually based on the customer's country, currency or amount. Confirm whether visibility is controlled by the client configuration, by the payment session returned from your server, or by connector and routing rules in the backend. Conditional logic that depends on your own customer data should live on your server, because the mobile client should not hold that decision. Plan a test matrix for each market you sell in.

Hyperswitch docs

Layout and widget placement in the app

You decide where the payment component sits in your screen flow, how it is presented (full screen, modal or inline) and how it fits with your navigation and back-button behavior. Confirm which presentation modes the pinned SDK supports and what it does on tablets and in landscape orientation. Inline placement inside a scrolling screen needs careful sizing, and keyboard handling on Android and iOS often needs specific tests. Anything that rearranges the SDK's own fields or sheet structure requires frontend work beyond the configuration.

Localization and text

Localization covers the labels, button text, error messages and legal copy that the SDK shows. Confirm which locales ship with your SDK version, whether you can override individual strings, and who maintains translations when your app adds a language. Right-to-left layouts, currency formatting and date display need testing in each locale, since the SDK's rendering and your app's surrounding screens must agree. Error messages from processors may remain in the processor's language unless your integration maps them.

Native wallet buttons

Apple Pay and Google Pay buttons depend on native capabilities, merchant identifiers and platform rules that your app must satisfy. Confirm the required entitlements, the merchant setup for each wallet and whether the SDK renders the official button or lets you supply one. Button styling is often constrained by the wallet providers' guidelines, so a custom wallet button may be non-compliant or unavailable. Test on devices where a wallet is not configured, since the expected fallback behavior should be explicit.

Where custom UI requires the headless approach

When you need your own card fields, a fully custom payment flow or a design the configuration cannot express, the work moves to the headless SDK. That path puts more of the payment interface under your control, and with it more of the PCI DSS scope that comes with handling card input. Ask the team to write down the specific screens that cannot be met with configuration before choosing a path. Revisit that decision whenever you pin a new SDK version, because the boundary moves as the SDK adds options.

Common build issues and how to narrow them down

Most problems teams hit with a cross-platform payment SDK fall into five groups: native dependency and build resolution, mismatched SDK and server versions, Expo prebuild and native module configuration, Flutter plugin and Dart version constraints, and missing environment or publishable key configuration. Sort the symptom into one of these groups before changing any code, because each group has a different first check. A failure at install or compile time points to dependencies. A failure after the payment sheet opens points to configuration or the backend. Working from the group, not the last change you made, keeps the search short.

Start with versions. Record the SDK version, the React Native or Flutter version, the Expo SDK if you use one, and the Hyperswitch server and Control Center versions your environment runs. Check the compatibility notes in the Hyperswitch releases page for the server release you target. Then reproduce the problem on a clean build: delete the native build caches, reinstall packages, regenerate native projects if you use Expo prebuild, and build again. If the issue disappears, the cause was stale generated code. If it persists, compare your project's configuration with the sample app in the Hyperswitch repository, changing one difference at a time. Expo prebuild output and Flutter plugin constraints are common places where a small deviation from the sample breaks the build.

Once the app builds, verify the backend response before blaming the SDK. Confirm that your server creates the payment and returns the client secret or payment fields the SDK expects, and that the publishable key and base URL match the environment you are calling. A wrong publishable key or a base URL pointing at the wrong environment often looks like an SDK failure. Log the server response and the SDK's error callback side by side. If the server returns a clean response and the SDK still fails, record the SDK version, platform and exact steps, then raise it in the repository or with your implementation partner. Confirm with your own engineers which environment variables and key stores your build pipeline uses, since these differ between local, staging and release builds.

Security considerations for mobile checkout with a self-hosted backend

Mobile checkout spreads payment handling across the app, your backend and the self-hosted Hyperswitch router. The cards below cover where each piece of sensitive data should live, which endpoints need protecting and which release decisions to confirm before go-live.

Keep secret keys off the device

A React Native or Flutter app is distributed to every user's device, so anything bundled in it can be extracted. Hyperswitch secret API keys belong only on your server, while the app should hold just the client-side identifiers the SDK needs. Confirm with your build pipeline that no secret reaches the JavaScript bundle, Dart build output, asset files or environment variables compiled into the app.

Self-hosting docs

Create payments on the merchant backend

Your backend should create the payment intent, set the amount and currency, and return only the client secret the SDK needs. Because the amount is set server-side, a tampered app cannot change what a customer pays. Review which request fields the app can influence and reject any amount or currency sent from the device.

Protect the self-hosted router endpoints

The Hyperswitch router is reachable from the internet so that mobile apps can call it, which makes its endpoints part of your attack surface. Put it behind TLS termination, rate limits and a web application firewall where your architecture allows, and restrict admin and Control Center routes to private networks or SSO-protected access. Confirm which routes the SDK calls and expose only those publicly.

Control logs and crash reports

Mobile crash reporters, analytics SDKs and debug logs can capture request bodies, card fields or client secrets without anyone noticing. Set the app to log payment identifiers only, strip payment payloads from crash reports, and disable verbose SDK logging in release builds. Test a failed payment in a release build and inspect what your crash tool and log store received.

Decide on certificate pinning and network settings

Certificate pinning reduces the risk of man-in-the-middle attacks, but it also makes certificate rotation on your self-hosted endpoint a release-blocking task. Decide whether to pin, which certificate or public key to pin, and how the app recovers when a certificate changes. Confirm how the SDK handles custom base URLs and whether network security settings on each platform must be adjusted.

Align app releases with SDK updates

The SDK version in your app is fixed at store release time, so a security fix in the SDK reaches users only when they install the new build. Match the SDK version to your router and Control Center versions, and plan emergency release steps for store review delays. If you use over-the-air updates, weigh the speed of delivery against the added trust and signing requirements.

What does a Hyperswitch React Native or Flutter SDK integration involve?

What drives the effort of a Hyperswitch React Native or Flutter SDK integration?

The main drivers are the number of platforms you ship to, how much your existing mobile app and backend already do, how far the checkout UI departs from the SDK's default screens, and how ready your self-hosted Hyperswitch server is. Each platform adds its own build configuration, signing, and device testing. An app that already creates payments through a backend you control usually needs less new work than one that must add a server-side payment flow first. Custom UI work adds design review and additional test cases. Confirm with your team which of these apply before you ask for a quote, because they change the scope more than any single line item.

Which parts of a Hyperswitch SDK integration are one-time and which recur?

The initial setup, backend payment creation, UI configuration, and test coverage are one-time costs. Recurring work includes upgrading the SDK when new versions are released, upgrading the self-hosted Hyperswitch server so that the SDK and server stay compatible, and submitting new builds to the Apple App Store and Google Play. Each SDK upgrade can require regression testing across payment methods you have enabled. Ask for the recurring work to be listed separately in any quote, with the release cadence you expect your team to follow, so that ongoing support is budgeted rather than discovered later.

What does the work need from our team to start?

Expect to provide read access to your mobile repository, a test merchant account and publishable keys for each environment, access to the staging and production Hyperswitch server environments, and test payment credentials for the processors you plan to enable. You should also name one application owner who can make decisions about checkout flows, supported payment methods, and release timing. Missing test accounts and unclear ownership are common causes of delay, so agree on these items in the written scope before work begins.

Can our own mobile team integrate the Hyperswitch SDK without outside help?

Yes, a team with working knowledge of React Native or Flutter, native build tooling, and payment flows can usually do the integration in house. The harder parts tend to be server-side payment creation, handling of asynchronous payment results, and keeping publishable keys and environment settings correct across builds. Consider whether your team has someone who can own the self-hosted server and its upgrades, since the mobile SDK depends on that server. Outside help is most useful when the team lacks mobile payment experience, has a tight release date, or needs a review of the setup before a compliance assessment.

How long does a scoped SDK integration typically take?

Duration depends on the same factors that drive effort: the number of platforms, the state of your backend and self-hosted server, how much custom UI you need, and how much test coverage you require. A single platform on an existing backend with default screens takes less time than several platforms with a custom checkout and a new server. Rather than relying on a generic estimate, ask for a timeline tied to the written scope, with milestones for backend work, SDK integration, test accounts, and store submission. Ask which of these milestones depend on your team's response times.

What should we ask for in a written quote for an SDK integration?

Ask for a quote that lists each platform in scope, the backend changes included, the custom UI work and its limits, the test plan and devices covered, and the environments the work targets. Require a separate line for ongoing upgrades, server compatibility checks, and store release support. Ask how the quote handles changes to scope, what you must provide and by when, and which Hyperswitch version and SDK version the work is built against. Also ask who owns the code and documentation at handover, and how defects found after go-live are handled.

Which checks should our engineers run before accepting the integration?

Engineers should verify that the SDK version matches the self-hosted server version according to the compatibility matrix in the Hyperswitch releases, that publishable keys and API endpoints are set per environment, and that payment results are confirmed on the server rather than trusted from the client. They should test failure paths such as declined payments, cancelled sheets, and network loss, and confirm release builds on both iOS and Android. Ask for a documented test run covering these cases and a list of known build issues with their fixes.

Limits to confirm before committing to a cross-platform build

A cross-platform checkout puts one Hyperswitch backend behind three client toolchains, so each version and feature boundary has to be confirmed in your own environment. The cards below cover the pairings, toolchains, platform coverage and dependencies to verify before you commit scope and timelines.

Mobile SDK pairing with the router

The Hyperswitch releases page publishes a compatibility matrix for Control Center and web client versions, but it does not settle the pairing for the React Native and Flutter SDKs. Confirm in writing which mobile SDK release works with the router version you run, and whether that pairing changes with each monthly minor release. Ask how your team will test a router upgrade against the mobile apps before it reaches production. Treat the mobile pairing as its own line item in your upgrade plan.

Hyperswitch releases

React Native, Expo and Flutter versions

Your app's toolchain may not match the versions the SDKs were built and tested against. Confirm the supported React Native and Expo versions, including whether your Expo workflow needs a development build or prebuild, and the supported Flutter SDK version. Ask whether these versions are documented in the SDK repository or only in release notes. Check that your existing build pipeline, signing setup and dependency locks work with the version you target.

iOS and Android version support

Minimum iOS and Android versions determine which devices your checkout can serve and which native dependencies the SDK pulls in. Confirm the minimum OS versions for each platform and whether they differ between the React Native and Flutter SDKs. Ask how the SDK behaves on OS versions below the minimum, and whether your app store listing and analytics can show the split by version. Include older devices in your test matrix before you set the release scope.

Wallet and payment method parity

Apple Pay, Google Pay and alternative payment methods do not always behave the same way on iOS, Android, React Native and Flutter. Ask which wallets and APMs are available on each platform and each SDK, and whether any are missing or only available through a web view. Confirm how wallet setup, merchant identifiers and domain verification are handled for each platform. Build a parity table from the vendor's answers and use it to decide which flows you test on which devices.

Beta feature status

Some Hyperswitch features are documented as beta, and beta status can change between releases. Ask which mobile SDK features, widgets or components are beta, what production support they receive, and whether a beta feature can be turned off without a code change. Confirm the deprecation policy for beta features that your checkout depends on. Record each beta dependency in your risk register so the business owner knows the exposure before launch.

Superposition dependency on v1.124.0 and later

The v1.124.0 release notes state that Superposition became a required configuration dependency, so deployments must run a Superposition service before they upgrade to that version. Confirm whether your stack already runs Superposition, who will operate it and how it is backed up. Ask whether the mobile SDK configuration depends on Superposition during checkout or only at deployment time. Add this service to your environment inventory before the upgrade is scheduled.

Hyperswitch repository

How DeployOpen scopes and delivers a Hyperswitch mobile checkout

DeployOpen plans, implements, customizes, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For Hyperswitch React Native and Flutter SDKs, we start with a written scope that ties the mobile checkout to the self-hosted backend you run, then build, test and hand over the integration so your team can operate it.

How we scope

  • Written scope listing the target apps, React Native (including Expo) or Flutter versions, and payment methods to enable
  • Mapping of which SDK version pairs with your self-hosted Hyperswitch server version and Control Center release
  • Confirmation of the backend endpoints, publishable keys and environments each app build will use

How we build

  • Integration of the SDK widgets, payment flow and result handling into your existing app navigation
  • Appearance customization limited to what the SDK supports, with brand settings agreed in the scope
  • Test plans covering iOS and Android builds, sandbox and production configurations, and common build failures

How we hand over

  • Documentation of setup steps, dependency versions, configuration keys and the build pipeline changes made
  • Runbook for upgrading the SDK and the matched server components when a new Hyperswitch release ships
  • Walkthrough with your mobile and payments engineers covering the test results and open items

How we support

  • Fixed-scope engagements, with scope, deliverables and timelines agreed in writing before work starts
  • Ongoing support, SDK upgrades and continuous testing available as a retainer after handover
  • Quote follows from the written scope, with your team confirming SDK version compatibility before each upgrade

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.