Add Payment Method β UI Validations
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):
| Context | Who | What happens |
|---|---|---|
| During a payment (Guest Pay, One Time Pay, Pay and Save) | Guest or authenticated wallet user | Enters payment details as part of making a payment |
In Wallet management (WALLET mode) | Wallet user or agent | Adds 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.
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.
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.
- Bank Account
- Card
- Card - Telephonic Entry
| Field Name | Validation Rules | Error Messages |
|---|---|---|
| Name on Account | 1. 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 Number | 1. 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 Number | 1. 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. |
| Nickname | 1. 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.
| Error Scenario | Error Message |
|---|---|
| Invalid Routing Number | Please enter a valid routing number. |
| Invalid Account Number | Please enter a valid account number. |
| Account and Routing Number Mismatch | The account and routing number do not match. |
| Unsupported Bank | This bank is not supported. |
| Account Not Found | The bank account could not be found. |
| Insufficient Funds | There are insufficient funds in the account. |
| Account Closed | The bank account has been closed. |
| Account Frozen | The bank account has been frozen. |
| Transaction Not Allowed | This transaction is not allowed for this account. |
| Error Scenario | Error Message |
|---|---|
| Duplicate Payment Method | This payment method already exists in your wallet. |
| Invalid Account Number | The account number you entered is invalid. Please check the number and try again. |
| Invalid Routing Number | The routing number you entered is invalid. Please check the number and try again. |
| System Error | We're sorry, but we encountered a problem processing your request. Please try again later. |
| Field Name | Validation Rules | Error Messages |
|---|---|---|
| Name on Card | 1. This field is required. 2. Must not contain card numbers. | 1. Name on card is required. 2. Please make sure that the name field doesn't contain a card number. |
| Card Nickname | 1. Must contain only valid characters (alphanumeric and spaces). 2. Must not contain card numbers. | 1. Please enter a valid card nickname. 2. Please make sure that the card nickname field doesn't contain a card number. |
| Manufacturer Copay Card (Dropdown) | 1. A medication selection is required. | 1. A medication selection is required. |
Stripe Handled Validations: Card Number, Expiration Date, CVC, ZIP Code
| Error Scenario | Error Message |
|---|---|
| Invalid Card Number | Please enter a valid card number. |
| Invalid Expiration Date | Please enter a valid expiration date. |
| Invalid CVV | Please enter a valid CVV. |
| Expired Card | Your card has expired. |
| ZIP Code Mismatch | Please enter a valid ZIP code. |
| Unsupported Card | This card is not supported. |
| Card Declined | Your card was declined. |
| Payment Processing Failed | The payment could not be processed. |
| Network/Connection Error | Something went wrong due to a network error. Please check your connection and try again. |
| Card Reported Stolen | This card has been reported stolen. Please use a different payment method. |
| Billing Address Mismatch | The billing address does not match the card. |
| Incorrect CVV | The CVV is incorrect. |
| Card Restriction | There is a restriction on the card. |
| Insufficient Funds | The card has insufficient funds. |
| Card Issuer Unavailable | The card issuer is unavailable. |
| Card Cancelled | The card has been cancelled. |
| Invalid Card | The card is invalid. |
| Transaction Not Allowed | The transaction is not allowed. |
| Error Scenario | Error Message |
|---|---|
| Duplicate Payment Method | This payment method already exists in your wallet. Please enter a new payment method. |
| Payment Card Declined | Your card was declined. Please try a different card or contact your bank. |
| Payment Processing Failed | The payment could not be processed. Please try again later. |
| Network/Connection Error | Something went wrong due to a network error. Please check your connection and try again. |
| 3D Secure Authentication Failed | 3D Secure authentication failed. Please try again or use a different payment method. |
Note: Agent Mode Only. Documented here from the Wallet-management context β not currently covered for payment flows.
| Field Name | Validation Rules | Error Messages |
|---|---|---|
| Card Nickname | 1. Must contain only valid characters (alphanumeric and spaces). 2. Must not contain card numbers. | 1. Please enter a valid card nickname. 2. Please make sure that the card nickname field doesn't contain a card number. |
| Manufacturer Copay Card (Dropdown) | 1. A medication selection is required. | 1. A medication selection is required. |
Sycurio Handled Fields: Name, Card Number, Expiration Date, CVC, ZIP Code
| Error Scenario | Error Message |
|---|---|
| Duplicate Payment Method | This payment method already exists in your wallet. Please enter a new payment method. |
| Payment Card Declined | Your card was declined. Please try a different card or contact your bank. |
| Payment Processing Failed | The payment could not be processed. Please try again later. |
| Network/Connection Error | Something went wrong due to a network error. Please check your connection and try again. |
| Card Reported Stolen | This card has been reported stolen. Please use a different payment method. |
Related Documentationβ
- Edit Payment Method Screen β UI Validations β same Card Form and Bank Account Form field-level validation, different field set
- Widget Modes