async provide(props: AchManagerProps): Promise<StripeAchUserDetailsComponent | any>
Hide Parameters
Show Properties
onAvailablePaymentMethodLoad
callback.PrimerCheckoutData
if the error occurs after the payment creation.override
this method, you must call the errorHandler
to finalize the flow.Show Properties
Hide Properties
Show Properties
payment-failed
which is an error from the PSP side, or cancelled-by-customer
which means the failure initiated on the customer side. I.e. cancelling a 3DS flow.Show Variations
Show Parameters
Show Properties
Show child attributes
PrimerValidationError
explaining why the data is considered invalid.Show Parameters
Show Properties
Show child attributes
Show Parameters
Show Properties
Show child attributes
Show Parameters
Show Properties
Show child attributes
PrimerError
that ocurred during the validation attempt.Show Properties
Hide child attributes
Type | paymentMethodType |
---|---|
StripeAchUserDetailsComponent | STRIPE_ACH |
paymentMethodType
:
Hide Common API and available components
Hide Common API
Hide Supported types
Show API
// 👇 Add this
const achManagerProps: AchManagerProps = {
paymentMethodType: "STRIPE_ACH",
onStep: (data: AchStep) => {
switch (data.stepName) {
case "userDetailsRetrieved":
// Pre-populate your form with first name, last name and email address.
break;
case "userDetailsCollected":
// Form can be hidden (eg.: pop the backstack). Start listening for DisplayStripeAchMandateAdditionalInfo events.
break;
}
},
onError: (error: PrimerError) => {
// An error that occurred during the component's operation.
},
onInvalid: (data: PrimerInvalidComponentData<AchValidatableData>) => {
// Data was considered invalid during validation.
switch (data.data.validatableDataName) {
case "firstName":
// ...
break;
case "lastName":
// ...
break;
case "emailAddress":
// ...
break;
}
},
onValid: (data: PrimerValidComponentData<AchValidatableData>) => {
// Data was successfully validated.
switch (data.data.validatableDataName) {
case "firstName":
// ...
break;
case "lastName":
// ...
break;
case "emailAddress":
// ...
break;
}
},
onValidating: (data: PrimerValidatingComponentData<AchValidatableData>) => {
// Data is in the process of being validated.
switch (data.data.validatableDataName) {
case "firstName":
// ...
break;
case "lastName":
// ...
break;
case "emailAddress":
// ...
break;
}
},
onValidationError: (
data: PrimerComponentDataValidationError<AchValidatableData>
) => {
// Error occurred during data validation.
switch (data.data.validatableDataName) {
case "firstName":
// ...
break;
case "lastName":
// ...
break;
case "emailAddress":
// ...
break;
}
},
};
const achManager = new AchManager();
const stripeAchUserDetailsComponent: StripeAchUserDetailsComponent =
await achManager.provide(achManagerProps);