StripeAchUserDetailsComponent
to initiate Stripe ACH payments.
fun <T : PrimerHeadlessAchComponent<out PrimerCollectableData, out PrimerHeadlessStep>> provide(paymentMethodType: String): T
Hide Parameters
Hide Type parameters
The type of the PrimerHeadlessAchComponent
implementation to
return.
Hide Supported types
Type | paymentMethodType |
---|---|
StripeAchUserDetailsComponent | STRIPE_ACH |
T
, which could be any of the following available components:
Hide Common API and available components
Show Common API
submit
function in order to process collected data and move component to next state.Hide Supported types
Show API
Show sealed interface AchUserDetailsCollectableData
Hide Properties
Hide Properties
AchUserDetailsStep
is a class holding different output data for specific steps. Whenever
start or submit methods are
called, componentStep
will trigger the next step in case the call to the mentioned method was successful.
Show sealed interface AchUserDetailsStep
PrimerValidationStatus
interface encompasses a range of validation statuses.Show sealed interface PrimerValidationStatus
Hide Properties
Hide Properties
Hide Properties
PrimerValidationError
objects that represent data validation errors emitted by this component.Hide Properties
PrimerError
that occurred during validation.Show PrimerValidationError
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")
}
}