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 withTapRailsThemeProvider 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.

