This method allows you get a new instance of StripeAchUserDetailsComponent to initiate Stripe ACH payments.

SWIFT
public func provide<PrimerHeadlessAchComponent>(paymentMethodType: String) throws -> PrimerHeadlessAchComponent?
        where PrimerCollectableData: Any, PrimerHeadlessStep: Any

Parameters

Type parameters

Returns

An instance of the passed generic type, which could be any of the following available components:

Example

Although the component focuses on collecting user details pertaining to ACH, it also kicks off the tokenization and payment processes. Because of this, it should be kept in memory until the checkout is completed.

Ensure that the screen implementing this component is not dismissed until the payment is finished, as the component returned by the manager is optional. As a result, having a weak reference to it will stop the entire payment flow if the screen is dismissed prematurely.

SWIFT
do {
    manager = PrimerHeadlessUniversalCheckout.AchManager()
    stripeAchComponent = try manager.provide(paymentMethodType: "STRIPE_ACH")
} catch {
    // Catch errors here
}