Appearance
Retrieve a payout
Reads one payout your platform made from one of your accounts, with its status worked out at the moment you read it. It does not return payouts the seller made themselves in MOOKHPay, or another platform's payouts from the same person.
Endpoint
GET /v1/payments/merchant/accounts/{id}/payouts/{payout_id}| Auth | Secret key |
| Scope | payouts:write or accounts:read (either one) |
| Platform | Your organisation must be switched on as a platform, and the call must come from an allowed address if MOOKHPay set a list |
| Switched on | Per deployment (PLATFORM_PAYOUTS_ENABLED). Where it is off, the route answers 404 |
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer mkp_… |
Parameters
Path
| Name | Type | Required | Constraints |
|---|---|---|---|
id | string | Yes | One of your account ids: acct_, the country, _ and 24 hex characters |
payout_id | string | Yes | po_, the country, _ and 24 hex characters, made from this account |
Example request
sh
curl https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294/payouts/po_ke_6b1f0e9a2c7d48e3a5b2c810 \
-H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"js
const BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant";
const account = "acct_ke_9c2f41b07e5d38a6c1f0b294";
const payoutId = "po_ke_6b1f0e9a2c7d48e3a5b2c810";
const res = await fetch(`${BASE}/accounts/${account}/payouts/${payoutId}`, {
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}`);
console.log(answer.data.status, answer.data.failure);python
import os
import requests
BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant"
account = "acct_ke_9c2f41b07e5d38a6c1f0b294"
payout_id = "po_ke_6b1f0e9a2c7d48e3a5b2c810"
res = requests.get(
f"{BASE}/accounts/{account}/payouts/{payout_id}",
headers={"Authorization": f"Bearer {os.environ['MOOKHPAY_SECRET_KEY']}"},
timeout=30,
)
answer = res.json()
if not answer["ok"]:
raise RuntimeError(f"{res.status_code} {answer['code']}: {answer['description']}")
print(answer["data"]["status"], answer["data"]["failure"])php
<?php
$base = 'https://payments-ke-staging.mookhpay.co/v1/payments/merchant';
$account = 'acct_ke_9c2f41b07e5d38a6c1f0b294';
$payoutId = 'po_ke_6b1f0e9a2c7d48e3a5b2c810';
$ch = curl_init("{$base}/accounts/{$account}/payouts/{$payoutId}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('MOOKHPAY_SECRET_KEY')],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if (!$answer['ok']) {
throw new RuntimeException("{$status} {$answer['code']}: {$answer['description']}");
}
echo $answer['data']['status'], PHP_EOL;Response
200 OK with description Payout.
json
{
"ok": true,
"description": "Payout",
"data": {
"payout_id": "po_ke_6b1f0e9a2c7d48e3a5b2c810",
"account": "acct_ke_9c2f41b07e5d38a6c1f0b294",
"status": "failed",
"amount": 500000,
"fee": 0,
"total": 500000,
"currency": "KES",
"remarks": "Week 47 sales",
"destination": { "rail": "mpesa", "phone_masked": "+254 7•• ••• 678" },
"approval_id": null,
"failure": {
"code": "recipient_unreachable",
"message": "The number cannot receive this payout. The money is back in the wallet"
},
"created_at": "2026-11-20T10:00:04.000Z"
}
}Response fields
data is the payout object.
Errors
| HTTP | Code | Name | When | What to do |
|---|---|---|---|---|
400 | 3014 | IDENTITY_HEADER_REFUSED | The request carries a session or identity header | Remove it |
401 | 2781 | API_KEY_INVALID | Missing, malformed, unknown or revoked key | Check the key |
403 | 2941 | API_KEY_SCOPE_REQUIRED | The key has neither payouts:write nor accounts:read | Issue a key with one of them |
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 | Your organisation is not a platform, or its platform is suspended | Talk to MOOKHPay |
403 | 3013 | PLATFORM_IP_NOT_ALLOWED | The call came from an address not on your platform's allow-list | Call from a listed address |
404 | 2943 | PLATFORM_ACCOUNT_NOT_FOUND | The account is unknown, another platform's, revoked or malformed | Check the id |
409 | 3061 | PLATFORM_ACCOUNT_DISCONNECTED | Where pockets are on: the person disconnected your platform, or their account closed | Stop calling for the account until they link again |
404 | 3023 | PLATFORM_PAYOUT_NOT_FOUND | The payout is unknown, malformed, from another account or another platform, or was refused when you created it | Check both ids. A refused payout never becomes readable |
429 | 1804 | RATE_LIMIT_EXCEEDED | Over the rate limit, or your platform reached its limit of unknown account ids | Wait Retry-After seconds |
503 | 2782 | AUTHN_UNAVAILABLE | The key could not be checked | Retry |
503 | 3016 | PLATFORM_ACCOUNTS_UNAVAILABLE | The account could not be read | Retry |
Rate limit
120 requests a minute, shared by every account, balance, transaction, payout read, account link and business account request route your platform calls. Over it: 429, code 1804, with Retry-After and data.retryAfter in seconds. Unknown account ids also count against your platform: after 100 in an hour by default, account routes answer 429 until the hour is up.