List Accounts
Retrieve a paginated list of virtual accounts associated with your business.
Endpoint
Authentication
This endpoint requires API key authentication. Include your API key in the request headers:
{
"x-api-key": "your_api_key",
"x-timestamp": "current_timestamp"
}Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number for pagination (default: 1) |
limit | integer | No | Number of items per page (default: 10) |
Response
Success Response (200 OK):
{
"status": "success",
"data": [
{
"bankName": "Virtual Bank",
"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
}
}Response Fields
Account Object
| Field | Type | Description |
|---|---|---|
bankName | string | Name of the bank (always "Virtual Bank") |
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 timestamp when the account was created |
Pagination Object
| Field | Type | Description |
|---|---|---|
page | integer | Current page number |
limit | integer | Number of items per page |
total | integer | Total number of accounts |
pages | integer | Total number of pages |
Error Responses
401 Unauthorized
{
"status": "fail",
"message": "Invalid API key"
}500 Internal Server Error
{
"status": "fail",
"error": "Internal server error"
}Example Request
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-signature: generated_signature' \
-H 'x-timestamp: current_timestamp'Important Notes
Pagination
Results are paginated with a default of 10 items per page. You can adjust this using the limit parameter.
Results are paginated with a default of 10 items per page. You can adjust this using the limit parameter.
Business Scoped
Only accounts associated with your business will be returned. The API automatically filters by your business ID.
Only accounts associated with your business will be returned. The API automatically filters by your business ID.
Sorting
Results are sorted by creation date in descending order (newest first).
Results are sorted by creation date in descending order (newest first).