Skip to main content

Virtual Accounts Transactions

GET /api/v1/VirtualAccounts/:accountNumber/transactions

Description

This endpoint allows retrieving a paged list of transactions for a virtual account.

Headers:

  • No specific headers are required.

Query Parameters:

  • accountNumber: The account number of the virtual account to retrieve transactions for.

  • type: The type of transactions to retrieve, defaults to all if not provided.

  • searchText: The text to search for in transaction descriptions.

  • pageNumber: The page number to retrieve, defaults to 1 if not provided.

  • pageSize: The number of transactions to retrieve per page, defaults to 10 if not provided.

  • version: The version of the API.

URL:

  • GET: /api/v1/VirtualAccounts/{accountNumber}/transactions?type={type}&searchText={searchText}&pageNumber={pageNumber}&pageSize={pageSize}

Response:

  • 200: Success, returns a paged list of transactions for the specified virtual account.

Error Codes:

  • 400: Bad request, the request is not valid.

  • 404: Not found, no transactions exist for the specified virtual account.

  • 500: Internal server error, something went wrong while processing the request.

Example Response:

HTTP/1.1 200 OK
{
"pageNumber": 1,
"pageSize": 10,
"totalItems": 5,
"transactions": [
{
"id": "123",
"description": "Transaction1",
"amount": 100.00,
"type": "debit",
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
},
{
"id": "456",
"description": "Transaction2",
"amount": 200.00,
"type": "credit",
"createdAt": "2024-02-16T12:00:00Z",
"updatedAt": "2024-02-17T12:00:00Z"
},
...
]
}

Notes:

  • This endpoint is useful for retrieving a paged list of transactions for a specific virtual account.

  • The response includes a paged list of transactions along with their details including ID, description, amount, type, and creation/update timestamps.

  • If no transactions exist for the specified virtual account, a 404 Not Found response will be returned.

Method: GET

/api/v1/VirtualAccounts/:accountNumber/transactions?type=1&searchText=<string>&pageNumber=1&pageSize=10

Headers

Content-TypeValue
Accepttext/plain

Query Params

Paramvalue
type1
searchText<string>
pageNumber1
pageSize10

Response: 200

{
"pageNumber": "<integer>",
"pageSize": "<integer>",
"total": "<integer>",
"succeeded": "<boolean>",
"message": "<string>",
"errors": [
"<string>",
"<string>"
],
"data": [
{
"id": "<uuid>",
"beneficiaryAccount": {
"accountNumber": "<string>",
"accountName": "<string>",
"bank": "<string>"
},
"sourceAccount": {
"accountNumber": "<string>",
"accountName": "<string>",
"bank": "<string>"
},
"customerName": "<string>",
"customerEmail": "<string>",
"customerPhone": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"narration": "<string>",
"amount": "<double>",
"previousBalance": "<double>",
"newBalance": "<double>",
"transactionFee": "<double>",
"settledAmount": "<double>",
"transactionType": 0,
"transactionStatus": 6,
"transactionSource": 1,
"transactionReference": "<uuid>",
"customerId": "<string>",
"merchantId": "<string>",
"remarks": "<string>",
"prevailingRate": "<string>",
"processingAgentID": "<string>",
"userTransactionRef": "<string>",
"transactionDate": "<dateTime>",
"deleted": "<boolean>",
"externalReference": "<string>",
"walletId": "<uuid>",
"origin": 1,
"currency": "<string>",
"externalBankReference": "<string>",
"originatorName": "<string>",
"originatorAccountNumber": "<string>",
"originatorBankName": "<string>"
},
{
"id": "<uuid>",
"beneficiaryAccount": {
"accountNumber": "<string>",
"accountName": "<string>",
"bank": "<string>"
},
"sourceAccount": {
"accountNumber": "<string>",
"accountName": "<string>",
"bank": "<string>"
},
"customerName": "<string>",
"customerEmail": "<string>",
"customerPhone": "<string>",
"accountNumber": "<string>",
"accountName": "<string>",
"narration": "<string>",
"amount": "<double>",
"previousBalance": "<double>",
"newBalance": "<double>",
"transactionFee": "<double>",
"settledAmount": "<double>",
"transactionType": 1,
"transactionStatus": 4,
"transactionSource": 6,
"transactionReference": "<uuid>",
"customerId": "<string>",
"merchantId": "<string>",
"remarks": "<string>",
"prevailingRate": "<string>",
"processingAgentID": "<string>",
"userTransactionRef": "<string>",
"transactionDate": "<dateTime>",
"deleted": "<boolean>",
"externalReference": "<string>",
"walletId": "<uuid>",
"origin": 1,
"currency": "<string>",
"externalBankReference": "<string>",
"originatorName": "<string>",
"originatorAccountNumber": "<string>",
"originatorBankName": "<string>"
}
]
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/VirtualAccounts/:accountNumber/transactions \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!