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

KOTLIN
fun <T : PrimerHeadlessAchComponent<out PrimerCollectableData, out PrimerHeadlessStep>> provide(paymentMethodType: String): T

Parameters

Type parameters

Returns

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

Example

KOTLIN
class CheckoutActivity : AppCompatActivity() {
  // 👇 Add this
  private val stripeAchUserDetailsComponent by lazy {
	  /**
	  Note: Although the component focuses on collecting user details pertaining to ACH,
	  it  also kicks off the tokenization and payment processes and because of that it should
	  be kept in memory until the checkout is completed. This component implements
	  Android's ViewModel class, therefore keeping a reference to it is not enough. Instead,
	  pass a long lifecycle ViewModelStoreOwner when you initialize PrimerHeadlessUniversalCheckoutAchManager,
	  such as that of your activity or parent fragment.
	  */
	  PrimerHeadlessUniversalCheckoutAchManager(viewModelStoreOwner)
        .provide<StripeAchUserDetailsComponent>(paymentMethodType = "STRIPE_ACH")
  }
}