Checking access…

Skip to main content
Version: v2
Audience: Consumers, CCG Platform Engineers

Add Payment Method β€” UI Validations

When to use this page

Field-level and form-level validation rules and error copy the widget shows on the add payment method screen β€” use this to match or localize the error text in your app, not to guess at it.

The add-payment-method screen appears in two contexts, with the same fields and the same field-level validation (Card Form and Bank Account Form validation is shared across the Add Payment Method, Edit Payment Method, and Payment screens):

ContextWhoWhat happens
During a payment (Guest Pay, One Time Pay, Pay and Save)Guest or authenticated wallet userEnters payment details as part of making a payment
In Wallet management (WALLET mode)Wallet user or agentAdds a new card or bank account directly to the wallet, outside any payment

Only the form-level (decline/processing) messages differ between the two contexts β€” see below.

Form-level (decline/processing) messages are illustrative, not a fixed catalog

The widget doesn't define a fixed set of decline-reason messages β€” it displays whatever message the payment processor returns for that specific decline. The scenarios shown below are examples, not a complete or stable list β€” don't write matching logic against these exact strings; handle the error generically instead. The "During a payment" list is longer because that flow processes an actual payment (surfacing the full range of payment-decline/3DS messages); "In Wallet management" only verifies the payment method without charging it.

Validation Types Covered:

  • Field Level: Triggered per input field on blur or submit. This list is authoritative β€” it's the widget's own client-side validation, and it's the same regardless of context.
  • Form Level: Triggered on form submission for cross-field or service-level errors. See the caution above β€” these examples are illustrative, not authoritative, and differ by context.
Guest Pay doesn't show the duplicate-payment-method message

Guests have no wallet to duplicate a payment method into, so the Guest Pay flow never surfaces the "Duplicate Payment Method" form-level error β€” One Time Pay, Pay and Save, and Wallet management can, since all three are authenticated-user flows.

Field Level Validations
Field NameValidation RulesError Messages
Name on Account1. This field is required.
2. Must contain only alphabets and special characters.
1. Name on account is required.
2. Name on account is invalid. Please make sure name field includes alphabet and special characters only.
Routing Number1. This field is required.
2. Must be 9 characters long.
3. Must only have numerical values.
1. Routing number is required.
2. Routing number is incomplete.
3. Enter a valid routing number.
Account Number1. This field is required.
2. Must only have numerical values.
3. Account number must be between 6 and 17 digits.
1. Account number is required.
2. Enter a valid account number.
3. Account number must be between 6 and 17 digits.
Nickname1. Must only contain alphanumeric characters and spaces, and must not exceed 30 characters.
2. Must not contain the account number.
1. Enter a valid bank account nickname.
2. Please make sure that the nickname field doesn't contain a bank account number.

Note: Some validations are also managed by the Wells Fargo API.

Form Level Validations β€” During a Payment
Error ScenarioError Message
Invalid Routing NumberPlease enter a valid routing number.
Invalid Account NumberPlease enter a valid account number.
Account and Routing Number MismatchThe account and routing number do not match.
Unsupported BankThis bank is not supported.
Account Not FoundThe bank account could not be found.
Insufficient FundsThere are insufficient funds in the account.
Account ClosedThe bank account has been closed.
Account FrozenThe bank account has been frozen.
Transaction Not AllowedThis transaction is not allowed for this account.
Form Level Validations β€” In Wallet Management
Error ScenarioError Message
Duplicate Payment MethodThis payment method already exists in your wallet.
Invalid Account NumberThe account number you entered is invalid. Please check the number and try again.
Invalid Routing NumberThe routing number you entered is invalid. Please check the number and try again.
System ErrorWe're sorry, but we encountered a problem processing your request. Please try again later.