List accounts
Retrieve a paginated list of the virtual accounts on your business, newest first.
List virtual accounts
Returns the accounts on your business only, newest first.
GET /account/list
GET requests have no body, so they only need x-api-key and x-timestamp. See Authentication.
Query parameters
page integer optional Default 1 Page number.
limit integer optional Default 10 Number of accounts per page.
Response: account object
bankName string Name of the bank. Always
Palmpay.accountNumber string 10-digit virtual account number.
email string Email address associated with the account.
accountName string Name of the account holder.
createdAt string ISO 8601 time the account was created.
Response: pagination object
page integer Current page number.
limit integer Number of items per page.
total integer Total number of accounts.
pages integer Total number of pages.
Errors
| Status | Example message |
|---|---|
401 | Invalid API key |
500 | Internal server error |
curl -X GET 'https://api.gafiapay.com/api/v1/external/account/list?page=1&limit=10' \
-H 'x-api-key: your_api_key' \
-H 'x-timestamp: 1678901234567'const res = await fetch('https://api.gafiapay.com/api/v1/external/account/list?page=1&limit=10', {
headers: {
'x-api-key': process.env.GAFIAPAY_API_KEY,
'x-timestamp': Date.now().toString(),
},
});
const data = await res.json();import os, time, requests
res = requests.get(
"https://api.gafiapay.com/api/v1/external/account/list?page=1&limit=10",
headers={
"x-api-key": os.environ["GAFIAPAY_API_KEY"],
"x-timestamp": str(int(time.time() * 1000)),
},
)
data = res.json()<?php
$ch = curl_init('https://api.gafiapay.com/api/v1/external/account/list?page=1&limit=10');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('GAFIAPAY_API_KEY'),
'x-timestamp: ' . round(microtime(true) * 1000),
],
]);
$data = json_decode(curl_exec($ch), true);require 'net/http'
require 'json'
uri = URI('https://api.gafiapay.com/api/v1/external/account/list?page=1&limit=10')
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = ENV['GAFIAPAY_API_KEY']
req['x-timestamp'] = (Time.now.to_f * 1000).to_i.to_s
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)import java.net.URI;
import java.net.http.*;
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.gafiapay.com/api/v1/external/account/list?page=1&limit=10"))
.header("x-api-key", System.getenv("GAFIAPAY_API_KEY"))
.header("x-timestamp", String.valueOf(System.currentTimeMillis()))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());{
"status": "success",
"data": [
{
"bankName": "Palmpay",
"accountNumber": "1234567890",
"email": "user@example.com",
"accountName": "John Doe",
"createdAt": "2024-03-20T10:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1,
"pages": 1
}
}{
"status": "fail",
"message": "Invalid API key"
}{
"status": "fail",
"error": "Internal server error"
}