Skip to main content
Use this endpoint to retrieve all your accounts together with their aggregated transaction statistics in a single response. Each account object includes a live balance, the total number and value of inbound collections, the total number and value of outbound transfers, and the date of the last transaction. This is useful for building summary dashboards or generating periodic reports without issuing separate balance and transaction queries. You can optionally filter the result set by account type, a specific account number, or account status. Endpoint
POST https://baasapi.payrepmfb.com/api/v1/account/api/fetch_account_summaries
Sandbox
POST https://shogun-dev.xchangeboxng.com/api/v1/account/api/fetch_account_summaries

Authentication

Include your Bearer token in the Authorization header:
Authorization: Bearer <access_token>
Obtain a token from Generate Token.

Request body

All fields are optional. Send an empty JSON object ({}) to retrieve summaries for all accounts.
account_type
string
Filter summaries to a specific account class. Accepted values: "pool", "current", "virtual".
account_number
string
Filter summaries to a single account by its 10-digit account number.
status
string
Filter by account status. Accepted values: "active", "inactive", "blocked", "closed", "pending".

Example request — all accounts

curl --request POST \
  --url https://baasapi.payrepmfb.com/api/v1/account/api/fetch_account_summaries \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{}'

Example request — current accounts only

curl --request POST \
  --url https://baasapi.payrepmfb.com/api/v1/account/api/fetch_account_summaries \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "account_type": "current"
  }'

Response

Success

The response data is an array. Each element represents one account with its transaction statistics.
data
array
List of account summary objects.
{
  "status": true,
  "response_code": "00",
  "message": "Account summaries fetched successfully",
  "data": [
    {
      "account_number": "7801234567",
      "account_name": "Main Pool Account",
      "account_type": "pool",
      "account_class": "primary",
      "status": "active",
      "balance": "1500000.000000000",
      "last_balance_update": "2026-02-25T10:30:00Z",
      "total_collections": 142,
      "total_collection_amount": "5200000.00",
      "total_transfers": 38,
      "total_transfer_amount": "3700000.00",
      "total_transactions": 180,
      "last_transaction_date": "2026-02-25T14:22:00Z",
      "created_at": "2026-01-15T09:00:00Z"
    }
  ]
}

Error codes

CodeMeaning
00Success
41Customer not found — your API credentials are invalid