Skip to main content
SessionKeySetupFlow renders the full UI flow for setting up a session key — used when you want manual control over when setup is triggered, rather than relying on the automatic detection in TapRailsThemeProvider.

Import

import { SessionKeySetupFlow } from '@taprails/tap-to-pay';

Usage

{showSetup && (
  <SessionKeySetupFlow
    onComplete={() => setShowSetup(false)}
    onCancel={() => setShowSetup(false)}
  />
)}

Props

onComplete
() => void
Called when the user successfully completes session key setup (approval signed, key registered).
onCancel
() => void
Called when the user cancels the setup flow.

When to Use

TapRailsThemeProvider handles setup automatically — you only need SessionKeySetupFlow directly if:
  • You want to trigger setup at a specific point in your onboarding (e.g., “Enable Tap-to-Pay” button)
  • You want to show setup on a custom screen rather than as an overlay
  • You’re not using TapRailsThemeProvider
See Session Key Setup Guide for the full integration guide.