Validate Bank Account
curl --request POST \
--url https://api.stablepay.ai/account/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountNumber": "<string>",
"paymentType": "bank"
}
'import requests
url = "https://api.stablepay.ai/account/resolve"
payload = {
"accountNumber": "<string>",
"paymentType": "bank"
}
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({accountNumber: '<string>', paymentType: 'bank'})
};
fetch('https://api.stablepay.ai/account/resolve', 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://api.stablepay.ai/account/resolve",
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([
'accountNumber' => '<string>',
'paymentType' => 'bank'
]),
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://api.stablepay.ai/account/resolve"
payload := strings.NewReader("{\n \"accountNumber\": \"<string>\",\n \"paymentType\": \"bank\"\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://api.stablepay.ai/account/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountNumber\": \"<string>\",\n \"paymentType\": \"bank\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.ai/account/resolve")
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 \"accountNumber\": \"<string>\",\n \"paymentType\": \"bank\"\n}"
response = http.request(request)
puts response.read_body{
"accountId": "<string>",
"accountName": "<string>"
}{
"error": {},
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"message": "<string>",
"error": "<string>",
"details": "<string>",
"statusCode": 123
}{
"error": 123,
"message": "<string>",
"details": {}
}{
"error": 123,
"message": "<string>",
"details": {}
}Stablepay Payment Endpoints
Validate Bank Account
Validate account number and resolve account name for Banks in Kenya and Nigeria.
POST
/
account
/
resolve
Validate Bank Account
curl --request POST \
--url https://api.stablepay.ai/account/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountNumber": "<string>",
"paymentType": "bank"
}
'import requests
url = "https://api.stablepay.ai/account/resolve"
payload = {
"accountNumber": "<string>",
"paymentType": "bank"
}
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({accountNumber: '<string>', paymentType: 'bank'})
};
fetch('https://api.stablepay.ai/account/resolve', 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://api.stablepay.ai/account/resolve",
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([
'accountNumber' => '<string>',
'paymentType' => 'bank'
]),
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://api.stablepay.ai/account/resolve"
payload := strings.NewReader("{\n \"accountNumber\": \"<string>\",\n \"paymentType\": \"bank\"\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://api.stablepay.ai/account/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountNumber\": \"<string>\",\n \"paymentType\": \"bank\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.ai/account/resolve")
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 \"accountNumber\": \"<string>\",\n \"paymentType\": \"bank\"\n}"
response = http.request(request)
puts response.read_body{
"accountId": "<string>",
"accountName": "<string>"
}{
"error": {},
"message": "<string>",
"statusCode": 123,
"details": {}
}{
"message": "<string>",
"error": "<string>",
"details": "<string>",
"statusCode": 123
}{
"error": 123,
"message": "<string>",
"details": {}
}{
"error": 123,
"message": "<string>",
"details": {}
}Authorizations
API key authentication using Bearer scheme. Format: Bearer {STA_xxxx}
Body
application/json
Resolve a Bank account number.
Bank account number for Banks in Kenya and Nigeria.
Currency of the account.
Available options:
NGN, KES Payment method type.
Available options:
bank Required for bank method.
| Code | Bank |
|---|---|
| 100004 | Opay |
| 100033 | PalmPay |
| 011 | First Bank PLC |
| 058 | Guaranty Trust Bank |
| 033 | United Bank for Africa |
| 090267 | Kuda |
| 110006 | Paystack |
Available options:
100004, 100033, 011, 058, 033, 090267, 110006 ⌘I