const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fingopay.io/v1/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fingopay.io/v1/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.fingopay.io/v1/accounts \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fingopay.io/v1/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fingopay.io/v1/accounts")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fingopay.io/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://api.fingopay.io/v1/accounts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"status": "success",
"message": "Accounts fetched",
"data": {
"items": [
{
"type": "collections",
"currency": "KES",
"available": 9876543,
"pending": 0,
"status": "active",
"default": true,
"accountNo": "ACC-123456",
"name": "Main Collections",
"hostType": "fingo",
"bankName": "Choice Bank",
"bankCode": "80100",
"branchCode": "001",
"swiftCode": "CHKEKENX"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"message": "<string>",
"param": "<string>",
"requestId": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"message": "<string>",
"param": "<string>",
"requestId": "<string>"
}
}List accounts
List all non-system accounts for the authenticated organization. Optionally filter by account type and/or scope. Use scope=default to return accounts where shortcodeId is absent, and scope=shortcode to return accounts where shortcodeId is present. You can combine type and scope in the same request.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fingopay.io/v1/accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fingopay.io/v1/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.fingopay.io/v1/accounts \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fingopay.io/v1/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fingopay.io/v1/accounts")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fingopay.io/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://api.fingopay.io/v1/accounts");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
{
"status": "success",
"message": "Accounts fetched",
"data": {
"items": [
{
"type": "collections",
"currency": "KES",
"available": 9876543,
"pending": 0,
"status": "active",
"default": true,
"accountNo": "ACC-123456",
"name": "Main Collections",
"hostType": "fingo",
"bankName": "Choice Bank",
"bankCode": "80100",
"branchCode": "001",
"swiftCode": "CHKEKENX"
}
]
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"message": "<string>",
"param": "<string>",
"requestId": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"message": "<string>",
"param": "<string>",
"requestId": "<string>"
}
}Authorizations
Use your API key as a Bearer token. Example: Authorization: Bearer sk_live_...
Query Parameters
Filter accounts by type. Can be combined with scope.
collections, payouts Filter accounts by shortcode scope. Use default for accounts where shortcodeId is absent, or shortcode for accounts where shortcodeId is present. Can be combined with type.
default, shortcode Response
Accounts fetched successfully
"success"
"Accounts fetched"
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
collections, payouts "collections"
"KES"
9876543
0
"active"
true
"ACC-123456"
"Main Collections"
fingo, partner, null "fingo"
Only included for live payout accounts
"Choice Bank"
Only included for live payout accounts
"80100"
Only included for live payout accounts
"001"
Only included for live payout accounts
"CHKEKENX"
Was this page helpful?