Documentation Index Fetch the complete documentation index at: https://primer.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
PrimerAchScope manages the ACH multi-step payment flow: user details collection, bank account collection, and mandate acceptance.
Declaration
@MainActor
public protocol PrimerAchScope : PrimerPaymentMethodScope where State == PrimerAchState
Properties
Property Type Description stateAsyncStream<PrimerAchState>Stream of ACH state changes presentationContextPresentationContext.direct or .fromPaymentSelectiondismissalMechanism[DismissalMechanism]Supported dismissal methods bankCollectorViewControllerUIViewController?Bank collection view controller for embedding
Customization
Property Type Description screenAchScreenComponent?Full screen replacement. Signature: (any PrimerAchScope) -> any View userDetailsScreenAchScreenComponent?User details step replacement mandateScreenAchScreenComponent?Mandate step replacement submitButtonAchButtonComponent?Custom submit button. Signature: (any PrimerAchScope) -> any View
Methods
Method Description updateFirstName(_ value: String)Update first name updateLastName(_ value: String)Update last name updateEmailAddress(_ value: String)Update email address submitUserDetails()Submit user details to proceed to bank collection acceptMandate()Accept the ACH mandate declineMandate()Decline the mandate onBack()Navigate back cancel()Cancel the ACH flow
PrimerAchState
public struct PrimerAchState : Equatable {
public enum Step : Equatable {
case loading
case userDetailsCollection
case bankAccountCollection
case mandateAcceptance
case processing
}
var step: Step
var userDetails: UserDetails
var fieldValidation: FieldValidation?
var mandateText: String ?
var isSubmitEnabled: Bool
}
Flow
UserDetails
public struct UserDetails : Equatable {
let firstName: String
let lastName: String
let emailAddress: String
}
FieldValidation
public struct FieldValidation : Equatable {
let firstNameError: String ?
let lastNameError: String ?
let emailError: String ?
var hasErrors: Bool
}
Property Type Description stepStepCurrent step in the flow userDetailsUserDetailsCollected user details fieldValidationFieldValidation?Validation errors for user details mandateTextString?ACH mandate text for acceptance isSubmitEnabledBoolWhether submit is allowed
See also
Scopes overview All available scopes