This endpoint is used to fetch all created virtual account for a merchant. Note that this endpoint return a paginated data which helps to control the size of data received.

To request for all created account, make a GET request to the endpoint /v1/static-accounts.

Pagination Query Parameters

The pagination approach used here follows page-based pagination, where pageNumber and pageSize control data retrieval. The response includes metadata like currentPage, totalPages, totalCount, and flags hasPrevious, hasNext to indicate available pages.

pageNumber The page number to retrieve. Defaults to 1 if not provided.

pagesize The number of records per page. Defaults to 10 if not specified.

startData Filter dataset by account creation date

endDate: Filter dateset by expiryDate

These parameters allow clients to control paginated data retrieval efficiently.

fetch all created virtual account request

Request
curl --request GET \
  --url https://adapter.cepta.co/api/v1/static-accounts \
  --header 'Authorization: <SECRET_KEY>' \
  --header 'Content-Type: application/json' \

Create virtual account response

An example response body for successfully fetching virtual accounts.

Success response
{
    "status": true,
    "message": "Accounts returned successfully",
    "data": {
        "currentPage": 1,
        "totalPages": 1,
        "pageSize": 10,
        "totalCount": 5,
        "hasPrevious": false,
        "hasNext": false,
        "results": [
            {
                "firstName": "Rakuzo",
                "lastName": "Kilian",
                "phoneNumber": "08043339321",
                "email": "[email protected]",
                "accountNumber": "4051453962",
                "bankName": "Premium Trust Bank",
                "isActive": true,
                "createdAt": "2025-01-30T20:53:23.587885"
            },
            {
                "firstName": "Randy",
                "lastName": "Orton",
                "phoneNumber": "08093339321",
                "email": "[email protected]",
                "accountNumber": "4051454548",
                "bankName": "Premium Trust Bank",
                "isActive": true,
                "createdAt": "2025-01-30T22:38:04.2213172"
            },
            {
                "firstName": "zola",
                "lastName": "camora",
                "phoneNumber": "08029339321",
                "email": "[email protected]",
                "accountNumber": "4051453909",
                "bankName": "Premium Trust Bank",
                "isActive": true,
                "createdAt": "2025-01-30T20:47:07.493649"
            }
        ]
    }
}

When virtual accounts are successfully fetched, the response contains a data object that includes a list of accounts, with each containing details such as accountNumber, bankName, and isActive status.

Handling fetch virtual account response

status
boolean

Indicates if the request was successful.

message
string

Descriptive message about the request result.

data
object
currentPage
integer

The current page number.

totalPages
integer

The total number of pages available.

pageSize
integer

The number of items per page.

totalCount
integer

The total number of records available.

hasPrevious
boolean

Indicates if there is a previous page.

hasNext
boolean

Indicates if there is a next page.

results
array
firstName
string

Account holder first name.

lastName
string

Account holder last name.

phoneNumber
string

Account holder phone number.

email
string

Account holder email address.

accountNumber
string

Account holder generated account number.

bankName
string

The generated bank name.

isActive
boolean

Shows whether the account is active or expired.

createdAt
string (ISO 8601)

Timestamp of when the account was created.