STPBankAccountCollector

public class STPBankAccountCollector : NSObject

A class responsible for collecting bank account information

Collect Bank Account - Payment Intent

  • Presents a modal from the viewController to collect bank account and if completed successfully, link your bank account to a PaymentIntent

    Declaration

    Swift

    @available(iOS 12, *)
    @objc(collectBankAccountForPaymentWithClientSecret:params:from:completion:)
    public func collectBankAccountForPayment(
        clientSecret: String,
        params: STPCollectBankAccountParams,
        from viewController: UIViewController,
        completion: @escaping STPCollectBankAccountForPaymentCompletionBlock
    )

    Parameters

    clientSecret

    Client secret of the payment intent

    params

    Parameters for this call

    viewController

    Presenting view controller that will present the modal

    completion

    Completion block to be called on completion of the operation. Upon success, the STPPaymentIntent instance will have an expanded paymentMethod containing detailed payment method information

  • Presents a modal from the viewController to collect bank account and if completed successfully, link your bank account to a PaymentIntent

    Declaration

    Swift

    @available(iOS 12, *)
    @objc(collectBankAccountForPaymentWithClientSecret:returnURL:params:from:completion:)
    public func collectBankAccountForPayment(
        clientSecret: String,
        returnURL: String?,
        params: STPCollectBankAccountParams,
        from viewController: UIViewController,
        completion: @escaping STPCollectBankAccountForPaymentCompletionBlock
    )

    Parameters

    clientSecret

    Client secret of the payment intent

    returnURL

    A URL that redirects back to your app to be used to return after completing authentication in another app (such as bank app or Safari).

    params

    Parameters for this call

    viewController

    Presenting view controller that will present the modal

    completion

    Completion block to be called on completion of the operation. Upon success, the STPPaymentIntent instance will have an expanded paymentMethod containing detailed payment method information

Collect Bank Account - Setup Intent

  • Presents a modal from the viewController to collect bank account and if completed successfully, link your bank account to a SetupIntent

    Declaration

    Swift

    @available(iOS 12, *)
    @objc(collectBankAccountForSetupWithClientSecret:params:from:completion:)
    public func collectBankAccountForSetup(
        clientSecret: String,
        params: STPCollectBankAccountParams,
        from viewController: UIViewController,
        completion: @escaping STPCollectBankAccountForSetupCompletionBlock
    )

    Parameters

    clientSecret

    Client secret of the setup intent

    params

    Parameters for this call

    viewController

    Presenting view controller that will present the modal

    completion

    Completion block to be called on completion of the operation. Upon success, the STPSetupIntent instance will have an expanded paymentMethod containing detailed payment method information

  • Presents a modal from the viewController to collect bank account and if completed successfully, link your bank account to a SetupIntent

    Declaration

    Swift

    @available(iOS 12, *)
    @objc(collectBankAccountForSetupWithClientSecret:returnURL:params:from:completion:)
    public func collectBankAccountForSetup(
        clientSecret: String,
        returnURL: String?,
        params: STPCollectBankAccountParams,
        from viewController: UIViewController,
        completion: @escaping STPCollectBankAccountForSetupCompletionBlock
    )

    Parameters

    clientSecret

    Client secret of the setup intent

    returnURL

    A URL that redirects back to your app to be used to return after completing authentication in another app (such as bank app or Safari).

    params

    Parameters for this call

    viewController

    Presenting view controller that will present the modal

    completion

    Completion block to be called on completion of the operation. Upon success, the STPSetupIntent instance will have an expanded paymentMethod containing detailed payment method information