Developers
Partner API

Statement

Returns a paginated transaction history for a savings account.

GET /accounts/{account_ref}/statement

Required scope: statement:read

Query parameters

Parameter Type Description
from date, optional Only include transactions on/after this date.
to date, optional Only include transactions on/before this date.
page integer, optional Defaults to 1.
per_page integer, optional Defaults to 20, maximum 100.

Example request

The query string is part of the signature: sign the path and query exactly as you send them, in the same order and with the same encoding. See Authentication.

TIMESTAMP=$(date +%s)
REQUEST_URI="/api/partner/v1/accounts/SA-00123/statement?from=2026-01-01&to=2026-06-30&per_page=10"
BODY_HASH=$(printf '%s' '' | openssl dgst -sha256 | sed 's/^.* //')
SIGNATURE=$(printf '%s' "${TIMESTAMP}|GET|${REQUEST_URI}||${BODY_HASH}" | openssl dgst -sha256 -hmac "$API_SECRET" | sed 's/^.* //')

curl "https://prodsacco.officeug.com${REQUEST_URI}" \
  -H "X-Api-Key: $API_KEY" \
  -H "X-Timestamp: $TIMESTAMP" \
  -H "X-Signature: $SIGNATURE"
<?php
$timestamp = (string) time();
$query     = http_build_query(['from' => '2026-01-01', 'to' => '2026-06-30', 'per_page' => 10]);
$path      = "/api/partner/v1/accounts/SA-00123/statement?{$query}";
$signature = hash_hmac('sha256', "{$timestamp}|GET|{$path}||" . hash('sha256', ''), $apiSecret);

$ch = curl_init("https://prodsacco.officeug.com{$path}");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-Api-Key: {$apiKey}",
        "X-Timestamp: {$timestamp}",
        "X-Signature: {$signature}",
    ],
]);
echo curl_exec($ch);
from urllib.parse import urlencode

timestamp = str(int(time.time()))
query = urlencode({"from": "2026-01-01", "to": "2026-06-30", "per_page": 10})
path = f"/api/partner/v1/accounts/SA-00123/statement?{query}"
body_hash = hashlib.sha256(b"").hexdigest()
payload = f"{timestamp}|GET|{path}||{body_hash}"
signature = hmac.new(api_secret.encode(), payload.encode(), hashlib.sha256).hexdigest()

response = requests.get(
    f"https://prodsacco.officeug.com{path}",
    headers={"X-Api-Key": api_key, "X-Timestamp": timestamp, "X-Signature": signature},
)
print(response.json())
const timestamp = Math.floor(Date.now() / 1000).toString();
const query = new URLSearchParams({ from: '2026-01-01', to: '2026-06-30', per_page: '10' });
const path = `/api/partner/v1/accounts/SA-00123/statement?${query}`;
const bodyHash = crypto.createHash('sha256').update('').digest('hex');
const payload = `${timestamp}|GET|${path}||${bodyHash}`;
const signature = crypto.createHmac('sha256', apiSecret).update(payload).digest('hex');

const response = await fetch(`https://prodsacco.officeug.com${path}`, {
  headers: { 'X-Api-Key': apiKey, 'X-Timestamp': timestamp, 'X-Signature': signature },
});
console.log(await response.json());

Example response — 200 OK

{
  "success": true,
  "message": "OK",
  "data": {
    "account_ref": "SA-00123",
    "transactions": [
      {
        "id": 91234,
        "transaction_type": "partner_disbursement",
        "amount": "50000.00",
        "balance_before": "402300.00",
        "balance_after": "452300.00",
        "description": "Partner disbursement — ref LOAN-8841",
        "transaction_date": "2026-06-12",
        "reference_no": "LOAN-8841"
      }
    ],
    "pagination": {
      "current_page": 1,
      "last_page": 4,
      "total": 37
    }
  },
  "request_id": "f3a9e7d1-5c8b-4a2e-9f1d-6b3c8e2a4d7f"
}

transaction_type reflects every kind of movement on the account, not just ones this API created — deposit, withdrawal, loan_repayment, partner_disbursement, partner_collection, and others all appear in the same statement.

Errors specific to this endpoint

HTTP error_code Meaning
404 ACCOUNT_NOT_FOUND No active account with this account_ref exists for your SACCO.