const poolAccount = await afriex.paymentMethods.listPoolAccounts({
customerId: "customer-id",
country: "NG",
});curl --request GET \
--url https://sandbox.api.afriex.com/api/v1/payment-method/pool-account \
--header 'x-api-key: <api-key>'import requests
url = "https://sandbox.api.afriex.com/api/v1/payment-method/pool-account"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandbox.api.afriex.com/api/v1/payment-method/pool-account', 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.afriex.com/api/v1/payment-method/pool-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.afriex.com/api/v1/payment-method/pool-account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.api.afriex.com/api/v1/payment-method/pool-account")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.afriex.com/api/v1/payment-method/pool-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"paymentMethodId": "69c2804b30314b491e48b305",
"channel": "VIRTUAL_BANK_ACCOUNT",
"customerId": "6929843e2c4653277440acc0",
"reference": "afx1234",
"institution": {
"institutionName": "UBA"
},
"accountName": "TEST",
"accountNumber": "12345678",
"countryCode": "NG",
"currency": "NGN",
"capabilities": [
"DEPOSIT"
],
"status": "active"
}
}Get Pool Account
Returns the pool account for the supplied country. Use the
reference on the response to reconcile incoming deposits; it is a
shortened form such as afx1234 (with a customer, afx1234012).
Each call also sends a PAYMENT_METHOD.UPDATED webhook carrying the
pool account.
const poolAccount = await afriex.paymentMethods.listPoolAccounts({
customerId: "customer-id",
country: "NG",
});curl --request GET \
--url https://sandbox.api.afriex.com/api/v1/payment-method/pool-account \
--header 'x-api-key: <api-key>'import requests
url = "https://sandbox.api.afriex.com/api/v1/payment-method/pool-account"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://sandbox.api.afriex.com/api/v1/payment-method/pool-account', 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.afriex.com/api/v1/payment-method/pool-account",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.api.afriex.com/api/v1/payment-method/pool-account"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.api.afriex.com/api/v1/payment-method/pool-account")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.api.afriex.com/api/v1/payment-method/pool-account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"paymentMethodId": "69c2804b30314b491e48b305",
"channel": "VIRTUAL_BANK_ACCOUNT",
"customerId": "6929843e2c4653277440acc0",
"reference": "afx1234",
"institution": {
"institutionName": "UBA"
},
"accountName": "TEST",
"accountNumber": "12345678",
"countryCode": "NG",
"currency": "NGN",
"capabilities": [
"DEPOSIT"
],
"status": "active"
}
}reference to attribute incoming funds to your business.
Important: Pool accounts are only active in production and do not work in sandbox.
How the call works
- Call this endpoint with
country(required). Optionally passcustomerIdto scope the response to a specific end-user. - Afriex returns the pool account (account name, account number, institution) as a
PaymentMethod, along with areference. - Share the account details with your customer so they can pay in. When Afriex receives the inbound funds, it uses the
referenceto attribute the deposit on your account.
The reference field
Every response includes a reference string. Persist it alongside the deposit you expect and use it to reconcile incoming pool deposits.
When you pass a customerId, the response reference matches it, so the deposit can be attributed back to that customer on your side.
Currency is derived from country
Unlike dedicated virtual accounts, this endpoint does not take acurrency parameter. The currency is determined by the country code (for example, NG resolves to NGN). Pool accounts are only available in countries where Afriex operates a pool; an unsupported country code returns a 400.
When you have no pool account
If your business has no pool account in the country you ask for, the call returns404 with BUSINESS_PAYMENT_METHOD_NOT_FOUND. Retrying returns the same answer until one is set up for your business, so don’t retry it. Contact support@afriex.com if you expect to have one.
Related
- List Virtual Accounts for dedicated per-customer accounts.
- Create Virtual Account to mint a new dedicated account.
Authorizations
Static business API key issued from the dashboard. A business can provision multiple API keys, each scoped to a configurable set of permissions (e.g. read transactions, create deposits, etc). Permissions are chosen per key at creation time in the dashboard and may be revoked by deleting the key. Manage your keys and their permissions under Developer → API keys in the dashboard.
A request whose key does not carry the permission the target
endpoint requires is rejected with 401 Unauthorized, the same
response an unrecognised, malformed, revoked or disabled key
returns. The API does not distinguish the two cases on the wire.
See the Permissions reference for the permission each endpoint requires.
Headers
API version in ISO 8601 format. The only supported version is 2026-05-18, which is also the default when the header is omitted. Any other value is rejected with a 400 Bad Request.
Signature of the request payload, used for request authentication where payload signing is enabled for your business.
Query Parameters
ISO 3166-1 alpha-2 country code.
"NG"
Optional customer ID to associate with this account.
Optional positive amount. Accepted but ignored.
Optional merchant-supplied reference. Accepted but ignored.
Response
Pool account returned successfully.
A payment method. Empty fields are omitted. Account-shaped channels (BANK_ACCOUNT, MOBILE_MONEY, SWIFT, etc.) populate accountName, accountNumber, and institution; the CARD channel instead populates last4, brand, expiration, and cardName.
Show child attributes
Show child attributes
