This guide walks through a complete end-to-end integration: installing the SDK, wrapping your app, discovering a simulated reader, and collecting a payment.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.
Install the package
Add the SDK to your React Native project using npm or yarn.For iOS, install the native pod:
Set up a connection token endpoint
The SDK needs a short-lived connection token from your backend to authenticate with Stripe. Create an endpoint on your server that calls the Stripe API and returns the token secret.Your backend should return a JSON body with a Then write a
secret field — for example:tokenProvider function in your app that fetches from that endpoint:Wrap your app with StripeTerminalProvider
In your root component, wrap your app with
StripeTerminalProvider and pass the tokenProvider function. This sets up the context that all SDK hooks and components depend on.Set
logLevel="verbose" during development to see detailed SDK logs. Remove or set to "none" before shipping to production.Initialize the SDK
Call
initialize from the useStripeTerminal hook inside a component that is nested within StripeTerminalProvider. This must happen before any other SDK method is called.Discover readers
Use
discoverReaders to search for available readers. During development, set simulated: true to use a built-in simulated reader without any physical hardware.Connect to a reader
Once readers are discovered, call
connectReader with the reader you want to connect to. Pass the locationId of the Stripe Terminal location associated with the reader.Create and collect a payment
With a reader connected, you can collect a payment in three steps:
createPaymentIntent— Create a PaymentIntent for the amount to charge (in the smallest currency unit, e.g. cents).collectPaymentMethod— Present the reader to the customer to tap, dip, or swipe their card.confirmPaymentIntent— Submit the payment to Stripe and finalize the charge.
Next steps
- Review Requirements for platform-specific setup including permissions and minimum OS versions.
- Browse the SDK reference for the full list of available methods and types.