Transaction history
POST /api/transaction-history
List wallet transactions for one date or a date range.
Authentication
HTTP Basic, as described in Authentication. No extra scope is checked.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Basic base64(api_user_id:api_key). |
Content-Type | Yes | application/json |
Accept | No | application/json |
Body
| Field | Required | Rules | Description |
|---|---|---|---|
datestring |
No | nullable|date_format:Y-m-d | Single day. Required unless startDate and endDate are both set. |
startDatestring |
No | nullable|date_format:Y-m-d | Range start. |
endDatestring |
No | nullable|date_format:Y-m-d|after_or_equal:startDate | Range end. |
transactionStatusstring |
No | nullable|in:SUCCEEDED,FAILED,PENDING | Filter. |
transactionTypestring |
No | nullable|in:COLLECTION,DISBURSEMENT | Filter. |
primaryOnlyboolean |
No | true or false | Hide charge rows when true. |
searchstring |
No | nullable|max:255 | Matches reference, amount, reason, or phone. |
pageinteger |
No | nullable|integer|min:1 | Page number. |
perPageinteger |
No | nullable|integer|min:1|max:200 | Defaults to 50. |
Behavior
- Provide date, or both startDate and endDate. Dates use Y-m-d.
- SUCCEEDED, FAILED, and PENDING use the same mapping as Check status.
- primaryOnly true hides charge rows.
Idempotency. Not supported by a dedicated header.
Rate limit. No rate limit is configured on the API.
Example request
{
"date": "2026-10-20",
"primaryOnly": true,
"perPage": 20
}
Success ยท HTTP 200
{
"response": "OK",
"data": {
"transactions": [
{
"ssentezoWalletReference": "generated-uuid",
"externalReference": "order-1001",
"transactionStatus": "SUCCEEDED",
"transactionType": "COLLECTION",
"isCharge": false,
"amount": 5000,
"charges": 200,
"reason": "Order 1001",
"currency": "UGX",
"msisdn": "256772123456",
"financialTransactionId": "provider-reference",
"transactionTime": "2026-10-20T12:00:00.000000Z"
}
],
"pagination": {
"currentPage": 1,
"perPage": 20,
"total": 1,
"lastPage": 1
}
}
}
Errors
| Status | When |
|---|---|
| 401 NO_AUTHORIZATION_HEADER | The Authorization header is missing. |
| 403 INVALID_AUTHORIZATION_HEADER | The header must start with "Basic ". |
| 403 MISSING_USER_OR_KEY | The decoded value must be api_user_id:api_key. |
| 403 INVALID_USER_OR_KEY | The API user or key was not recognized. |
| 403 ORGANIZATION_SUSPENDED | The organization user is suspended. |
| 400 | Validation failed, including a missing date range. |
Code
curl
curl --request POST \
--url "$SSENTEZO_BASE_URL/api/transaction-history" \
--header "Authorization: Basic $SSENTEZO_BASIC_TOKEN" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"date": "2026-10-20",
"primaryOnly": true,
"perPage": 20
}'
php
$client = new Ssentezo\Wallet\SsentezoClient(
getenv('SSENTEZO_API_USER'),
getenv('SSENTEZO_API_KEY'),
getenv('SSENTEZO_BASE_URL')
);
$result = $client->request('POST', '/api/transaction-history', json_decode(<<<'JSON'
{
"date": "2026-10-20",
"primaryOnly": true,
"perPage": 20
}
JSON, true));
javascript
const token = Buffer.from(process.env.SSENTEZO_API_USER + ':' + process.env.SSENTEZO_API_KEY).toString('base64');
const response = await fetch(process.env.SSENTEZO_BASE_URL + '/api/transaction-history', {
method: 'POST',
headers: {
Authorization: 'Basic ' + token,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"date": "2026-10-20",
"primaryOnly": true,
"perPage": 20
}),
});
const payload = await response.json();
python
import base64, json, os, urllib.request
token = base64.b64encode(f"{os.environ['SSENTEZO_API_USER']}:{os.environ['SSENTEZO_API_KEY']}".encode()).decode()
request = urllib.request.Request(
os.environ['SSENTEZO_BASE_URL'] + '/api/transaction-history',
data=json.dumps({
"date": "2026-10-20",
"primaryOnly": True,
"perPage": 20
}).encode(),
headers={'Authorization': f'Basic {token}', 'Accept': 'application/json', 'Content-Type': 'application/json'},
method='POST',
)
with urllib.request.urlopen(request, timeout=20) as response:
payload = json.load(response)
java
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(System.getenv("SSENTEZO_BASE_URL") + "/api/transaction-history"))
.timeout(Duration.ofSeconds(20))
.header("Authorization", "Basic " + Base64.getEncoder().encodeToString((System.getenv("SSENTEZO_API_USER") + ":" + System.getenv("SSENTEZO_API_KEY")).getBytes(StandardCharsets.UTF_8)))
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{\"date\":\"2026-10-20\",\"primaryOnly\":true,\"perPage\":20}"))
.build();
Set SSENTEZO_API_USER, SSENTEZO_API_KEY, and SSENTEZO_BASE_URL. SSENTEZO_BASIC_TOKEN is the base64 of user:key.
Ssentezo Developers