Routing Number Lookup API - Ruby Gem

Routing Number Lookup is a simple tool for looking up routing number information for USA Banks. It returns information such as the bank, location, and more based on the routing number provided.

Installation

Add this line to your application's Gemfile:

gem 'apiverve_routinglookup'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install apiverve_routinglookup

Getting Started

Get your API key at APIVerve

Basic Usage

require 'apiverve_routinglookup'

# Initialize the client
client = APIVerve::Routinglookup::Client.new(api_key: "YOUR_API_KEY")

# Make a request
response = client.execute({ routing: "121000358" })

# Print the response
puts response

Error Handling

begin
  response = client.execute({ routing: "121000358" })
  puts response["data"]
rescue APIVerve::Routinglookup::ValidationError => e
  puts "Validation error: #{e.errors.join(', ')}"
rescue APIVerve::Routinglookup::APIError => e
  puts "API error: #{e.message}"
  puts "Status code: #{e.status_code}"
end

Debug Mode

# Enable debug logging
client = APIVerve::Routinglookup::Client.new(
  api_key: "YOUR_API_KEY",
  debug: true
)

Example Response

{
  "status": "ok",
  "error": null,
  "data": {
    "routing_number": "121000358",
    "office_code": "O",
    "record_type_code": "1",
    "new_routing_number": "000000000",
    "bank": "BANK OF AMERICA, N.A.",
    "address": "8001 VILLA PARK DRIVE",
    "city": "HENRICO",
    "state": "VA",
    "zip": "23228",
    "zip_extension": "0000",
    "country": "US",
    "federal_reserve_district": "San Francisco",
    "routing_type": "primary",
    "is_valid_checksum": true,
    "routing_analysis": {
      "is_head_office": true,
      "is_branch": false,
      "is_federal_reserve_bank": false,
      "is_active": true,
      "replaced_by": null
    }
  }
}

Documentation

For more information, visit the API Documentation.

Support

License

This gem is available under the MIT License.