Documentation Index
Fetch the complete documentation index at: https://mintlify.com/stripe/stripe-terminal-react-native/llms.txt
Use this file to discover all available pages before exploring further.
StripeTerminalProvider is the top-level React context provider for the Stripe Terminal SDK. It must wrap your application (or the portion of your app that uses Terminal) before any SDK methods can be called.
initialize() must be called from a nested component, not from within StripeTerminalProvider itself. Call it inside a child component using the useStripeTerminal hook.Usage
Props
An async function that fetches a connection token from your server and returns it as a string. This is called by the SDK whenever a new connection token is needed.For Apps on Devices mode, pass
AppsOnDevicesConnectionTokenProvider instead of a custom function.Controls the verbosity of SDK log output.
- iOS: accepts
'none'or'verbose' - Android: accepts
'none','verbose','error', or'warning'
AppsOnDevicesConnectionTokenProvider
AppsOnDevicesConnectionTokenProvider is an alternative token provider for the Apps on Devices connection method, which allows apps running on Stripe smart readers to obtain connection tokens without contacting your backend server.
AppsOnDevicesConnectionTokenProvider is detected as the tokenProvider, the SDK automatically switches to serverless initialization mode and does not attempt to contact your backend for a token.
Utility exports
getSdkVersion()
Returns the version string of the @stripe/stripe-terminal-react-native package. Useful for logging and debugging.
requestNeededAndroidPermissions(params)
Requests the Android runtime permissions required by the SDK (Bluetooth and location). Call this before starting reader discovery on Android.
checkIfObjectIsStripeError(obj)
Returns true if the given object is a StripeError. Useful when catching exceptions in a try/catch block.