Reader Discovery & Connection

  • The possible methods for discovering a reader. This is provided for convenience when working with SCPDiscoveryConfiguration objects.

    See more

    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 SCPDiscoveryDelegate when calling -[SCPTerminal discoverReaders:delegate:completion:].

    See more

    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:

    Objects of those types get passed into the Terminal.shared.discoverReaders() method to control which devices get discovered, and how.

    See more

    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 SCPBluetoothScanDiscoveryConfigurationBuilder.

    See more

    Declaration

    Objective-C

    
    @interface SCPBluetoothScanDiscoveryConfiguration
        : NSObject <SCPDiscoveryConfiguration>

    Swift

    class BluetoothScanDiscoveryConfiguration : NSObject, DiscoveryConfiguration
  • Builder class for SCPBluetoothScanDiscoveryConfiguration

    See more

    Declaration

    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.

    See more

    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]

    BluetoothProximityDiscoveryConfigurationBuilder().setSimulated(true).build()

    See more

    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 SCPReaders and call didUpdateDiscoveredReaders with the results. For more details about failed connect calls, see -[SCPTerminal connectReader:connectionConfig:cancelable:completion:]

    Create instances of this class using a SCPInternetDiscoveryConfigurationBuilder.

    See more

    Declaration

    Objective-C

    
    @interface SCPInternetDiscoveryConfiguration
        : NSObject <SCPDiscoveryConfiguration>

    Swift

    class InternetDiscoveryConfiguration : NSObject, DiscoveryConfiguration
  • Builder class for SCPInternetDiscoveryConfiguration

    Example usage:

    [[[SCPInternetDiscoveryConfigurationBuilder new] setLocationId:@"tml_123"] build]

    try InternetDiscoveryConfigurationBuilder().setLocationId("tml_123").build()

    See more

    Declaration

    Objective-C

    
    @interface SCPInternetDiscoveryConfigurationBuilder
        : SCPBuilder <SCPInternetDiscoveryConfiguration *>

    Swift

    class InternetDiscoveryConfigurationBuilder : SCPBuilder<InternetDiscoveryConfiguration>
  • The SCPDiscoveryFilter contains information used to single out a reader during the discovery process. When a filter is provided, only the reader matching the filter will be returned during discovery, and discovery will complete once the reader is found.

    See more

    Declaration

    Objective-C

    
    @interface SCPDiscoveryFilter : NSObject

    Swift

    class DiscoveryFilter : NSObject
  • 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.

    See more

    Declaration

    Objective-C

    
    @interface SCPTapToPayDiscoveryConfiguration
        : NSObject <SCPDiscoveryConfiguration>

    Swift

    class TapToPayDiscoveryConfiguration : NSObject, DiscoveryConfiguration
  • Builder class for SCPTapToPayDiscoveryConfiguration

    Example usage:

    [[[SCPTapToPayDiscoveryConfigurationBuilder new] setSimulated:YES] build]

    try TapToPayDiscoveryConfigurationBuilder().setSimulated(true).build()

    See more

    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 Terminal.shared.connectReader().

    See more

    Declaration

    Objective-C

    
    @interface SCPBluetoothConnectionConfiguration : SCPConnectionConfiguration

    Swift

    class BluetoothConnectionConfiguration : ConnectionConfiguration
  • The CollectConfigurationBuilder is used to create a CollectConfiguration object.

    See more

    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 more

    Declaration

    Objective-C

    
    @interface SCPInternetConnectionConfiguration : SCPConnectionConfiguration

    Swift

    class InternetConnectionConfiguration : ConnectionConfiguration
  • Use this to build SCPInternetConnectionConfiguration objects.

    See more

    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 more

    Declaration

    Objective-C

    
    @interface SCPTapToPayConnectionConfiguration : SCPConnectionConfiguration

    Swift

    class TapToPayConnectionConfiguration : ConnectionConfiguration
  • Declaration

    Objective-C

    
    @interface SCPTapToPayConnectionConfigurationBuilder
        : SCPBuilder <SCPTapToPayConnectionConfiguration *>

    Swift

    class TapToPayConnectionConfigurationBuilder : SCPBuilder<TapToPayConnectionConfiguration>
  • Base class for all EasyConnectConfiguration subclasses.

    EasyConnectConfiguration simplifies discovering and connecting to a reader for user integrations.

    Your app should use the subclasses depending on the reader type being used:

    See more

    Declaration

    Objective-C

    
    @interface SCPEasyConnectConfiguration : NSObject

    Swift

    class EasyConnectConfiguration : NSObject
  • EasyConnectConfiguration for internet readers, which simplifies discovery and connecting to internet readers.

    Note: The discoveryConfiguration must include a DiscoveryFilter that will filter the discovery results to a single reader. Otherwise the easy connect process will fail if multiple readers are found.

    See more

    Declaration

    Objective-C

    
    @interface SCPInternetEasyConnectConfiguration : SCPEasyConnectConfiguration

    Swift

    class InternetEasyConnectConfiguration : EasyConnectConfiguration
  • Configuration for EasyConnect connections to Tap to Pay readers.

    See more

    Declaration

    Objective-C

    
    @interface SCPTapToPayEasyConnectConfiguration : SCPEasyConnectConfiguration

    Swift

    class TapToPayEasyConnectConfiguration : EasyConnectConfiguration
  • The possible reader connection statuses for the SDK.

    See more

    Declaration

    Objective-C

    enum SCPConnectionStatus : NSUInteger {}

    Swift

    enum ConnectionStatus : UInt, @unchecked Sendable
  • Parameters to be used when calling Terminal.shared.listLocations() to list the Location objects associated with an account.

    See more

    Declaration

    Objective-C

    
    @interface SCPListLocationsParameters : NSObject

    Swift

    class ListLocationsParameters : NSObject
  • 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 Terminal.shared.listLocations().

    See more

    Declaration

    Objective-C

    
    @interface SCPLocation : NSObject

    Swift

    class Location : NSObject
  • Represents the possible states of the location object for a discovered reader.

    See

    SCPReader
    See more

    Declaration

    Objective-C

    enum SCPLocationStatus : NSUInteger {}

    Swift

    enum LocationStatus : UInt, @unchecked Sendable
  • Holds address data associated with a given SCPLocation.

    You cannot create SCPAddress objects from within the SDK. Instead, they will be returned as an address property on an SCPLocation object retrieved by the SDK.

    See more

    Declaration

    Objective-C

    
    @interface SCPAddress : NSObject

    Swift

    class Address : NSObject
  • 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 SCPTerminal.shared.simulatorConfiguration.

    See more

    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 more

    Declaration

    Objective-C

    enum SCPSimulateReaderUpdate : NSUInteger {}

    Swift

    enum SimulateReaderUpdate : UInt, @unchecked Sendable
  • Describes a simulated software update to apply during a test-mode connection.

    Create instances with the provided factory methods rather than init.

    See more

    Declaration

    Objective-C

    
    @interface SCPTestReaderUpdate : NSObject <NSCopying>

    Swift

    class TestReaderUpdate : NSObject, NSCopying
  • The kind of simulated update to present during connection.

    See more

    Declaration

    Objective-C

    enum SCPTestReaderUpdateType : NSUInteger {}

    Swift

    enum TestReaderUpdateType : 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 SCPSimulatedCardType enum that automatically maps to the card numbers for convenience.

    See more

    Declaration

    Objective-C

    
    @interface SCPSimulatedCard : NSObject

    Swift

    class SimulatedCard : NSObject
  • Enum used to simulate various types of cards and error cases.

    See more

    Declaration

    Objective-C

    enum SCPSimulatedCardType : NSUInteger {}

    Swift

    enum SimulatedCardType : UInt, @unchecked Sendable
  • Simulated collect inputs result objects can be used with the shared SCPSimulatorConfiguration to simulate different input collection results.

    Declaration

    Objective-C

    
    @interface SCPSimulatedCollectInputsResult : NSObject

    Swift

    class SimulatedCollectInputsResult : NSObject
  • Simulate a successful collect inputs

    Based on the input type, the SDK returns a predefined value. The predefined values are:

    • selection -> (value of first option)
    • signature -> (a valid SVG image string)
    • email -> “someone@example.com
    • phone -> “+15555551234”
    • text -> “Jane Doe”
    • numeric -> “2907981236”

    If any toggles are specified, their default value is selected and returned.

    See more

    Declaration

    Objective-C

    
    @interface SCPSimulatedCollectInputsResultSucceeded
        : SCPSimulatedCollectInputsResult

    Swift

    class SimulatedCollectInputsResultSucceeded : SimulatedCollectInputsResult
  • Simulate a collect inputs where collection times out

    Declaration

    Objective-C

    
    @interface SCPSimulatedCollectInputsResultTimeout
        : SCPSimulatedCollectInputsResult

    Swift

    class SimulatedCollectInputsResultTimeout : SimulatedCollectInputsResult
  • The supported behaviors for simulating skipping inputs

    See more

    Declaration

    Objective-C

    enum SCPSimulatedCollectInputsSkipBehavior : NSInteger {}

    Swift

    enum SimulatedCollectInputsSkipBehavior : Int, @unchecked Sendable
  • Configuration for simulating offline mode for testing offline payment flows without physically disconnecting from the network.

    Set this via SCPTerminal.shared.setSimulatedOfflineModeConfiguration. The SDK and the connected smart reader can be configured independently, allowing you to test scenarios where only one side loses connectivity.

    Note

    For testing only. Setting a non-default configuration while connected to a livemode reader raises an error.
    See more

    Declaration

    Objective-C

    
    @interface SCPSimulatedOfflineModeConfiguration : NSObject <NSCopying>

    Swift

    class SimulatedOfflineModeConfiguration : NSObject, NSCopying
  • Declaration

    Objective-C

    
    @interface SCPSimulatedOfflineModeConfigurationBuilder
        : SCPBuilder <SCPSimulatedOfflineModeConfiguration *>

    Swift

    class SimulatedOfflineModeConfigurationBuilder : SCPBuilder<SimulatedOfflineModeConfiguration>
  • Types of network failure that can be simulated.

    See more

    Declaration

    Objective-C

    enum SCPSimulatedOfflineMode : NSUInteger {}

    Swift

    enum SimulatedOfflineMode : UInt, @unchecked Sendable