APG PayAPG Paydocs

Merchants

List balances

GET/balances
Request
GEThttps://api.tst.au.apgpay.dev/balances
curl -X GET https://api.tst.au.apgpay.dev/balances \
  -H "Authorization: Bearer $API_KEY"

Return a merchant's balances, the platform's ledger position, and what each connected gateway holds. The merchant is named by merchantId or the Merchant-Id header.

Permissions

Required permission
merchantFinancials:query

Requires the `query` action on `merchantFinancials` for the supplied runtime context

Query parameters

pageinteger (int32)

1-based page number.

limitinteger (int32)

Maximum items per page.

columnsarray of BalColumn

Columns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.

merchantIdstring

Whose balances to read. Omit it when the Merchant-Id header names the merchant.

Responses

The response is a tagged shape: type is always "BalPageAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "BalPageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "BalPageAttributes",
  "data": [
    {
      "type": "BalViewGateway",
      "merchantId": "mcht_9f2Kd8QpLzXw",
      "gateway": "string",
      "amounts": {
        "type": "BalGatewayAmountsAttributes",
        "currency": "AUD",
        "available": 1250,
        "pending": 1250
      }
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses