Skip to content

Retrieve a business account request ​

Reads a business account request and where it stands. This is the only way to learn that staff approved or declined it: no webhook is sent.

Endpoint ​

GET /v1/payments/merchant/accounts/{id}/org-requests/{request_id}
AuthSecret key
Scopeaccounts:read
PlatformYour organisation must be switched on as a platform, and the call must come from an allowed address if MOOKHPay set a list
Switched onWith the platform API on that deployment

A key with only accounts:write can create, attach and submit, but cannot read a request with this route.

Headers ​

HeaderRequiredValue
AuthorizationYesBearer mkp_…

Parameters ​

Path

NameTypeRequiredConstraints
idstringYesThe seller's account id
request_idstringYesorq_ and 24 hex characters, a request of this account

There is no route that lists a seller's requests. Store each request_id when you create it.

Example request ​

The samples poll once an hour until the request is decided. Staff review takes people time, so poll slowly.

sh
curl https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294/org-requests/orq_3c8e1a9f4b7d20e6c5a1b902 \
  -H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"
js
const BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant";
const DECIDED = new Set(["approved", "declined", "withdrawn"]);

export async function waitForDecision(accountId, requestId) {
  for (;;) {
    const res = await fetch(`${BASE}/accounts/${accountId}/org-requests/${requestId}`, {
      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}`);
    if (DECIDED.has(answer.data.request.status)) return answer.data.request;
    await new Promise((resolve) => setTimeout(resolve, 60 * 60 * 1000));
  }
}

const request = await waitForDecision(
  "acct_ke_9c2f41b07e5d38a6c1f0b294",
  "orq_3c8e1a9f4b7d20e6c5a1b902",
);
console.log(request.status, request.organisation_account_id, request.decline_reason);
python
import os
import time

import requests

BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant"
DECIDED = {"approved", "declined", "withdrawn"}


def wait_for_decision(account_id, request_id):
    while True:
        res = requests.get(
            f"{BASE}/accounts/{account_id}/org-requests/{request_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']}")
        request = answer["data"]["request"]
        if request["status"] in DECIDED:
            return request
        time.sleep(3600)


r = wait_for_decision("acct_ke_9c2f41b07e5d38a6c1f0b294", "orq_3c8e1a9f4b7d20e6c5a1b902")
print(r["status"], r["organisation_account_id"], r["decline_reason"])
php
<?php
function read_org_request(string $accountId, string $requestId): array
{
    $ch = curl_init("https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/{$accountId}/org-requests/{$requestId}");
    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']}");
    }
    return $answer['data']['request'];
}

$request = read_org_request('acct_ke_9c2f41b07e5d38a6c1f0b294', 'orq_3c8e1a9f4b7d20e6c5a1b902');
echo $request['status'], ' ', $request['organisation_account_id'] ?? '-', PHP_EOL;

Response ​

200 OK with description Organisation request. An approved request:

json
{
  "ok": true,
  "description": "Organisation request",
  "data": {
    "request": {
      "request_id": "orq_3c8e1a9f4b7d20e6c5a1b902",
      "account_id": "acct_ke_9c2f41b07e5d38a6c1f0b294",
      "kind": "sole_prop",
      "name": "Wanjiru Prints",
      "username": "wanjiruprints",
      "status": "approved",
      "decline_reason": null,
      "missing_documents": [],
      "documents": [
        {
          "id": "orqd_7a1c3e5f9b2d4068e1a3c5b7",
          "type": "registration_certificate",
          "file_name": "registration-certificate.pdf",
          "content_type": "application/pdf",
          "size": 284113,
          "uploaded_at": "2026-11-20T09:04:12.000Z"
        },
        {
          "id": "orqd_0b2d4f6a8c1e3579b0d2f4a6",
          "type": "tax_pin",
          "file_name": "kra-pin.pdf",
          "content_type": "application/pdf",
          "size": 91844,
          "uploaded_at": "2026-11-20T09:05:40.000Z"
        }
      ],
      "directors": [],
      "organisation_account_id": "acct_ke_e41b7c09d2a3f5860b1c4d72",
      "created_at": "2026-11-20T09:00:00.000Z",
      "submitted_at": "2026-11-20T09:06:02.000Z",
      "reviewed_at": "2026-11-21T07:42:18.000Z"
    }
  }
}

Response fields ​

data.request is the request object described on Create a business account request.

What to do with each status:

statusWhat to do
draftAttach the missing documents in missing_documents, then submit
awaiting_directorsWait. directors[].status shows who has accepted
pendingWait for staff
approvedStore organisation_account_id. It is an account of yours: its origin is created and its external_reference is the request_id. It has its own wallet, no phone and no login link. A payout from it needs a payout account its owners set in MOOKHPay, and a company's payouts wait for its owners' signatures
declinedShow the seller decline_reason. Attach what was missing and submit again under the same request_id. The details (name, username, numbers) cannot be changed through the API
withdrawnThe seller gave it up. Open a new request if they ask

Errors ​

HTTPCodeNameWhenWhat to do
4003014IDENTITY_HEADER_REFUSEDThe request carries a session or identity headerRemove it
4012781API_KEY_INVALIDMissing, malformed, unknown or revoked keyCheck the key
4032941API_KEY_SCOPE_REQUIREDThe key lacks accounts:readIssue 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
4032942PLATFORM_NOT_ENABLEDYour organisation is not a platform, or its platform is suspendedTalk to MOOKHPay
4033013PLATFORM_IP_NOT_ALLOWEDThe call came from an address not on your platform's allow-listCall from a listed address
4042943PLATFORM_ACCOUNT_NOT_FOUNDThe account is unknown, another platform's, revoked or malformed. After the seller disconnects your platform, their requests answer this tooCheck the id
4043028ORG_REQUEST_NOT_FOUNDThe request is unknown, malformed, another account's or another platform'sCheck request_id
4291804RATE_LIMIT_EXCEEDEDOver the rate limit, or your platform reached its limit of unknown account idsWait Retry-After seconds
5032782AUTHN_UNAVAILABLEThe key could not be checkedRetry
5033016PLATFORM_ACCOUNTS_UNAVAILABLEThe request could not be readRetry

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.

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