StripeAchUserDetailsComponent
to initiate Stripe ACH payments.
public func provide<PrimerHeadlessAchComponent>(paymentMethodType: String) throws -> PrimerHeadlessAchComponent?
where PrimerCollectableData: Any, PrimerHeadlessStep: Any
Hide Parameters
Hide Type Parameters
The type of the PrimerHeadlessAchComponent
implementation to
return.
Hide Supported types
Type | paymentMethodType |
---|---|
StripeAchUserDetailsComponent | STRIPE_ACH |
Hide Common API
Hide Methods and Properties
submit
function in order to process collected data and move component to next state. func didReceiveError(error: PrimerError)
Hide Supported types
Hide API
ACHUserDetailsCollectableData
.Show enum ACHUserDetailsCollectableData
Hide Properties
Hide Properties
func updateCollectedData(collectableData: ACHUserDetailsCollectableData)
Whenever start or submit methods are called, stepDelegate
will trigger the next step in
case the call to the mentioned method was successful.
In the case of STRIPE_ACH
, the steps will be of type
ACHUserDetailsStep
.
ACHUserDetailsStep
is an enum holding different output data for
specific steps.
Show enum ACHUserDetailsStep
Enum member representing the retrieved user details.
Hide Properties
The retrieved user details of type ACHUserDetails
previously sent on client session creation.
func didReceiveStep(step: PrimerHeadlessStep) {
guard let step = step as? ACHUserDetailsStep else { return }
switch step {
case .retrievedUserDetails(let userDetails):
case .didCollectUserDetails:
}
}
Validation delegate will be triggered every time collected data is updated.
func didUpdate(validationStatus: PrimerValidationStatus, for data: PrimerCollectableData?)
In the case of STRIPE_ACH
, the data will be of type
ACHUserDetailsCollectableData
.
PrimerValidationStatus
is an enum that represents the different validation statuses in the Primer SDK. It helps to communicate the state of validation for a particular process, providing clear categorization of validation states.Show enum PrimerValidationStatus
Hide Associated Value
PrimerValidationError
representing the specific validation errors found.func didUpdate(validationStatus: PrimerValidationStatus, for data: PrimerCollectableData?) {
guard let data = data as? ACHUserDetailsCollectableData else { return }
switch validationStatus {
case .validating:
case .valid:
case .invalid(errors: let errors):
case .error(error: let error):
}
}
do {
manager = PrimerHeadlessUniversalCheckout.AchManager()
stripeAchComponent = try manager.provide(paymentMethodType: "STRIPE_ACH")
} catch {
// Catch errors here
}