---
title: ABA routing number validation
summary: Checks whether a routing number is structurally valid in the ABA vendor service and, separately, whether the vendor verifies it.
status: draft
owner: SAIF
last_reviewed: 2026-07-30
library: BankValidator
reference_type: package
operation_id: OP-BV-01
trigger: Caller invokes IsValidABANumber or IsVerifiedABA on a constructed clsValidateBank
---

# ABA routing number validation

This operation covers the two façade methods that ask the ABA vendor service a yes/no question about a routing number: `IsValidABANumber` checks structural validity and `IsVerifiedABA` requests vendor verification. Both follow the identical logon/invoke/logoff shape and differ only in which ABA method they call.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-BV-01 |
| **Trigger** | Caller holds a constructed `clsValidateBank` instance and calls `IsValidABANumber(inRoutingNum)` or `IsVerifiedABA(inRoutingNum)` |
| **Inputs** | `inRoutingNum` (routing number string) |
| **Outputs** | `Boolean` — structural validity flag (`IsValidABANumber`) or vendor verification flag (`IsVerifiedABA`) |
| **Primary components** | `clsValidateBank.IsValidABANumber`, `clsValidateBank.IsVerifiedABA`, `clsValidateBank.LogonABA`, `clsValidateBank.LogoffABA` |
| **Entry point** | `Legacy\BankValidator\clsValidateBank.vb` |

## Steps

1. **Log on to the ABA service.** `LogonABA()` increments the shared `m_LogonAttempts` counter, lazily constructs `ABAService.ABAService` if not already created, sets its `Url` from `URLABA`, and calls `ABA.Logon(CompanyId, UserId, Password)` to obtain a `LogonToken` ([BR-002](../business-rules.md#br-002-vendor-logon-retry-handling)).
   - On failure: the `Catch` block in `LogonABA` compares `m_LogonAttempts` to `m_LogonAttemptsMax` and recursively calls `LogonABA()` again while under the limit.
   - On failure after the retry limit is exhausted: throws `ApplicationException("Unable to logon to ABA web service.", ex)`.
2. **Invoke the vendor check.**
   - For `IsValidABANumber`: call `ABA.ValidateABA(LogonToken, inRoutingNum)` and assign the Boolean result to `isValid`.
   - For `IsVerifiedABA`: call `ABA.VerifyABA(LogonToken, inRoutingNum)` and assign the Boolean result to `isValid`.
   - Neither method wraps this call in a `Try/Catch`; an exception raised by the vendor call propagates directly to the caller and skips step 3.*
3. **Log off the ABA service.** `LogoffABA()` calls `ABA.Logoff(LogonToken)`, disposes the `ABA` proxy, and sets it to `Nothing`.
   - On failure: the `Catch` block in `LogoffABA` silently swallows the exception (the `Throw` line is commented out) because a logoff failure is not considered significant enough to interrupt the caller.
4. **Return the result.** The Boolean vendor result (`isValid`) is returned to the caller.

## Process flow

The following diagram visualizes the shared control flow for both ABA validation checks.

```mermaid
flowchart TD
	Start([Caller calls IsValidABANumber<br>or IsVerifiedABA]) --> Logon[LogonABA:<br>logon with retry up to m_LogonAttemptsMax]
	Logon --> LogonOk{Logon succeeded?}
	LogonOk -->|No, retries exhausted| Ex([ApplicationException thrown])
	LogonOk -->|Yes| Which{Which method?}
	Which -->|IsValidABANumber| Validate[ABA.ValidateABA]
	Which -->|IsVerifiedABA| Verify[ABA.VerifyABA]
	Validate --> Fault{Vendor call throws?}
	Verify --> Fault
	Fault -->|Yes| Propagate([Exception propagates;<br>LogoffABA skipped])
	Fault -->|No| Logoff[LogoffABA:<br>release token, dispose proxy]
	Logoff --> Done([Return Boolean result])
```

## Failure and edge-case behavior
- If the ABA logon fails repeatedly, the caller receives an `ApplicationException` after `m_LogonAttemptsMax` retries ([BR-002](../business-rules.md#br-002-vendor-logon-retry-handling)); no vendor check is attempted.
- Because the vendor invocation is not wrapped in `Try/Catch`, any exception from `ABA.ValidateABA` or `ABA.VerifyABA` propagates unhandled to the caller and `LogoffABA()` is never reached, leaving the ABA proxy and logon token unreleased for the remainder of the object's life.*
- `LogoffABA` failures are intentionally swallowed and never surface to the caller, even though a failed logoff could leave a stale session on the vendor side.*

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `Legacy\BankValidator\clsValidateBank.vb`
