Appearance
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| Auth | Secret key, Authorization: Bearer mkp_… |
| Scope | balance:read. Only an Owner can add it to a key |
| Platform | Not needed. Any account's key can have balance:read |
| Switched on | On every host |
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer mkp_test_… or Bearer mkp_live_… |
Parameters
Query. Unknown parameters are refused with 400 and code 1701.
| Name | Type | Required | Constraints and meaning |
|---|---|---|---|
wallet | string | No | main (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 |
from | string | No | ISO 8601 date-time with a time zone. Inclusive |
to | string | No | ISO 8601 date-time with a time zone. Inclusive. Must be later than from, or 400, 1701, to must be later than from |
limit | string of digits | No | 1 to 100, default 50 |
cursor | string | No | Up 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
| Field | Type | Meaning |
|---|---|---|
wallet | string | The wallet read |
movements | array | Up to limit movements, oldest first |
movements[].id | string | The ledger's transaction number, as a string of digits |
movements[].type | string | The 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[].status | string | pending, completed, failed or reversed |
movements[].direction | string | in or out of this wallet |
movements[].amount | integer | Minor units, never negative. Read direction for the sign |
movements[].description | string | The ledger's description. An empty string when it has none. A pay-in carries its remarks |
movements[].balance_after | integer | Minor 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_at | string | ISO 8601 |
next_cursor | string or null | Pass it as cursor for the next page. null on the last page |
Errors
| HTTP | Code | Name | When | What to do |
|---|---|---|---|---|
400 | 1701 | INVALID_REQUEST_DATA | A bad wallet, from, to or limit, to not later than from, or an unknown parameter | Fix the query |
400 | 3012 | PLATFORM_CURSOR_INVALID | The cursor was edited, or sent with a different wallet, from or to | Send the cursor alone, or start again |
400 | 3014 | IDENTITY_HEADER_REFUSED | The request carries a session or identity header | Remove the header |
401 | 2781 | API_KEY_INVALID | Missing, malformed, unknown or revoked key | Check the key |
403 | 2941 | API_KEY_SCOPE_REQUIRED | The key lacks balance:read | An Owner issues a key with the scope |
403 | 3042 | API_KEY_IP_NOT_ALLOWED | The account has allowed addresses and the call came from another address | Call from a listed address |
404 | 3019 | PLATFORM_WALLET_NOT_FOUND | You hold no wallet by that slug | Read your balance for the wallets you hold |
429 | 1804 | RATE_LIMIT_EXCEEDED | Over the rate limit below | Wait Retry-After seconds |
503 | 2752 | LEDGER_UNAVAILABLE | The ledger did not answer | Retry with backoff |
503 | 2782 | AUTHN_UNAVAILABLE | Keys cannot be checked | Retry 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.