curl --request POST \
--url https://api.bachs.io/v1/misc/bank-accounts/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_number": "0000000000",
"bank_code": "033",
"country": "NG"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_number: '0000000000', bank_code: '033', country: 'NG'})
};
fetch('https://api.bachs.io/v1/misc/bank-accounts/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/misc/bank-accounts/resolve"
payload = {
"account_number": "0000000000",
"bank_code": "033",
"country": "NG"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/misc/bank-accounts/resolve"
payload := strings.NewReader("{\n \"account_number\": \"0000000000\",\n \"bank_code\": \"033\",\n \"country\": \"NG\"\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))
}{
"resolved": true,
"lookup_supported": true,
"account_name": "Test Bank Account - Success",
"account_number": "0000000000",
"message": null
}{
"detail": "Invalid request parameters",
"error_code": "VALIDATION_ERROR",
"errors": [
{
"field": "amount",
"message": "Amount must be a positive decimal string",
"type": "value_error"
}
]
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}Resolve a bank account
Resolve an account number and bank code to the account holder’s name. Worth calling before you submit a payout destination: it turns a rejection days later into an inline error while the account holder is still on the page.
curl --request POST \
--url https://api.bachs.io/v1/misc/bank-accounts/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"account_number": "0000000000",
"bank_code": "033",
"country": "NG"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({account_number: '0000000000', bank_code: '033', country: 'NG'})
};
fetch('https://api.bachs.io/v1/misc/bank-accounts/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.bachs.io/v1/misc/bank-accounts/resolve"
payload = {
"account_number": "0000000000",
"bank_code": "033",
"country": "NG"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bachs.io/v1/misc/bank-accounts/resolve"
payload := strings.NewReader("{\n \"account_number\": \"0000000000\",\n \"bank_code\": \"033\",\n \"country\": \"NG\"\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))
}{
"resolved": true,
"lookup_supported": true,
"account_name": "Test Bank Account - Success",
"account_number": "0000000000",
"message": null
}{
"detail": "Invalid request parameters",
"error_code": "VALIDATION_ERROR",
"errors": [
{
"field": "amount",
"message": "Amount must be a positive decimal string",
"type": "value_error"
}
]
}{
"detail": "Invalid API key",
"error_code": "UNAUTHORIZED"
}{
"detail": "Resource not found",
"error_code": "NOT_FOUND"
}Authorizations
Bearer token authentication. Pass your API key as Authorization: Bearer sk_.... See Authentication for keys, scopes, and sandbox vs production.
Body
Two-letter ISO 3166-1 country of the bank. Send it on every call. If you leave it out, we use your account's country, so a Nigerian bank looked up from an account set to another country comes back resolved: false. Only NG can be looked up today. Any other country comes back resolved: false with lookup_supported: false, not an error.
"NG"
Response
The lookup result. Check resolved before you trust account_name.
Whether we can look up names for this country and bank at all. When false, no lookup will ever work for it, so let the account holder type the name exactly as it appears on the account. A false resolved with a true lookup_supported means this one account was not found.
true

