Appearance
Retrieve an account
Reads one account your platform reaches: one you created, or one whose owner approved your link.
An id that is unknown, belongs to another platform, or is malformed gets the same 404. You cannot tell those apart, and nor can anyone probing with your key.
An account whose owner disconnected your platform (or closed their account) answers 409 with code 3061 where pockets are available (Kenya), and 404 elsewhere. The 409 does not count toward your limit of unknown account ids.
In pocket mode, the account carries a pocket. Read pocket.status before your first pay-in.
Endpoint
GET /v1/payments/merchant/accounts/{id}| Auth | Secret key, Authorization: Bearer mkp_… |
| Scope | accounts:read on the key, and accounts:read in the account's grant |
| Platform | The key's organisation must be an active platform, and the call must come from an address on its allow-list if it has one |
| Feature flag | Registered only where the platform API is on |
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer mkp_test_… or Bearer mkp_live_… |
Parameters
Path
| Name | Type | Required | Constraints and meaning |
|---|---|---|---|
id | string | Yes | acct_<country>_<24 hex>. Any other shape is 404 and counts as a miss |
Example request
sh
curl https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294 \
-H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"js
const BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant";
const id = "acct_ke_9c2f41b07e5d38a6c1f0b294";
const res = await fetch(`${BASE}/accounts/${id}`, {
headers: { Authorization: `Bearer ${process.env.MOOKHPAY_SECRET_KEY}` },
});
const body = await res.json();
if (!body.ok) throw new Error(`${res.status} ${body.code}: ${body.description}`);
console.log(body.data.requirements.currently_due);python
import os
import requests
BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant"
account_id = "acct_ke_9c2f41b07e5d38a6c1f0b294"
res = requests.get(
f"{BASE}/accounts/{account_id}",
headers={"Authorization": f"Bearer {os.environ['MOOKHPAY_SECRET_KEY']}"},
timeout=30,
)
body = res.json()
if not body["ok"]:
raise RuntimeError(f"{res.status_code} {body['code']}: {body['description']}")
print(body["data"]["requirements"]["currently_due"])php
<?php
$base = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant";
$id = "acct_ke_9c2f41b07e5d38a6c1f0b294";
$ch = curl_init("$base/accounts/$id");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("MOOKHPAY_SECRET_KEY")],
]);
$body = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if (!$body["ok"]) {
throw new RuntimeException("$status {$body['code']}: {$body['description']}");
}
print_r($body["data"]["requirements"]["currently_due"]);Response
200 OK.
json
{
"ok": true,
"description": "Account",
"data": {
"id": "acct_ke_9c2f41b07e5d38a6c1f0b294",
"username": "joyotieno4821",
"status": "active",
"origin": "created",
"external_reference": "seller-5521",
"requirements": { "currently_due": [], "pending": [] },
"capabilities": { "payments": true, "payouts": true },
"created_at": "2026-11-20T09:00:00.000Z",
"pocket": {
"slug": "kazi",
"name": "Kazi Studio",
"status": "connected",
"balance_currency": "KES"
}
}
}pocket is there only in pocket mode. Without a pocket, the answer ends at created_at.
Response fields
data is the account object.
Errors
| HTTP | Code | Name | When | What to do |
|---|---|---|---|---|
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 accounts:read | Issue 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 |
403 | 2942 | PLATFORM_NOT_ENABLED | The organisation is not an active platform | Ask MOOKHPay |
403 | 3013 | PLATFORM_IP_NOT_ALLOWED | The call came from an address not on your allow-list | Call from a listed address |
403 | 3025 | PLATFORM_GRANT_SCOPE_MISSING | The account's grant does not include accounts:read | Ask the owner to approve a new account link with accounts:read |
404 | 2943 | PLATFORM_ACCOUNT_NOT_FOUND | Unknown, another platform's or malformed id; elsewhere than Kenya, also a revoked one | Check the id. If it was yours, the owner may have disconnected your platform |
409 | 3061 | PLATFORM_ACCOUNT_DISCONNECTED | Where pockets are available (Kenya): the owner disconnected your platform or closed their account. data.error is PLATFORM_ACCOUNT_DISCONNECTED | Stop paying in. A pocket and its money stay theirs. Ask them to connect again |
429 | 1804 | RATE_LIMIT_EXCEEDED | Over the rate limit, or over 100 unknown account ids in an hour | Wait Retry-After seconds |
503 | 2782 | AUTHN_UNAVAILABLE | Keys cannot be checked | Retry with backoff |
503 | 3016 | PLATFORM_ACCOUNTS_UNAVAILABLE | The account could not be read | Retry with backoff |
Rate limit
120 requests a minute per platform, shared with every other account route. Every 404 on an account id also counts against your platform (a 409 3061 does not), whichever key made the call: after 100 in an hour (PLATFORM_ACCOUNT_MISS_LIMIT), every account lookup answers 429 and code 1804 until the hour is up, with Retry-After and data.retryAfter in seconds.