SCPReader

Objective-C


@interface SCPReader : NSObject <SCPJSONDecodable>

Swift

class Reader : NSObject, JSONDecodable

Information about a card reader that has been discovered by or connected to the SDK.

Some of the properties are only applicable to a certain device type. These properties are labeled with the reader or reader type to which they apply.

  • Unavailable

    You cannot directly instantiate this class.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    You cannot directly instantiate this class.

    Declaration

    Objective-C

    + (nonnull instancetype)new;
  • The reader’s device type.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPDeviceType deviceType;

    Swift

    var deviceType: DeviceType { get }
  • True if this is a simulated reader.

    SCPDiscoveryConfiguration objects with simulated set to true produce simulated readers.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL simulated;

    Swift

    var simulated: Bool { get }
  • The Stripe unique identifier for the reader.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *stripeId;

    Swift

    var stripeId: String? { get }
  • The ID of the reader’s Location.

    Internet readers remain registered to the location specified when registering the reader to your account. For internet readers, this field represents that location. If you need to change your internet reader’s location, re-register the reader and specify the new location id in the location param. See https://stripe.com/docs/api/terminal/readers/create

    Bluetooth and Apple Built-In readers are designed to be more mobile and must be registered to a location upon each connection. This field represents the last location that the reader was registered to. If the reader has not been used before, this field will be nil. If you associate the reader to a different location while calling connectBluetoothReader, this field will update to that new location’s ID.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *locationId;

    Swift

    var locationId: String? { get }
  • Used to tell whether the location field has been set. Note that the Internet and simulated readers will always have an unknown locationStatus.

    (Bluetooth and Apple Built-In readers only.)

    Declaration

    Objective-C

    @property (readonly) SCPLocationStatus locationStatus;

    Swift

    var locationStatus: LocationStatus { get }
  • The details of the location this reader is registered to, if any.

    During discovery, location will be nil for Bluetooth readers that have never been connected to.

    You must assign a Bluetooth reader to a location from the SDK during connectBluetoothReader. See locationId in SCPBluetoothConnectionConfiguration.

    After connecting to a reader, location will be nil if the reader has been registered to a new location. See https://stripe.com/docs/api/terminal/locations/retrieve for documentation on retrieving location details in your app.

    (Bluetooth and Apple Built-In readers only.)

    See

    SCPConnectionConfiguration

    Declaration

    Objective-C

    @property (readonly, nullable) SCPLocation *location;

    Swift

    var location: Location? { get }
  • The reader’s serial number.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull serialNumber;

    Swift

    var serialNumber: String { get }
  • The reader’s current device software version, or nil if this information is unavailable.

    Declaration

    Objective-C

    @property (readonly, nullable) NSString *deviceSoftwareVersion;

    Swift

    var deviceSoftwareVersion: String? { get }

Bluetooth Reader Properties

  • The available update for this reader, or nil if no update is available. This update will also have been announced via - [BluetoothReaderDelegate reader:didReportAvailableUpdate:]

    Install this update with - [Terminal installAvailableUpdate]

    calls to installAvailableUpdate when availableUpdate is nil will result in - [BluetoothReaderDelegate reader:didFinishInstallingUpdate:error:] called immediately with a nil update and nil error.

    (Bluetooth readers only.)

    Declaration

    Objective-C

    @property (readonly, nullable) SCPReaderSoftwareUpdate *availableUpdate;

    Swift

    var availableUpdate: SCPReaderSoftwareUpdate? { get }
  • The reader’s battery level, represented as a boxed float in the range [0, 1]. If the reader does not have a battery, or the battery level is unknown, this value is nil.

    (Bluetooth readers only.)

    Declaration

    Objective-C

    @property (readonly, nullable) NSNumber *batteryLevel;

    Swift

    var batteryLevel: NSNumber? { get }
  • The reader’s battery status. Usable as a general classification for the current battery state.

    (Bluetooth readers only.)

    See

    SCPBatteryStatus

    Declaration

    Objective-C

    @property (readonly) SCPBatteryStatus batteryStatus;

    Swift

    var batteryStatus: BatteryStatus { get }
  • The reader’s charging state, represented as a BOOL If the reader does not have a battery, or the battery level is unknown, this value is nil.

    (Bluetooth readers only.)

    Declaration

    Objective-C

    @property (readonly, nullable) NSNumber *isCharging;

    Swift

    var isCharging: NSNumber? { get }

Internet Reader Properties

  • The IP address of the reader.

    (Internet readers only.)

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *ipAddress;

    Swift

    var ipAddress: String? { get }
  • The networking status of the reader: either offline or online. Note that non-Internet readers status will always be offline.

    (Internet readers only).

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCPReaderNetworkStatus status;

    Swift

    var status: ReaderNetworkStatus { get }
  • A custom label that may be given to a reader for easier identification.

    (Internet readers only.)

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *label;

    Swift

    var label: String? { get }