SQRDCheckoutController

@interface SQRDCheckoutController : NSObject

Lets the application collect payment from customers using Square’s checkout flow.

  • Creates a new checkout controller.

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithParameters:(nonnull SQRDCheckoutParameters *)parameters
              delegate:(nonnull id<SQRDCheckoutControllerDelegate>)delegate;

    Swift

    init(parameters: SQRDCheckoutParameters, delegate: SQRDCheckoutControllerDelegate)

    Parameters

    parameters

    The parameters needed to start a checkout, including the amount of the transaction.

    delegate

    The object that acts as the delegate of the checkout controller.

  • Presents a view controller for the checkout flow.

    Note

    Reader SDK must be authorized to present the checkout flow.

    Note

    This method must be called from the main thread.

    Declaration

    Objective-C

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

    Swift

    func present(from viewController: UIViewController)

    Parameters

    viewController

    The view controller from which the checkout flow should be modally presented.