Skip to main content
Use this endpoint to retrieve collection (inbound credit) aggregates for every account in your business. The response groups data by account and includes the total number of collections and their combined value. You can filter by account type, status, pool account, or date range to focus on a specific segment of your portfolio.

Endpoint

POST /api/v1/account/web/fetch_account_collections

Authentication

Include your JWT access token in the Authorization header.
Authorization: Bearer <access_token>
Obtain a token via POST /auth/web/login.

Request body

All body parameters are optional.
account_type
string
Filter by account type. Allowed values: normal, virtual, current, savings.
account_number
string
Filter results to a specific 10-digit account number.
status
string
Filter by account status. Allowed values: active, inactive, blocked, closed, pending.
pool_account_number
string
Filter virtual accounts by their linked pool account number. Maximum 10 characters.
date
string
Scope collections to a single date (YYYY-MM-DD).
start_date
string
Start of a date range for collection filtering (YYYY-MM-DD).
end_date
string
End of a date range for collection filtering (YYYY-MM-DD).
limit
integer
Maximum number of account records to return per page.
cursor_created_at
string
Pagination cursor — the created_at timestamp (ISO 8601) of the last item from the previous page.
cursor_id
string
Pagination cursor — the UUID id of the last item from the previous page.

Example request

curl --request POST \
  --url https://baasapi.payrepmfb.com/api/v1/account/web/fetch_account_collections \
  --header "Authorization: Bearer <access_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "account_type": "virtual",
    "start_date": "2026-01-01",
    "end_date": "2026-04-28"
  }'

Response

A successful request returns an array of account collection aggregate objects.
status
boolean
true when the request succeeds.
response_code
string
"00" on success.
data
array
Array of account collection objects, one per account.
{
  "status": true,
  "response_code": "00",
  "message": "Account collections 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",
      "last_transaction_date": "2026-02-25T14:22:00Z",
      "created_at": "2026-01-15T09:00:00Z"
    }
  ]
}

Error codes

Response codeMeaning
41Customer not found — your session credentials are invalid.