React Native SDK

The Payrails React Native SDK provides pre-built payment components for accepting payments in mobile apps.

Getting started with the SDK

Including the SDK

You can install the SDK with your favorite package manager (e.g.,npm, yarn):

npm install @payrails/react-native-sdk
or 
yarn add @payrails/react-native-sdk

Initializing the SDK

Initialize a Payrails client as shown below, with configuration:

import { PayrailsProvider } from "@payrails/react-native-sdk";

const App = () => {
  const config = useFetch("https://give.me.sdk-config.com");

  return (
    <PayrailsProvider config={config}>
      // Other elements goes here.
    </PayrailsProvider>
  );
};

Your backend should call the Initialize a client SDK endpoint, then forward the response to the SDK.




What’s Next