Skip to main content
Wallet-Native Interoperability allows self-custody crypto wallet providers (such as Phantom, Trust Wallet, Privy, Wagmi/MetaMask, and Coinbase Wallet) to embed real-world NFC tap-to-pay directly inside their native mobile applications. By utilizing Session Keys, wallet users grant a time-bound, spending-limited authorization. Users sign once during setup; all subsequent tap-to-pay transactions are 100% gasless and instant — without requiring pop-up signature approvals at checkout.

Session Key Architecture


Step 1. Initialize SDK in SESSION_KEY Mode

When initializing ContactlessCryptoSDK in your wallet application, set mode: PaymentMode.SESSION_KEY and provide your wallet’s signature callback (onSignTransaction).

Step 2. Trigger Session Key Setup UI

Wrap your main wallet app component with TapRailsThemeProvider to detect missing session keys automatically, or call SessionKeySetupFlow manually inside your wallet settings screen.
WalletSettingsScreen.tsx

Step 3. Native Wallet Tap-to-Pay UI (useNFCCustomer)

Inside your wallet app’s main action menu or tab bar, add a native “Tap & Pay” button using useNFCCustomer.
NativeWalletTapButton.tsx

Security & Key Management

TapRails is designed so that payment authorization remains under the user’s control.
  • Device-secured keys: Session keys are generated on the user’s device and stored using the platform’s secure key storage, such as iOS Keychain or Android Keystore. Private keys are never sent to TapRails servers.
  • Spending limits: Session authorizations can be restricted by configurable spending limits, reducing the risk of unauthorized payments.
  • User-controlled revocation: Users can revoke an active session authorization from their wallet at any time.

Next Steps

Session Key Guide

Detailed configuration options for session key parameters.

React Native Hooks API

View full hook API documentation for useSessionKey.