Skip to main content

Get Transactions

This endpoint retrieves transaction records for a specific merchant or sub-merchant. It supports pagination, filtering, and export of all transactions.


Path: POST BASE_URL/transactions

Authorization: Bearer <YOUR_BEARER_TOKEN>


Required Query Parameters

ParameterDescriptionExample
userTypeType of user: MERCHANT or SUB_MERCHANTMERCHANT
userTypeIdUnique ID of the merchant/sub-merchant (obtained from login response)Zd5Euw0OAyZQU1MUgHdwETatZFV_qtNw7yJzZyA

Optional Query Parameters

ParameterDescriptionExample
categoryNameFilter transactions by product categoryAirtime
brandNameFilter transactions by brandVodacom
aggregatorNameFilter transactions by aggregatorFLASH
statusFilter by transaction status (COMPLETED=0, PENDING=1, PROCESSING=2, FAILED=3)0
keyWordSearch transactions by productName or productShortNameAirtime Direct
exportAllReturn all transactions in a single JSON array (ignores pagination). Default is falsetrue
pagePage number (if exportAll=false)1
sizeNumber of items per page (if exportAll=false)20

⚠️ exportAll=true is intended for exporting data. If set, pagination parameters (page, size) are ignored.


Response Structure

Responses are returned in JSON format. When exportAll=false, results are paginated.

Paginated Response Example

{
"content": [
{
"id": "WypJNrMGBKezxQTdtscWadoCiNyDD3pBzeFCYRnnzZjQaw",
"status": {
"code": 0,
"label": "Successful",
"description": "Item has been processed successfully",
"badgeColor": "green"
},
"productName": "R10 - R3500 FLASH Group Electricity",
"productShortName": "FLASH Group",
"quantity": 1,
"price": 30.0000,
"totalAmount": 30.0000,
"transactionId": "bdf82429-9ab5-4f1a-bb9a-e469f4f05f05",
"responseDate": "2025-10-21T12:57:51.831899",
"productImage": "https://pagamio-assets.ams3.digitaloceanspaces.com/vas-uat/1756442263930-1756442259265_61l654.jpg",
"brandName": "FLASH Group",
"categoryName": "Electricity",
"channelName": "Default",
"merchantName": "Eudson Bambo",
"partnerName": "Zapper",
"aggregatorName": "FLASH"
}
],
"pageable": {
"pageNumber": 1,
"pageSize": 20,
"totalPages": 3,
"totalElements": 55
}
}

Export All Response Example

When exportAll=true, all transactions are returned as a single JSON array:

[
{
"id": "WypJNrMGBKezxQTdtscWadoCiNyDD3pBzeFCYRnnzZjQaw",
"status": {
"code": 0,
"label": "Successful",
"description": "Item has been processed successfully",
"badgeColor": "green"
},
"productName": "R10 - R3500 FLASH Group Electricity",
"productShortName": "FLASH Group",
"quantity": 1,
"price": 30.0000,
"totalAmount": 30.0000,
"transactionId": "bdf82429-9ab5-4f1a-bb9a-e469f4f05f05",
"responseDate": "2025-10-21T12:57:51.831899",
"productImage": "https://pagamio-assets.ams3.digitaloceanspaces.com/vas-uat/1756442263930-1756442259265_61l654.jpg",
"brandName": "FLASH Group",
"categoryName": "Electricity",
"channelName": "Default",
"merchantName": "Eudson Bambo",
"partnerName": "Zapper",
"aggregatorName": "FLASH"
},
...
]

Transaction Status Codes

CodeStatusDescriptionBadge Color
0COMPLETEDItem has been processed successfullygreen
1PENDINGItem is waiting to be processedgray
2PROCESSINGItem is currently being processedblue
3FAILEDItem processing has failedred

Use the status.code field to filter or display transaction states programmatically.


Best Practices

  1. Always include the Authorization Bearer token in your request.
  2. Use exportAll=false for paginated queries to improve performance.
  3. Use exportAll=true only when exporting data for reports.
  4. Use filters (categoryName, brandName, aggregatorName, status, keyWord) to narrow down results.
  5. Log transactionId for each transaction to help with reconciliation and troubleshooting.

Last updated: October 2025