SQRDStoreCustomerCardController

@interface SQRDStoreCustomerCardController : NSObject

Lets the application use a Square Reader to store card information for use in later transactions when the card may not be present (also known as storing a card on file for a customer to use).

The card information is stored on Square servers, not on the specific device running Reader SDK. This means cards cannot be saved on file when offline, and that saved cards for a customer are available from any device, keyed by customer ID.

  • Creates a new Store Customer Card controller.

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithCustomerID:(nonnull NSString *)customerID
              delegate:
                  (nonnull id<SQRDStoreCustomerCardControllerDelegate>)delegate;

    Swift

    init(customerID: String, delegate: SQRDStoreCustomerCardControllerDelegate)

    Parameters

    customerID

    The ID of an existing Customer object created using the Customers API.

    delegate

    The object that acts as the delegate of the Store Customer Card controller.

  • Presents a view controller for the Store Customer Card flow.

    This flow begins with a network call to validate the provided customer ID, which may take time depending on network conditions. You should show a loading indicator before calling this method and remove it after receiving a success, failure, or cancellation callback.

    Note

    Reader SDK must be authorized to present the Store Customer Card flow.

    Note

    This method must be called from the main thread.

    Note

    Show a loading indicator in your UI before calling presentFromViewController:.

    Declaration

    Objective-C

    - (void)presentFromViewController:(nonnull UIViewController *)viewController;

    Swift

    func present(from viewController: UIViewController)

    Parameters

    viewController

    The view controller from which the Store Customer Card flow should be modally presented.