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.

  • 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 readers are designed to be more mobile and must be registered to a location upon each connection. For Bluetooth readers, 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 Verifone P400 and simulated readers will always have an unknown locationStatus. (Chipper 2X BT and WisePad 3 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.

    Note that the Verifone P400 and simulated readers will always have a nil location.

    (Chipper 2X BT and WisePad 3 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 }
  • 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;

Bluetooth Reader Properties

  • 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 }
  • 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.

    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.

    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 reader 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 the Chipper 2X and the WisePad 3’s statuses will always be offline. (Verifone P400 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. (Verifone P400 only.)

    Declaration

    Objective-C

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

    Swift

    var label: String? { get }