Reader Discovery & Connection
-
The possible methods for discovering a reader. This is provided for convenience when working with
See moreSCPDiscoveryConfiguration
objects.Declaration
Objective-C
enum SCPDiscoveryMethod : NSUInteger {}
Swift
enum DiscoveryMethod : UInt, @unchecked Sendable
-
Implement this protocol to handle a continually updating list of discovered readers. You must pass an
See moreSCPDiscoveryDelegate
when calling-[SCPTerminal discoverReaders:delegate:completion:]
.Declaration
Objective-C
@protocol SCPDiscoveryDelegate <NSObject>
Swift
protocol DiscoveryDelegate : NSObjectProtocol
-
Protocol for classes to conform to that apply configuration options for discovering readers.
You should not implement this protocol yourself; instead, use one of the following:
SCPBluetoothScanDiscoveryConfiguration
SCPBluetoothProximityDiscoveryConfiguration
SCPInternetDiscoveryConfiguration
SCPTapToPayDiscoveryConfiguration
Objects of those types get passed into the
See moreTerminal.shared.discoverReaders()
method to control which devices get discovered, and how.Declaration
Objective-C
@protocol SCPDiscoveryConfiguration <NSObject>
Swift
protocol DiscoveryConfiguration : NSObjectProtocol
-
The Bluetooth Scan discovery method searches for Stripe Terminal’s Bluetooth-capable readers.
When discovering a reader using this method, the
didUpdateDiscoveredReaders
delegate method will be called multiple times as the Bluetooth scan proceeds.Create instances of this class using a
See moreSCPBluetoothScanDiscoveryConfigurationBuilder
.Declaration
Objective-C
@interface SCPBluetoothScanDiscoveryConfiguration : NSObject <SCPDiscoveryConfiguration>
Swift
class BluetoothScanDiscoveryConfiguration : NSObject, DiscoveryConfiguration
-
Builder class for SCPBluetoothScanDiscoveryConfiguration
See moreDeclaration
Objective-C
@interface SCPBluetoothScanDiscoveryConfigurationBuilder : SCPBuilder <SCPBluetoothScanDiscoveryConfiguration *>
Swift
class BluetoothScanDiscoveryConfigurationBuilder : SCPBuilder<BluetoothScanDiscoveryConfiguration>
-
The Bluetooth Proximity discovery method searches for a subset of Stripe Terminal’s Bluetooth-capable readers.
If your app will be used in a busy environment with multiple iOS devices pairing to multiple available readers at the same time, we recommend using this discovery method.
After a reader has been discovered using this method, the LEDs located above the reader’s power button will start flashing multiple colors. After discovering the reader, your app should prompt the user to confirm that the reader is flashing, and require a user action (e.g. tapping a button) to connect to the reader.
When discovering a reader using this method, the
didUpdateDiscoveredReaders
delegate method will be called twice. It will be called for the first time when the reader is initially discovered. The reader’s LEDs will begin flashing. After a short delay,didUpdateDiscoveredReaders
will be called a second time with an updated reader object, populated with additional info about the device, like its battery level.Create instances of this class using a
SCPBluetoothProximityDiscoveryConfigurationBuilder
.Note
The Bluetooth Proximity discovery method can only discover Stripe Reader M2 and BBPOS Chipper 2X BT readers.
Note
The simulated Bluetooth Proximity discovery method will always return a Stripe Reader M2 simulated device.
Declaration
Objective-C
@interface SCPBluetoothProximityDiscoveryConfiguration : NSObject <SCPDiscoveryConfiguration>
Swift
class BluetoothProximityDiscoveryConfiguration : NSObject, DiscoveryConfiguration
-
Builder for the Bluetooth Proximity discovery class.
Example usage:
[[[SCPBluetoothProximityDiscoveryConfigurationBuilder new] setSimulated:YES] build]
See moreBluetoothProximityDiscoveryConfigurationBuilder().setSimulated(true).build()
Declaration
Objective-C
@interface SCPBluetoothProximityDiscoveryConfigurationBuilder : SCPBuilder <SCPBluetoothProximityDiscoveryConfiguration *>
Swift
class BluetoothProximityDiscoveryConfigurationBuilder : SCPBuilder<BluetoothProximityDiscoveryConfiguration>
-
The Internet discovery method searches for internet-connected readers, such as the Stripe S700 or the BBPOS WisePOS E.
When discovering a reader with this method
didUpdateDiscoveredReaders
will only be called once with a list of readers from/v1/terminal/readers
. Note that this will include readers that are both online and offline.Because the discovery process continues if connecting to a discovered reader fails, the SDK will refresh the list of
SCPReader
s and calldidUpdateDiscoveredReaders
with the results. For more details about failed connect calls, see-[SCPTerminal connectReader:connectionConfig:cancelable:completion:]
Create instances of this class using a
See moreSCPInternetDiscoveryConfigurationBuilder
.Declaration
Objective-C
@interface SCPInternetDiscoveryConfiguration : NSObject <SCPDiscoveryConfiguration>
Swift
class InternetDiscoveryConfiguration : NSObject, DiscoveryConfiguration
-
Builder class for SCPInternetDiscoveryConfiguration
Example usage:
[[[SCPInternetDiscoveryConfigurationBuilder new] setLocationId:@"tml_123"] build]
See moretry InternetDiscoveryConfigurationBuilder().setLocationId("tml_123").build()
Declaration
Objective-C
@interface SCPInternetDiscoveryConfigurationBuilder : SCPBuilder <SCPInternetDiscoveryConfiguration *>
Swift
class InternetDiscoveryConfigurationBuilder : SCPBuilder<InternetDiscoveryConfiguration>
-
The Tap To Pay discovery method searches for any readers built into the merchant device that are supported by Stripe Terminal. When discovering a reader with this method
didUpdateDiscoveredReaders
will only be called once with a list of discovered readers, if any. An error may be provided if a discovery attempt is made in an on a device without hardware support for the Tap To Pay reader or one running an unsupported version of iOS.Create instances of this class using a
SCPTapToPayDiscoveryConfigurationBuilder
.Declaration
Objective-C
@interface SCPTapToPayDiscoveryConfiguration : NSObject <SCPDiscoveryConfiguration>
Swift
class TapToPayDiscoveryConfiguration : NSObject, DiscoveryConfiguration
-
Builder class for SCPTapToPayDiscoveryConfiguration
Example usage:
[[[SCPTapToPayDiscoveryConfigurationBuilder new] setSimulated:YES] build]
See moretry TapToPayDiscoveryConfigurationBuilder().setSimulated(true).build()
Declaration
Objective-C
@interface SCPTapToPayDiscoveryConfigurationBuilder : SCPBuilder <SCPTapToPayDiscoveryConfiguration *>
Swift
class TapToPayDiscoveryConfigurationBuilder : SCPBuilder<TapToPayDiscoveryConfiguration>
-
This class lets you define Bluetooth reader connection options.
An object of this class should get passed into
See moreTerminal.shared.connectReader()
.Declaration
Objective-C
@interface SCPBluetoothConnectionConfiguration : SCPConnectionConfiguration
Swift
class BluetoothConnectionConfiguration : ConnectionConfiguration
-
The
See moreCollectConfigurationBuilder
is used to create aCollectConfiguration
object.Declaration
Objective-C
@interface SCPBluetoothConnectionConfigurationBuilder : SCPBuilder <SCPBluetoothConnectionConfiguration *>
Swift
class BluetoothConnectionConfigurationBuilder : SCPBuilder<BluetoothConnectionConfiguration>
-
This class lets you set options that define internet reader behavior throughout a given reader-to-SDK connection session.
See moreDeclaration
Objective-C
@interface SCPInternetConnectionConfiguration : SCPConnectionConfiguration
Swift
class InternetConnectionConfiguration : ConnectionConfiguration
-
Use this to build
See moreSCPInternetConnectionConfiguration
objects.Declaration
Objective-C
@interface SCPInternetConnectionConfigurationBuilder : SCPBuilder <SCPInternetConnectionConfiguration *>
Swift
class InternetConnectionConfigurationBuilder : SCPBuilder<InternetConnectionConfiguration>
-
This class lets you set options that define tap to pay reader behavior throughout a given reader-to-SDK connection session.
See moreDeclaration
Objective-C
@interface SCPTapToPayConnectionConfiguration : SCPConnectionConfiguration
Swift
class TapToPayConnectionConfiguration : ConnectionConfiguration
-
A builder class for
See moreSCPTapToPayConnectionConfiguration
.Declaration
Objective-C
@interface SCPTapToPayConnectionConfigurationBuilder : SCPBuilder <SCPTapToPayConnectionConfiguration *>
Swift
class TapToPayConnectionConfigurationBuilder : SCPBuilder<TapToPayConnectionConfiguration>
-
The possible reader connection statuses for the SDK.
See moreDeclaration
Objective-C
enum SCPConnectionStatus : NSUInteger {}
Swift
enum ConnectionStatus : UInt, @unchecked Sendable
-
Parameters to be used when calling
See moreTerminal.shared.listLocations()
to list the Location objects associated with an account.Declaration
Objective-C
@interface SCPListLocationsParameters : NSObject
Swift
class ListLocationsParameters : NSObject
-
Builder class for
See moreSCPListLocationsParameters
.Declaration
Objective-C
@interface SCPListLocationsParametersBuilder : SCPBuilder <SCPListLocationsParameters *>
Swift
class ListLocationsParametersBuilder : SCPBuilder<ListLocationsParameters>
-
A Location is used to group readers in the Stripe Terminal ecosystem. The Location to which a reader is registered can control regional behavior for that particular reader.
You cannot create locations through the SDK. Instead, use the Stripe API from your backend to manage your account’s locations.
To fetch the Location objects associated with your account, call
See moreTerminal.shared.listLocations()
.Declaration
Objective-C
@interface SCPLocation : NSObject <SCPJSONDecodable>
Swift
class Location : NSObject, JSONDecodable
-
Holds address data associated with a given
SCPLocation
.You cannot create
SCPAddress
objects from within the SDK. Instead, they will be returned as anaddress
property on anSCPLocation
object retrieved by the SDK.See
SCPLocation
Declaration
Objective-C
@interface SCPAddress : NSObject <SCPJSONDecodable>
Swift
class Address : NSObject, JSONDecodable
-
Simulator specific configurations you can set to test your integration’s behavior in different scenarios. We recommend changing these properties during testing to ensure your app works as expected for different reader updates and for different presented cards.
Do not create new instances of this class. Instead, set the properties via
See moreSCPTerminal.shared.simulatorConfiguration
.Declaration
Objective-C
@interface SCPSimulatorConfiguration : NSObject
Swift
class SimulatorConfiguration : NSObject
-
Enum used to simulate various types of reader updates being available for a simulated bluetooth or tap to pay reader.
See moreDeclaration
Objective-C
enum SCPSimulateReaderUpdate : NSUInteger {}
Swift
enum SimulateReaderUpdate : UInt, @unchecked Sendable
-
Simulated Card objects can be used with the shared
SCPSimulatorConfiguration
to simulate different card brand and error cases with a simulated Reader.Simulated Card objects are backed by one of Stripe’s test card numbers, which are hardcoded to provide certain behavior within Stripe’s backend. The Terminal SDK provides an
See moreSCPSimulatedCardType
enum that automatically maps to the card numbers for convenience.Declaration
Objective-C
@interface SCPSimulatedCard : NSObject
Swift
class SimulatedCard : NSObject
-
Enum used to simulate various types of cards and error cases.
See moreDeclaration
Objective-C
enum SCPSimulatedCardType : NSUInteger {}
Swift
enum SimulatedCardType : UInt, @unchecked Sendable