SCPLocalMobileConnectionConfiguration

Objective-C


@interface SCPLocalMobileConnectionConfiguration : SCPConnectionConfiguration

Swift

class LocalMobileConnectionConfiguration : ConnectionConfiguration

This class lets you set options that define local mobile reader behavior throughout a given reader-to-SDK connection session.

  • The ID of the Location which the reader should be registered to during connection. If the provided ID matches the location the reader is already registered to, the location field on the reader object will not be changed.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull locationId;

    Swift

    var locationId: String { get }
  • If your integration is creating destination charges and using on_behalf_of, you must provide the connected_account_id in the onBehalfOf parameter as part of the SCPLocalMobileConnectionConfiguration. Unlike other reader types which require this information on a per-transaction basis, the Apple Built-In reader requires this on a per-connection basis as well in order to establish a reader connection.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *onBehalfOf;

    Swift

    var onBehalfOf: String? { get }
  • Optional cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card. If this value is not provided, the merchant display name will be taken from the Terminal Location.display_name associated with the connection.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *merchantDisplayName;

    Swift

    var merchantDisplayName: String? { get }
  • In order to connect to a reader, merchant-specific terms of service may need to be accepted. Presenting the flow requires iCloud sign-in and an authorized individual. This attribute determines how the connection process should proceed if this situation is encountered.

    • If YES, the terms the terms of service should be presented during connection. If accepted successfully, the connection process will resume. If not accepted succesfully, the connection will fail with an error.
    • If NO, the terms of service will not be presented and the connection will fail with an error.

    See

    SCPErrorAppleBuiltInReaderTOSNotYetAccepted

    Note

    Defaults to YES when not otherwise specified.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isTOSAcceptancePermitted) BOOL tosAcceptancePermitted;

    Swift

    var isTOSAcceptancePermitted: Bool { get }
  • In iOS 16.4 and later, the local mobile reader can return the card read results as soon as they are available instead of waiting for the system UI to dismiss completely. This flow can substantially reduce the amount of time it takes for a transaction to complete.

    Note

    Defaults to YES when not otherwise specified.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readonly,
              getter=isReturnReadResultImmediatelyEnabled)
        BOOL returnReadResultImmediatelyEnabled;

    Swift

    var isReturnReadResultImmediatelyEnabled: Bool { get }
  • Initialize ConnectionConfiguration with a location ID.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId;

    Swift

    convenience init(locationId: String)

    Parameters

    locationId

    The ID of the location to be associated with the reader.

    Return Value

    A new instance of the receiver configured with a location ID.

  • Initialize a configuration with a location ID, custom merchant display name and ‘on behalf of’ connected account ID.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId
                           merchantDisplayName:
                               (nullable NSString *)merchantDisplayName
                                    onBehalfOf:(nullable NSString *)onBehalfOf;

    Swift

    convenience init(locationId: String, merchantDisplayName: String?, onBehalfOf: String?)

    Parameters

    locationId

    ID of the location to be associated with the reader.

    merchantDisplayName

    Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.

    onBehalfOf

    Connected account id that the merchant is taking payments on behalf of.

    Return Value

    A new instance of the receiver configured with a location ID, merchant display name, and the ‘on behalf of’ connected account ID.

  • Initialize a configuration with a location ID, custom merchant display name ‘on behalf of’ connected account ID and terms of service acceptance configuration.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId
                           merchantDisplayName:
                               (nullable NSString *)merchantDisplayName
                                    onBehalfOf:(nullable NSString *)onBehalfOf
                        tosAcceptancePermitted:(BOOL)tosAcceptancePermitted;

    Swift

    convenience init(locationId: String, merchantDisplayName: String?, onBehalfOf: String?, tosAcceptancePermitted: Bool)

    Parameters

    locationId

    ID of the location to be associated with the reader.

    merchantDisplayName

    Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.

    onBehalfOf

    Connected account id that the merchant is taking payments on behalf of.

    tosAcceptancePermitted

    Determines how to handle the situation where merchant-specific terms of service need to be presented in order to connect to a reader. @returns A new instance of the receiver configured with a location ID, merchant display name, ‘on behalf of’ connected account ID and terms of service acceptance configuration.

  • Initialize a configuration with a location ID, custom merchant display name, ‘on behalf of’ connected account ID, terms of service acceptance configuration and defined behavior in regards to when the card data should be returned.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLocationId:(nonnull NSString *)locationId
                           merchantDisplayName:
                               (nullable NSString *)merchantDisplayName
                                    onBehalfOf:(nullable NSString *)onBehalfOf
                        tosAcceptancePermitted:(BOOL)tosAcceptancePermitted
                  returnReadResultsImmediately:(BOOL)returnReadResultsImmediately;

    Swift

    init(locationId: String, merchantDisplayName: String?, onBehalfOf: String?, tosAcceptancePermitted: Bool, returnReadResultsImmediately: Bool)

    Parameters

    locationId

    ID of the location to be associated with the reader.

    merchantDisplayName

    Cardholder facing merchant display name that will be used in the prompt for the cardholder to present their card.

    onBehalfOf

    Connected account id that the merchant is taking payments on behalf of.

    tosAcceptancePermitted

    Determines how to handle the situation where merchant-specific terms of service need to be presented in order to connect to a reader.

    returnReadResultsImmediately

    When possible the card read results are returned as early as possible, prior to the complete dismissal of card reader UI. @returns A new instance of the receiver configured with a location ID, merchant display name, ‘on behalf of’ connected account ID, terms of service acceptance configuration and defined behavior in regards to when the card data should be returned.