Fetch Payout Beneficiaries
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>'const options = {
method: 'GET',
headers: {'x-carbon-key': '<x-carbon-key>', apikey: '<api-key>'}
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries', 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://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"x-carbon-key: <x-carbon-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries"
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"message": "Beneficiaries fetched successfully",
"data": [
{
"bank_code": "058",
"bank_name": "Guaranty Trust Bank",
"account_number": "0123456789",
"account_name": "JOHN DOE"
},
{
"bank_code": "044",
"bank_name": "Access Bank",
"account_number": "0987654321",
"account_name": "JANE SMITH"
}
],
"pagination": {
"total": 45,
"page": 1,
"limit": 20,
"pages": 3
}
}{
"status": "failed",
"message": "bad request",
"errors": [
{
"msg": "page must be a positive integer",
"param": "page"
}
]
}{
"status": "unauthorized",
"message": "Missing token"
}{
"status": "error",
"message": "An unexpected error occurred"
}Payouts
Fetch Payout Beneficiaries
Retrieve a paginated list of unique payout beneficiaries for an account based on previous payout transactions.
GET
/
v1
/
payouts
/
beneficiaries
Fetch Payout Beneficiaries
curl --request GET \
--url https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries \
--header 'apikey: <api-key>' \
--header 'x-carbon-key: <x-carbon-key>'const options = {
method: 'GET',
headers: {'x-carbon-key': '<x-carbon-key>', apikey: '<api-key>'}
};
fetch('https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries', 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://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"x-carbon-key: <x-carbon-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries"
headers = {
"x-carbon-key": "<x-carbon-key>",
"apikey": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-carbon-key"] = '<x-carbon-key>'
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://carbonapistagingsecure.getcarbon.co/baas/api/v1/payouts/beneficiaries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-carbon-key", "<x-carbon-key>")
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "success",
"message": "Beneficiaries fetched successfully",
"data": [
{
"bank_code": "058",
"bank_name": "Guaranty Trust Bank",
"account_number": "0123456789",
"account_name": "JOHN DOE"
},
{
"bank_code": "044",
"bank_name": "Access Bank",
"account_number": "0987654321",
"account_name": "JANE SMITH"
}
],
"pagination": {
"total": 45,
"page": 1,
"limit": 20,
"pages": 3
}
}{
"status": "failed",
"message": "bad request",
"errors": [
{
"msg": "page must be a positive integer",
"param": "page"
}
]
}{
"status": "unauthorized",
"message": "Missing token"
}{
"status": "error",
"message": "An unexpected error occurred"
}Overview
The Fetch Payout Beneficiaries endpoint retrieves a deduplicated list of all unique beneficiaries that have received payouts from your account. This is useful for displaying a list of frequent recipients when creating new payouts.Usage Examples
Basic Usage
Fetch the first page of beneficiaries with default limit:GET /v1/payouts/beneficiaries
Pagination
Fetch a specific page with custom limit:GET /v1/payouts/beneficiaries?page=2&limit=50
Search
Search for beneficiaries by account name or number:GET /v1/payouts/beneficiaries?search=john
Combined Parameters
Use multiple parameters together:GET /v1/payouts/beneficiaries?page=1&limit=10&search=access
Error Handling
| Status Code | Description |
|---|---|
| 200 | Success - Beneficiaries retrieved successfully |
| 400 | Bad Request - Invalid query parameters |
| 401 | Unauthorized - Missing or invalid API key |
| 500 | Internal Server Error - Unexpected server error |
Notes
- The endpoint returns deduplicated beneficiaries based on unique combinations of bank_code and account_number
- Search functionality is case-insensitive and matches partial strings in both account_number and account_name fields
- If no beneficiaries are found, an empty array will be returned in the data field
- The pagination object always reflects the current state, even when no results are found