Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / GetBankDetailsFromRoutingCode

Function: GetBankDetailsFromRoutingCode()

GetBankDetailsFromRoutingCode(routingNumber, data?): Command<{ data?: { scheme?: string; }; routingNumber: string; }, { achLocation: { address: string; city: string; postalCode: string; postalExtension: number; state: string; }; bankName: string; scheme: string; }>

Defined in: src/commands/rest/transaction.ts:445

Get the bank details from the routing code.

Use this API to get the bank details from the routing code. Financial institutions often utilize distinct routing codes for ACH (Automated Clearing House) and wire transfers.

We can use the Query param 'scheme' to differentiate between ACH and Wire transfers.

Parameters

routingNumber

string

Routing codes identify each financial institution with a unique ID (Example: 273976369). Pattern: \b\d{9}\b

data?

scheme?

string = ...

Returns

Command<{ data?: { scheme?: string; }; routingNumber: string; }, { achLocation: { address: string; city: string; postalCode: string; postalExtension: number; state: string; }; bankName: string; scheme: string; }>

A Command that when executed returns the bank details

Example

typescript
const getBankDetailsCmd = GetBankDetailsFromRoutingCode(
  "273976369",
  { scheme: "ACH" }
);
const result = await getBankDetailsCmd.execute(config);
console.log(result.bankName); // "VERIDIAN CREDIT UNION"
console.log(result.achLocation.city); // "WATERLOO"
console.log(result.scheme); // "ACH"

Released under the MIT License.