Skip to content

List your balance transactions ​

Lists the movements on one of your own wallets, oldest first, with the balance after each. Use it with Retrieve your balance to reconcile your books: pair each MOOKHPay movement with one of your own records.

It reads the account that owns the key, one wallet at a time: main by default, or one of your own pockets. It reads only.

Endpoint ​

GET /v1/payments/merchant/balance/transactions
AuthSecret key, Authorization: Bearer mkp_…
Scopebalance:read. Only an Owner can add it to a key
PlatformNot needed. Any account's key can have balance:read
Switched onOn every host

Headers ​

HeaderRequiredValue
AuthorizationYesBearer mkp_test_… or Bearer mkp_live_…

Parameters ​

Query. Unknown parameters are refused with 400 and code 1701.

NameTypeRequiredConstraints and meaning
walletstringNomain (the default) or one of your pockets' slugs from your balance: a-z, 0-9 and -, starting with a letter or digit, up to 50 characters. A wallet you do not hold is 404 and code 3019
fromstringNoISO 8601 date-time with a time zone. Inclusive
tostringNoISO 8601 date-time with a time zone. Inclusive. Must be later than from, or 400, 1701, to must be later than from
limitstring of digitsNo1 to 100, default 50
cursorstringNoUp to 400 characters. The next_cursor of the previous page. It carries the wallet and window it was made for: send it alone, or with the same wallet, from and to. A different value or an edited cursor is 400 and code 3012

Example request ​

sh
curl -G https://payments-ke-staging.mookhpay.co/v1/payments/merchant/balance/transactions \
  --data-urlencode "from=2026-11-25T00:00:00+03:00" \
  --data-urlencode "to=2026-11-25T23:59:59+03:00" \
  --data-urlencode "limit=100" \
  -H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"
js
const BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant";

const movements = [];
let query = new URLSearchParams({
  from: "2026-11-25T00:00:00+03:00",
  to: "2026-11-25T23:59:59+03:00",
  limit: "100",
});
for (;;) {
  const res = await fetch(`${BASE}/balance/transactions?${query}`, {
    headers: { Authorization: `Bearer ${process.env.MOOKHPAY_SECRET_KEY}` },
  });
  const answer = await res.json();
  if (!answer.ok) throw new Error(`${res.status} ${answer.code}: ${answer.description}`);
  movements.push(...answer.data.movements);
  if (!answer.data.next_cursor) break;
  query = new URLSearchParams({ cursor: answer.data.next_cursor, limit: "100" });
}

const net = movements.reduce(
  (sum, m) => sum + (m.direction === "in" ? m.amount : -m.amount),
  0,
);
console.log(movements.length, "movements, net", net);

URLSearchParams and curl's --data-urlencode encode the + in a time zone offset. When you build the URL by hand, encode it as %2B or use Z.

Response ​

200 OK with description Transactions.

json
{
  "ok": true,
  "description": "Transactions",
  "data": {
    "wallet": "main",
    "movements": [
      {
        "id": "51877",
        "type": "deposit",
        "status": "completed",
        "direction": "in",
        "amount": 250000,
        "description": "Payment for order-1042",
        "balance_after": 250000,
        "created_at": "2026-11-25T08:02:44.000Z"
      },
      {
        "id": "51902",
        "type": "transfer",
        "status": "completed",
        "direction": "out",
        "amount": 150000,
        "description": "Payment for the Safari Lager campaign",
        "balance_after": 100000,
        "created_at": "2026-11-25T08:14:31.000Z"
      }
    ],
    "next_cursor": null
  }
}

Response fields ​

FieldTypeMeaning
walletstringThe wallet read
movementsarrayUp to limit movements, oldest first
movements[].idstringThe ledger's transaction number, as a string of digits
movements[].typestringThe ledger's stored type: deposit, withdrawal, transfer, fee or adjustment. A pay-in you make into someone's pocket is a transfer out of main
movements[].statusstringpending, completed, failed or reversed
movements[].directionstringin or out of this wallet
movements[].amountintegerMinor units, never negative. Read direction for the sign
movements[].descriptionstringThe ledger's description. An empty string when it has none. A pay-in carries its remarks
movements[].balance_afterintegerMinor units. The running balance after this movement. Without from, it is the wallet's balance. With from, it counts from zero at from
movements[].created_atstringISO 8601
next_cursorstring or nullPass it as cursor for the next page. null on the last page

Errors ​

HTTPCodeNameWhenWhat to do
4001701INVALID_REQUEST_DATAA bad wallet, from, to or limit, to not later than from, or an unknown parameterFix the query
4003012PLATFORM_CURSOR_INVALIDThe cursor was edited, or sent with a different wallet, from or toSend the cursor alone, or start again
4003014IDENTITY_HEADER_REFUSEDThe request carries a session or identity headerRemove the header
4012781API_KEY_INVALIDMissing, malformed, unknown or revoked keyCheck the key
4032941API_KEY_SCOPE_REQUIREDThe key lacks balance:readAn Owner issues a key with the scope
4033042API_KEY_IP_NOT_ALLOWEDThe account has allowed addresses and the call came from another addressCall from a listed address
4043019PLATFORM_WALLET_NOT_FOUNDYou hold no wallet by that slugRead your balance for the wallets you hold
4291804RATE_LIMIT_EXCEEDEDOver the rate limit belowWait Retry-After seconds
5032752LEDGER_UNAVAILABLEThe ledger did not answerRetry with backoff
5032782AUTHN_UNAVAILABLEKeys cannot be checkedRetry with backoff

Rate limit ​

120 requests a minute per account, or the higher number MOOKHPay set for it, shared with Retrieve your balance. Over it: 429, code 1804, with Retry-After and data.retryAfter in seconds.

Staging documentation. A checkout made with a secret key on staging charges a real phone. See Environments.