Getting Started

Get up and running with the Oobit Plug & Pay SDK in your React Native or Expo app

The Oobit React Native SDK embeds the Plug & Pay widget in your mobile app, enabling crypto-to-card payment experiences for your users.

Installation

Latest version: 3.3.2

npm install @oobit/react-native-sdk

Or with yarn:

yarn add @oobit/react-native-sdk

Peer Dependencies

npm install react-native-webview

Choose Your Integration

Plug & Pay supports two integration modes for funding the card. Which one you use is configured on your partner account — if you're not sure, check with your Oobit account manager.

Widget-Managed Flow (default)Standalone Flow
Who builds the deposit transactionThe widget — your app receives a ready-to-sign TransactionRequest and broadcasts itYour app — using Oobit's Partner API to fetch the user's deposit address
What you pass the SDKuserWalletAddress + onTransactionRequestedonDepositRequested (+ optional email / externalUserId)
Deep diveWidget-Managed DepositsAPI-Managed Deposits


Basic Usage

import { WidgetSDK } from "@oobit/react-native-sdk";

function MyScreen() {
  return (
    <WidgetSDK
      accessToken={accessToken}
      userWalletAddress="0x1234567890abcdef..."
      onTransactionRequested={(transaction) => {
        // Navigate to your transaction confirmation screen
        navigation.navigate("ConfirmTransaction", { transaction });
      }}
    />
  );
}
import { WidgetSDK, type StandaloneConfig } from "@oobit/react-native-sdk";

function MyScreen() {
  return (
    <WidgetSDK
      accessToken={accessToken}
      email="[email protected]" // optional - prefills onboarding
      externalUserId="your-internal-user-id" // optional
      onDepositRequested={(email) => {
        // `email` is the user's verified email — pass it to your backend
        // so it can call Oobit's Partner API on their behalf.
        navigation.navigate("Deposit", { email });
      }}
    />
  );
}

Props Reference

Shared

PropTypeRequiredDescription
accessTokenstringYesJWT token from your backend (Authentication Guide)
onClose() => voidNoCalled when the user requests to close the widget. Required to show back/close buttons — if omitted, the widget's navigation buttons are hidden and users have no in-widget way to dismiss it.

Widget-Managed Flow (WidgetSDKConfig)

PropTypeRequiredDescription
userWalletAddressstringYesThe user's crypto wallet address — the widget uses it to build the deposit transaction
onTransactionRequested(transaction: ``TransactionRequest``) => voidYesCalled when the user initiates a transaction. See Widget-Managed Deposits

Standalone Flow (StandaloneConfig)

PropTypeRequiredDescription
emailstringNoThe user's email. If provided, the widget skips email entry. If omitted, the user enters and verifies it inside the widget's onboarding flow
externalUserIdstringNoYour internal user ID. Alternative identifier for Partner API calls
onDepositRequested(email: string) => voidYesCalled when the user taps "Add Funds". Receives the user's verified email so your backend can identify them (API-Managed Deposits)

See Also