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.
withStripeTerminal is a Higher-Order Component (HOC) that wraps a React component and injects all Stripe Terminal SDK methods and state as props. It is intended for use with class components that cannot use React hooks directly.
Signature
Props merged with WithStripeTerminalProps. The wrapped component receives all Terminal methods and state as additional props.
WithStripeTerminalProps
WithStripeTerminalProps is the type of the injected props. It is identical to the return type of useStripeTerminal — every method, state property, and the emitter EventEmitter are available.
- All methods documented in
useStripeTerminal(e.g.initialize,discoverReaders,connectReader,createPaymentIntent, etc.) - State properties:
connectedReader,discoveredReaders,loading,isInitialized emitter: a React NativeEventEmitterinstance for subscribing to Terminal events
Event constants
The following event name constants are exported from@stripe/stripe-terminal-react-native and can be used with the injected emitter:
| Constant | Description |
|---|---|
CHANGE_CONNECTION_STATUS | Reader connection status changed |
CHANGE_PAYMENT_STATUS | Payment status changed |
FINISH_DISCOVERING_READERS | Reader discovery completed |
FINISH_INSTALLING_UPDATE | Firmware update installation completed |
REQUEST_READER_DISPLAY_MESSAGE | Reader requests a message to display |
REQUEST_READER_INPUT | Reader requests input from the user |
REPORT_AVAILABLE_UPDATE | A firmware update is available |
REPORT_UPDATE_PROGRESS | Firmware update installation progress |
START_INSTALLING_UPDATE | Firmware update installation started |
UPDATE_DISCOVERED_READERS | Discovered reader list updated |
START_READER_RECONNECT | Reader auto-reconnect started |
READER_RECONNECT_SUCCEED | Reader auto-reconnect succeeded |
READER_RECONNECT_FAIL | Reader auto-reconnect failed |
CHANGE_OFFLINE_STATUS | Offline status changed |
FORWARD_PAYMENT_INTENT | Offline payment intent forwarded |
REPORT_FORWARDING_ERROR | Error forwarding an offline payment intent |