CLI
# Requires: npm i -g @infinite_dev/cli && export INFINITE_API_KEY=sk_sandbox_...
# Escape hatch for any endpoint: infinite api <METHOD> <path>
infinite api POST /v1/external-bank-accounts/validate \
--body '<request-json>'Validate and enrich bank code.
# Infinite MCP is read-only for this endpoint — use a dedicated MCP tool when one exists, otherwise run the CLI tab.import requests
url = "https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate"
payload = {
"paymentNetwork": "ACH",
"code": "021000021"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paymentNetwork: 'ACH', code: '021000021'})
};
fetch('https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentNetwork' => 'ACH',
'code' => '021000021'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate"
payload := strings.NewReader("{\n \"paymentNetwork\": \"ACH\",\n \"code\": \"021000021\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentNetwork\": \"ACH\",\n \"code\": \"021000021\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentNetwork\": \"ACH\",\n \"code\": \"021000021\"\n}"
response = http.request(request)
puts response.read_body{
"found": true,
"code": "021000021",
"paymentNetwork": "ACH",
"bankName": "JPMorgan Chase Bank",
"branch": "Main Branch",
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postalCode": "94102",
"country": "US"
}
}External Bank Accounts
Validate and enrich bank code
Validate a bank code for a specific payment network and retrieve enriched bank information.
Provide the payment network (rail) and the appropriate bank code:
| Payment Network | Bank Code Type | Format | Example |
|---|---|---|---|
ach, wire | Routing Number | 9 digits | 021000021 |
swift | BIC/SWIFT | 8-11 chars | CHASUS33 |
sepa, sepa_instant | IBAN | 15-34 chars | DE89370400440532013000 |
faster_payments, bacs, chaps | Sort Code | 6 digits | 200000 |
eft, interac | Transit Number | 9 digits | 000412345 |
npp, becs | BSB | 6 digits | 063000 |
imps, neft, rtgs | IFSC | 11 chars | HDFC0001234 |
pix, ted | COMPE Code | 3 digits | 001 |
chats | Bank Code | 3 digits | 004 |
fast_sg, meps | Bank Code | 4 digits | |
bi_fast, artajasa | Bank Code | 3 digits | |
spei | Institution Code | 3 digits |
POST
/
v1
/
external-bank-accounts
/
validate
CLI
# Requires: npm i -g @infinite_dev/cli && export INFINITE_API_KEY=sk_sandbox_...
# Escape hatch for any endpoint: infinite api <METHOD> <path>
infinite api POST /v1/external-bank-accounts/validate \
--body '<request-json>'Validate and enrich bank code.
# Infinite MCP is read-only for this endpoint — use a dedicated MCP tool when one exists, otherwise run the CLI tab.import requests
url = "https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate"
payload = {
"paymentNetwork": "ACH",
"code": "021000021"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paymentNetwork: 'ACH', code: '021000021'})
};
fetch('https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentNetwork' => 'ACH',
'code' => '021000021'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate"
payload := strings.NewReader("{\n \"paymentNetwork\": \"ACH\",\n \"code\": \"021000021\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"paymentNetwork\": \"ACH\",\n \"code\": \"021000021\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.infinite.dev/v1/external-bank-accounts/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentNetwork\": \"ACH\",\n \"code\": \"021000021\"\n}"
response = http.request(request)
puts response.read_body{
"found": true,
"code": "021000021",
"paymentNetwork": "ACH",
"bankName": "JPMorgan Chase Bank",
"branch": "Main Branch",
"address": {
"addressLine1": "123 Main Street",
"addressLine2": "Apt 4B",
"city": "San Francisco",
"state": "CA",
"postalCode": "94102",
"country": "US"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Payment rail/network to validate the bank code for
Available options:
ACH, ACH_SAME_DAY, WIRE, FED_NOW, RTP, EREBOR, EREBOR_RAIL, BALANCE, SWIFT, SEPA, SEPA_INSTANT, TIPS, FASTER_PAYMENTS, BACS, CHAPS, ELIXIR, NICS, EFT, INTERAC, NPP, BECS, UPI, IMPS, IMPS_WITH_FIRC, NEFT, RTGS, BI_FAST, ARTAJASA, PIX, TED, TEF, SPEI, COELSA, SINPE, CIPS, CFXPS, CHATS, ZENGIN, KFTC, FAST_SG, MEPS, DUITNOW, PROMPTPAY, INSTAPAY, PESONET, NAPAS, BEFTN, SLIPS, ZAHAV, GHIPSS, NIBSS, PESALINK, RTC_ZA, TZS_RTGS, EGP_ACH, JOD_ACH, NPSS, MADA, QPS, DOP_ACH, GTQ_ACH, HNL_ACH, PEN_ACH, JMD_ACH, USD_ACH_SV, USD_ACH_EC, CLP_TEF, PSE, COP_ACH, BOB_RTGS, PYG_ACH, CERTIS, DKK_TIPS, SENT, NKS, BANKGIROT, HKD_FPS, IBFT, TRY_FAST Example:
"ACH"
The bank code value to validate and enrich (routing number, sort code, IFSC, BIC, IBAN, etc.)
Example:
"021000021"
Response
Bank code validation and enrichment result
Whether the bank code was found and enriched
Example:
true
The bank code that was looked up
Example:
"021000021"
The payment network the code was validated for
Available options:
ACH, ACH_SAME_DAY, WIRE, FEDWIRE, FED_NOW, RTP, EREBOR, EREBOR_RAIL, BALANCE, SWIFT, SEPA, SEPA_INSTANT, TIPS, FASTER_PAYMENTS, BACS, CHAPS, ELIXIR, NICS, EFT, INTERAC, NPP, BECS, UPI, IMPS, IMPS_WITH_FIRC, NEFT, RTGS, BI_FAST, ARTAJASA, PIX, TED, TEF, SPEI, COELSA, SINPE, CIPS, CFXPS, CHATS, ZENGIN, KFTC, FAST_SG, MEPS, DUITNOW, PROMPTPAY, INSTAPAY, PESONET, NAPAS, BEFTN, SLIPS, ZAHAV, GHIPSS, NIBSS, PESALINK, RTC_ZA, TZS_RTGS, EGP_ACH, JOD_ACH, NPSS, MADA, QPS, DOP_ACH, GTQ_ACH, HNL_ACH, PEN_ACH, JMD_ACH, USD_ACH_SV, USD_ACH_EC, CLP_TEF, PSE, COP_ACH, BOB_RTGS, PYG_ACH, CERTIS, DKK_TIPS, SENT, NKS, BANKGIROT, HKD_FPS, IBFT, TRY_FAST Example:
"ACH"
Bank name
Example:
"JPMorgan Chase Bank"
Branch name
Example:
"Main Branch"
Bank address details
Show child attributes
Show child attributes
Was this page helpful?