PlexySDK DOCS
React Native

React Native SDK

Accept payments in your React Native app with Plexy Drop-in and Components

React Native SDK

@plexy/react-native wraps the native Plexy iOS and Android SDKs behind a single JavaScript API. Your shoppers get fully native payment UI on both platforms; you write the integration once in TypeScript.

You can integrate in two ways:

  • Drop-in — an all-in-one native payment sheet that renders every payment method you have enabled. The quickest way to accept payments.
  • Components — one component per payment method (card form, Apple Pay, Google Pay, and more) that you combine with your own checkout UI.

Both support the two server-side integration styles used across Plexy:

  • Sessions flow — your server creates a session, the SDK handles the rest.
  • Advanced flow — your server calls /payments and /payments/details directly and the SDK drives the UI and native actions.

Prerequisites

  • A Plexy account with a client key for client-side authentication and an API key for your backend
  • React Native 0.74 or later (earlier versions require extra steps)
  • iOS 12.0+ / Android 5.0 (API 21)+

The React Native New Architecture is supported on React Native 0.76.0 and above. On older versions, keep the Old Architecture or disable bridgeless mode. See Troubleshooting.

How the pieces fit together

import { PlexyCheckout, usePlexyCheckout } from '@plexy/react-native';
  • <PlexyCheckout> is a provider component. You give it your configuration, payment data (a session or a paymentMethods response), and result callbacks.
  • usePlexyCheckout() is a hook available anywhere below the provider. Calling start('dropIn') presents the native Drop-in; passing a payment method type (for example start('applepay')) presents that single component instead.
  • <CardView> renders the native card form inline in your own layout, and <ApplePayButton> / <GooglePayButton> give you the platform-mandated wallet buttons.
import { Button } from 'react-native';

import { usePlexyCheckout } from '@plexy/react-native';

function CheckoutButton() {
  const { start, isReady } = usePlexyCheckout();

  return (
    <Button title="Pay" disabled={!isReady} onPress={() => start('dropIn')} />
  );
}

The payment UI itself is native (presented modally over your app), so there is nothing to lay out on the React side — the provider and hook are the whole JavaScript surface for starting a payment.

Explore the docs

On this page