Connect to a reader
If you haven’t chosen a reader yet, compare the available Terminal readers and choose one that best suits your needs.
Smart readers run Stripe reader software to communicate directly with Stripe over the internet. Connecting your app to a smart reader requires three steps:
- Register a reader to your Stripe account
- Discover readers with the SDK
- Connect to a reader with the SDK
Register a readerServer-side
Before you can connect your application to a smart reader, you must register the reader to your account.
Register in the Dashboard
The simplest way is to add your reader in the Dashboard.
- If you’ve already created a Location, click on it. Otherwise, create one by clicking + New.
- Under the Readers section, click + New.
- If you have a Verifone P400, enter the key sequence
0-7-1-3-9
to display a unique registration code. If you have a BBPOS WisePOS E, go to the settings then tap Generate pairing code. - Enter the code when prompted.
Register using the API
For larger deployments, enable users in the field to receive and set up new readers on their own. In your app, build a flow to register a reader with the Stripe API.
- If you have a Verifone P400, enter the key sequence
0-7-1-3-9
to display a unique registration code. If you have a BBPOS WisePOS E, go to the settings then tap Generate pairing code. - The user enters the code in your application.
- Your application sends the code to Stripe:
To confirm that you’ve registered a reader correctly, list all the readers you’ve registered at that location:
Discover readersClient-side
After registering the reader to your account, search for previously registered readers to connect to your point of sale application using the discoverReaders
method. You can scope your discovery using the location
you registered the reader to in the previous step.
Connect to a readerClient-side
To connect your point of sale application to a reader, call connectReader with the selected reader.
Multiple connections
Handle disconnects
Your app must implement the UnexpectedReaderDisconnect
callback to handle when a reader is disconnected.
In your implementation of this callback, display a UI to notify the user that the reader disconnected. You may also want to call discoverReaders
to begin scanning for readers and reconnect. Your app can attempt to automatically reconnect to the reader that was disconnected, or display a UI for your user to reconnect to another reader.
The reader can disconnect from your app if it loses connection to the internet. To simulate an unexpected disconnect, power off the reader.
Automatic reconnection
Stripe Terminal doesn’t automatically reconnect to a reader when your application starts. Instead, you can build a reconnection flow by storing reader IDs and attempting to connect to a known reader on startup.
- When you successfully connect to a reader, save its serial number in a persistent data storage location, such as the localStorage API.
- When your app launches, check that persistent store for a saved serial number. If one is found, call the
discoverReaders
method so your application can try to find that reader again. - If the saved serial number matches any of the discovered readers, try connecting to that reader with the matching reader object returned from the call to
discoverReaders
. If the previously connected reader isn’t found, stop the discovery process.
You should display some UI during the discovery and connection process indicating that an automatic reconnection is taking place.
Next steps
You’ve connected your application to the reader. Next, collect your first Stripe Terminal payment.
The BBPOS and Chipper™ name and logo are trademarks or registered trademarks of BBPOS Limited in the United States and/or other countries. The Verifone® name and logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. Use of the trademarks does not imply any endorsement by BBPOS or Verifone.