# /service/routing/verify

Verifies a bank routing number and optionally verifies an associated account.
## Purpose
Validates a routing number structure (ABA checksum), retrieves bank details and supported payment networks (ACH, Wire, RTP, FedNow). Optionally verifies an account number in the same request.
## When to use
- Validate a routing number before creating a bank deposit transaction
- Retrieve bank name and payment capabilities for a routing number
- Verify both routing and account in a single call to reduce round trips

## How it works
1. Validates the routing number structure via ABA checksum
2. If account fields are provided, verifies the account with the bank verification provider
3. Checks the internal database for cached routing data
4. If not cached, queries external providers (Lyon/Nabco) for routing details
5. Caches the result asynchronously for future lookups
6. Returns routing details with optional account verification results

## Authentication
Requires either `x-api-key` header OR `x-client-id` + `x-secret-key` headers.
## Notes
- The routing number must be exactly 9 digits and pass ABA checksum.
- When `accountNumber` is provided, `accountType` becomes required.
- Account types accepted: `C` (Checking), `S` (Savings).
- The `countryISO` parameter accepts ISO 3166-1 alpha-3 codes (e.g., USA, CAN).
- Account verification results are included under the `accountVerification` key when requested.

## Common errors
- `400` Invalid routing number checksum or missing required fields
- `401` Invalid API key
- `404` Routing number not found in any provider
- `500` External service unavailable

Endpoint: POST /service/routing/verify
Version: 1.0.0

## Header parameters:

  - `x-api-key` (string)
    API key for authentication. Use this OR x-client-id/x-secret-key pair.

Error codes: type=400002, minLength=400003, maxLength=400004

  - `x-client-id` (string)
    Partner client identifier. Must be sent together with x-secret-key.

Error codes: type=400002, minLength=400003, maxLength=400004

  - `x-secret-key` (string)
    Partner secret key. Must be sent together with x-client-id.

Error codes: type=400002, minLength=400003, maxLength=400004

## Request fields (application/json):

  - `routingNumber` (string, required)
    The 9-digit ABA routing number to verify.
Error codes: required=400001, type=400002, minLength=400003, maxLength=400004, pattern=400009

  - `countryISO` (string, required)
    ISO 3166-1 alpha-3 country code (e.g., USA, CAN).
Error codes: required=400001, type=400002, minLength=400003, maxLength=400004, pattern=400009

  - `accountNumber` (string)
    Bank account number to verify alongside the routing number. When provided, accountType is required.
Error codes: type=400002, minLength=400003, maxLength=400004

  - `accountType` (string)
    Type of bank account. Required when accountNumber is provided. C = Checking, S = Savings.
Error codes: type=400002, minLength=400003, maxLength=400004, allowedValues=400010
    Enum: "C", "S"

## Response 200 fields (application/json):

  - `status` (string)
    Response status indicator.

  - `message` (string)
    Human-readable description of the result.

  - `data` (object)
    Routing verification result data.

  - `data.routingNumber` (string)
    The verified 9-digit routing number.

  - `data.bank` (string)
    Official name of the financial institution.

  - `data.rtp` (boolean)
    Whether the bank supports RTP (Real-Time Payments).

  - `data.fednow` (boolean)
    Whether the bank supports FedNow instant payments.

  - `data.aba` (boolean)
    Whether the routing number is valid in the ABA system.

  - `data.wire` (boolean)
    Whether the routing number supports wire transfers.

  - `data.ach` (boolean)
    Whether the routing number supports ACH transactions.

  - `data.active` (boolean)
    Whether the routing number is currently active.

  - `data.accountVerification` (object)
    Account verification result (only present when accountNumber was provided).

  - `data.accountVerification.verificationValue` (string)
    Human-readable verification result name (e.g., Pass, Declined, NoData).

  - `data.accountVerification.verificationRisk` (string)
    Risk level: LOW, MEDIUM, or HIGH.

  - `data.accountVerification.verificationDescription` (string)
    Detailed explanation of the verification result.

  - `data.accountVerification.bankName` (string)
    Bank name from the verification provider.

## Response 400 fields (application/json):

  - `errors` (array)
    Error catalog for 400 (click to expand)CodeDescription400001Required field is missing or accountType missing when accountNumber provided.400009Routing number failed ABA checksum validation.400010Account type value is not in the allowed list.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

  - `errors.details` (string)

## Response 401 fields (application/json):

  - `errors` (array)
    Error catalog for 401 (click to expand)CodeDescription401000Invalid API key.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

## Response 404 fields (application/json):

  - `errors` (array)
    Error catalog for 404 (click to expand)CodeDescription404000Routing number not found in database or external providers.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

  - `errors.details` (string)

## Response 500 fields (application/json):

  - `errors` (array)
    Error catalog for 500 (click to expand)CodeDescription500000Internal server error.500002Account verification service unavailable.

  - `errors.status` (string)

  - `errors.code` (number)

  - `errors.message` (string)

  - `errors.details` (string)

