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
Update component with collected data by passing an enum representing collectable data. This method can be called at any point, even if you have only partially collected data.
To validate the partially collected data, you can refer to the validationDelegate and receive the validation status when it’s updated.In case of 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.
Enum case representing an unsuccessful validation state due to validation errors.
This indicates that the validation process has completed but has found one or more errors in the data.
A PrimerError representing the unexpected error that occurred.
SWIFT
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): }}
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.