List Transactions
https://sandboxapi.onbrails.com/api/v2/transactions (opens in a new tab)
List all transactions on your account
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Search transaction reference, hash, address, payment request, or ID | |
| action | string | Filter by action | |
| channel | string | Filter by channel | |
| type | string | Filter by type | |
| status | string | Filter by status | |
| currency | string | Filter by currency | |
| period | string | Date period — allTime, day, or range | |
| forDate | string | Date for period=day | |
| startDate | string | Start date for period=range | |
| endDate | string | End date for period=range | |
| limit | integer | Number of results to return (default 50, max 100) | |
| nextCursor | string | Cursor for the next page of results | |
| prevCursor | string | Cursor for the previous page of results |
Request
Transactions/List Transactions [GET]
curl --request GET \
--url https://sandboxapi.onbrails.com/api/v2/transactions \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'accept: application/json'Responses
🟢 200 - Result example
{
"status": true,
"message": "fetched transactions successful",
"data": {
"transactions": [
{
"id": "00000000-0000-0000-0000-e000fca0000f",
"type": "DEBIT",
"fees": "0",
"action": "GHS_ACCOUNT_PAYOUT",
"amount": "3.26",
"status": "success",
"channel": "payout",
"createdAt": "2024-06-12T12:21:09.387Z",
"updatedAt": "2024-06-12T12:21:50.692Z",
"reference": "6dd1c917f08f",
"companyId": "00000000-0000-0000-0000-e000fca0000f",
"customerId": "00000000-0000-0000-0000-e000fca0000f",
"exchangeRate": "15.35",
"balanceAfter": "255",
"description": "SEND FUND ",
"currency": "USD",
"payoutAmount": 50,
"payoutCurrency": "GHS"
},
{
"id": "00000000-0000-0000-0000-e000fca0000f",
"type": "CREDIT",
"fees": "0",
"action": "DEPOSIT_NGN",
"amount": "10000",
"status": "success",
"channel": "bank",
"createdAt": "2024-06-12T11:59:08.160Z",
"updatedAt": "2024-06-12T11:59:08.819Z",
"reference": "0000a0000af6",
"companyId": "00000000-0000-0000-0000-e000fca0000f",
"customerId": "00000000-0000-0000-0000-e000fca0000f",
"exchangeRate": "0",
"balanceAfter": "1000010",
"description": "CREDIT",
"currency": "NGN"
},
{
"id": "00000000-0000-0000-0000-e000fca0000f",
"type": "DEBIT",
"fees": "1",
"action": "FUND_CARD",
"amount": "7",
"status": "success",
"channel": "card",
"createdAt": "2024-02-01T20:11:58.457Z",
"updatedAt": "2024-02-01T20:11:58.457Z",
"reference": "0bea00db0c0",
"companyId": "00000000-0000-0000-0000-e000fca0000f",
"customerId": "00000000-0000-0000-0000-e000fca0000f",
"exchangeRate": "0",
"balanceAfter": "9",
"description": "TOP UP CARD FROM USD WALLET",
"currency": "USD"
}
],
"meta": {
"limit": 50,
"nextCursor": "eyJpZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLWUwMDBmY2EwMDAwZiJ9",
"prevCursor": null,
"hasNextPage": false,
"hasPreviousPage": false
}
}
}