Appearance
Business accounts for sellers
A seller who trades as a registered business can have a MOOKHPay business account, separate from their personal one. Your platform can ask for one for them. MOOKHPay staff check the documents and decide. Once approved, the business is one of your accounts with its own id and wallet.
| Route | Does | Scope |
|---|---|---|
POST /accounts/{id}/org-requests | Opens a draft request for the seller | accounts:write |
POST /accounts/{id}/org-requests/{request_id}/documents | Attaches one document | accounts:write |
POST /accounts/{id}/org-requests/{request_id}/submit | Sends it to MOOKHPay | accounts:write |
GET /accounts/{id}/org-requests/{request_id} | Reads where it stands | accounts:read |
{id} is the seller's account id, opened by you or linked to you.
Before you ask
- The seller must have claimed their account: a PIN set and the phone confirmed. Otherwise
409with code3035. See Open seller accounts. - Only a person's account can ask.
{id}naming a business account answers409with code3036. - One open request per seller, from any source, including one they started themselves in MOOKHPay. A second answers
409with code3029. - Companies need your platform switched on for them. A
companyrequest from a platform MOOKHPay has not switched on for companies answers403with code3037.
Kinds and documents
kind | Is | Documents needed | People |
|---|---|---|---|
sole_prop | A business name owned by one person, the seller | registration_certificate (business name registration certificate) and tax_pin (the proprietor's KRA PIN in Kenya, TIN in Uganda) | The seller alone |
company | A registered company | incorporation_certificate, tax_pin (the company's KRA PIN or TIN) and cr12 | The seller and at least one other director, named by MOOKHPay ID |
A document type that does not belong to the kind is refused. Each document is one PDF, JPEG or PNG of at most 10 MB. A request holds at most 10 documents.
Open the request
| Body field | Type | Required | Rules |
|---|---|---|---|
kind | string | Yes | sole_prop or company |
name | string | Yes | The registered business name. 1 to 100 characters |
username | string | Yes | The business's MOOKHPay ID. 3 to 50 characters: a-z, 0-9, _. Must be free |
registration_number | string | Yes | 1 to 64 characters |
tax_pin | string | Yes | 1 to 32 characters. Stored upper-case |
address | string | Yes | 1 to 300 characters |
contact_phone | string | Yes | + and 9 to 15 digits |
contact_email | string | Yes | Up to 254 characters, an address shape |
directors | array of strings | For company | The other directors' MOOKHPay IDs. Each 3 to 50 characters of letters, digits and _; 1 to 20 of them, each once whatever its case, and never the seller. A list that breaks these rules answers 409 with code 3032 and data.reason |
terms.accepted_at | string | Sometimes | When the seller accepted MOOKHPay's terms on your platform. ISO 8601 with a time zone, not in the future |
terms.version | string | With terms | 1 to 40 characters: letters, digits, ., _, - |
terms is needed when MOOKHPay has no attestation from your platform for this seller, which is the case for a linked account. An account you opened carries the attestation you sent with POST /accounts, which is used when terms is left out. Missing when needed: 400 with code 3038. The IP address is taken from your request.
sh
curl -X POST https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294/org-requests \
-H "Authorization: Bearer $MOOKHPAY_SECRET_KEY" \
-H "Idempotency-Key: biz-seller-8841" \
-H "Content-Type: application/json" \
-d '{
"kind": "sole_prop",
"name": "Joy Ceramics",
"username": "joy_ceramics",
"registration_number": "BN-2026-118422",
"tax_pin": "A012345678Z",
"address": "Ngong Road, Nairobi",
"contact_phone": "+254712345678",
"contact_email": "[email protected]"
}'js
const account = "acct_ke_9c2f41b07e5d38a6c1f0b294";
const res = await fetch(
`https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/${account}/org-requests`,
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MOOKHPAY_SECRET_KEY}`,
"Idempotency-Key": "biz-seller-8841",
"Content-Type": "application/json",
},
body: JSON.stringify({
kind: "sole_prop",
name: "Joy Ceramics",
username: "joy_ceramics",
registration_number: "BN-2026-118422",
tax_pin: "A012345678Z",
address: "Ngong Road, Nairobi",
contact_phone: "+254712345678",
contact_email: "[email protected]",
}),
},
);
const body = await res.json();
if (!body.ok) throw new Error(`${res.status} ${body.code}: ${body.description}`);
const requestId = body.data.request.request_id; // orq_…python
import os
import requests
account = "acct_ke_9c2f41b07e5d38a6c1f0b294"
res = requests.post(
f"https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/{account}/org-requests",
headers={
"Authorization": f"Bearer {os.environ['MOOKHPAY_SECRET_KEY']}",
"Idempotency-Key": "biz-seller-8841",
},
json={
"kind": "sole_prop",
"name": "Joy Ceramics",
"username": "joy_ceramics",
"registration_number": "BN-2026-118422",
"tax_pin": "A012345678Z",
"address": "Ngong Road, Nairobi",
"contact_phone": "+254712345678",
"contact_email": "[email protected]",
},
timeout=30,
)
body = res.json()
if not body["ok"]:
raise RuntimeError(f"{res.status_code} {body['code']}: {body['description']}")
request_id = body["data"]["request"]["request_id"] # orq_…php
<?php
$account = "acct_ke_9c2f41b07e5d38a6c1f0b294";
$ch = curl_init("https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/$account/org-requests");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("MOOKHPAY_SECRET_KEY"),
"Idempotency-Key: biz-seller-8841",
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"kind" => "sole_prop",
"name" => "Joy Ceramics",
"username" => "joy_ceramics",
"registration_number" => "BN-2026-118422",
"tax_pin" => "A012345678Z",
"address" => "Ngong Road, Nairobi",
"contact_phone" => "+254712345678",
"contact_email" => "[email protected]",
]),
]);
$body = json_decode(curl_exec($ch), true);
if (!$body["ok"]) {
throw new RuntimeException("{$body['code']}: {$body['description']}");
}
$requestId = $body["data"]["request"]["request_id"]; // orq_…The answer is 201 with the request, in draft:
json
{
"ok": true,
"description": "Organisation request",
"data": {
"request": {
"request_id": "orq_6d2b9f0e4a1c7e3b5d8f0a2c",
"account_id": "acct_ke_9c2f41b07e5d38a6c1f0b294",
"kind": "sole_prop",
"name": "Joy Ceramics",
"username": "joy_ceramics",
"status": "draft",
"decline_reason": null,
"missing_documents": ["registration_certificate", "tax_pin"],
"documents": [],
"directors": [],
"organisation_account_id": null,
"created_at": "2026-11-20T13:00:04.000Z",
"submitted_at": null,
"reviewed_at": null
}
}
}Retries: the same Idempotency-Key and body answer the same request with 200; a different body answers 422 with code 3015. A request with a new key but the same kind, name, username, registration_number and tax_pin as one your platform already has open for this seller also answers that request with 200, rather than 3029.
Attach the documents
Send each document as multipart/form-data with exactly two fields, type and file, and nothing else. The file part must carry its real content type (application/pdf, image/jpeg or image/png): MOOKHPay reads the file's bytes and refuses a file whose content does not match.
sh
curl -X POST https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294/org-requests/orq_6d2b9f0e4a1c7e3b5d8f0a2c/documents \
-H "Authorization: Bearer $MOOKHPAY_SECRET_KEY" \
-F type=registration_certificate \
-F "[email protected];type=application/pdf"js
import { readFile } from "node:fs/promises";
const account = "acct_ke_9c2f41b07e5d38a6c1f0b294";
const requestId = "orq_6d2b9f0e4a1c7e3b5d8f0a2c";
const form = new FormData();
form.append("type", "registration_certificate");
form.append(
"file",
new Blob([await readFile("registration.pdf")], { type: "application/pdf" }),
"registration.pdf",
);
const res = await fetch(
`https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/${account}/org-requests/${requestId}/documents`,
{
method: "POST",
headers: { Authorization: `Bearer ${process.env.MOOKHPAY_SECRET_KEY}` },
body: form, // fetch sets the multipart Content-Type and boundary
},
);
const body = await res.json();
if (!body.ok) throw new Error(`${res.status} ${body.code}: ${body.description}`);
console.log(body.data.document.id);python
import os
import requests
account = "acct_ke_9c2f41b07e5d38a6c1f0b294"
request_id = "orq_6d2b9f0e4a1c7e3b5d8f0a2c"
with open("registration.pdf", "rb") as f:
res = requests.post(
f"https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/{account}/org-requests/{request_id}/documents",
headers={"Authorization": f"Bearer {os.environ['MOOKHPAY_SECRET_KEY']}"},
data={"type": "registration_certificate"},
files={"file": ("registration.pdf", f, "application/pdf")},
timeout=60,
)
body = res.json()
if not body["ok"]:
raise RuntimeError(f"{res.status_code} {body['code']}: {body['description']}")
print(body["data"]["document"]["id"])php
<?php
$account = "acct_ke_9c2f41b07e5d38a6c1f0b294";
$requestId = "orq_6d2b9f0e4a1c7e3b5d8f0a2c";
$ch = curl_init("https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/$account/org-requests/$requestId/documents");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("MOOKHPAY_SECRET_KEY")],
CURLOPT_POSTFIELDS => [
"type" => "registration_certificate",
"file" => new CURLFile("registration.pdf", "application/pdf", "registration.pdf"),
],
]);
$body = json_decode(curl_exec($ch), true);
if (!$body["ok"]) {
throw new RuntimeException("{$body['code']}: {$body['description']}");
}
echo $body["data"]["document"]["id"], "\n";The answer is 201:
json
{
"ok": true,
"description": "Document attached",
"data": {
"document": {
"id": "orqd_3c9e1a7b5d2f4e6a8c0b1d3e",
"type": "registration_certificate",
"file_name": "registration.pdf",
"content_type": "application/pdf",
"size": 248113,
"uploaded_at": "2026-11-20T13:01:10.000Z"
}
}
}A file MOOKHPay will not take answers 400 with code 3034, or 413 for one over 10 MB, with data.reason: type (not a PDF, JPEG or PNG, or not what its content type says), size, empty, not_for_this_kind or too_many. A request body over about 10 MB is refused before it reaches MOOKHPay's check.
Documents can be added to a request in draft or declined. The request's other details cannot be changed through the API.
Send it
POST …/submit takes no body. A request still missing a document answers 409 with code 3031, with what is missing in data.
sh
curl -X POST https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294/org-requests/orq_6d2b9f0e4a1c7e3b5d8f0a2c/submit \
-H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"js
const res = await fetch(
`https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/${account}/org-requests/${requestId}/submit`,
{ method: "POST", 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.request.status); // pending, or awaiting_directors for a companypython
res = requests.post(
f"https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/{account}/org-requests/{request_id}/submit",
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"]["request"]["status"])php
<?php
$ch = curl_init("https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/$account/org-requests/$requestId/submit");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("MOOKHPAY_SECRET_KEY")],
]);
$body = json_decode(curl_exec($ch), true);
if (!$body["ok"]) {
throw new RuntimeException("{$body['code']}: {$body['description']}");
}
echo $body["data"]["request"]["status"], "\n";Where a request stands
status | Meaning |
|---|---|
draft | Opened, not sent. Documents can be added |
awaiting_directors | A company's request, sent and waiting for every named director to accept in MOOKHPay. If one declines, the request is declined with the reason "A director declined" |
pending | Waiting for MOOKHPay staff |
approved | Staff approved it. The business exists |
declined | Staff declined it, or a director did. decline_reason says why |
withdrawn | The seller withdrew it in MOOKHPay |
Each director carries status: invited, accepted or declined.
No webhook is sent when a request moves. Poll GET …/{request_id}; once a day is plenty while it is pending.
When it is declined
A declined request can have documents added and be sent again, as the same request_id. Its details cannot be changed through the API. Sending it again returns a company's directors to invited. If the seller has opened another request in the meantime, sending the declined one answers 409 with code 3029.
When it is approved
organisation_account_idis your platform's id for the new business account. Itsoriginiscreatedand itsexternal_referenceis therequest_id.- It has its own wallet. The seller, and for a company the directors, are its owners in MOOKHPay.
- If the seller disconnected your platform before approval, the business is still made for them, but it is not yours and
organisation_account_idstaysnull.
A business account works like a seller account, with three differences:
| Business account | |
|---|---|
| Payouts | It has no phone, so a payout needs a payout account its owners set in MOOKHPay. Without one: 422 with code 2949. See Pay out sellers |
| A company's payouts | Wait for its owners' signatures in MOOKHPay (status: "awaiting_approval") |
| Login links | Not offered: 404 with code 2943 |
Errors
| HTTP | Code | Name | When | What to do |
|---|---|---|---|---|
400 | 1701 | INVALID_REQUEST_DATA | A field breaks its rule, an unknown field, a multipart body with other fields, or a body sent to submit | Fix the request |
400 | 3034 | ORG_REQUEST_DOCUMENT_REJECTED | The file was not accepted. data.reason says why | Send one PDF, JPEG or PNG with its real content type |
400 | 3038 | PLATFORM_TERMS_REQUIRED | No terms on record for this seller and none sent | Send terms |
403 | 3037 | PLATFORM_COMPANY_ACCOUNTS_OFF | A company request from a platform not switched on for companies | Ask MOOKHPay |
404 | 3028 | ORG_REQUEST_NOT_FOUND | Unknown request, another account's or another platform's | Check the ids |
409 | 3029 | ORG_REQUEST_ALREADY_OPEN | The seller already has an open request | Wait for it to be decided, or read it |
409 | 3030 | ORG_REQUEST_USERNAME_TAKEN | The username is taken | Choose another |
409 | 3031 | ORG_REQUEST_MISSING_DOCUMENTS | Submitted with documents missing | Attach what data lists |
409 | 3032 | ORG_REQUEST_BAD_DIRECTOR | The director list does not fit. data.reason is required (a company with none), not_allowed (a sole proprietorship with some), too_many (over 20), self, duplicate, not_found or unavailable (banned, disabled or phone not confirmed), with data.username where one is to blame | Fix the list |
409 | 3033 | ORG_REQUEST_WRONG_STATE | The request cannot be changed that way now, for example a document added after it was sent | Read the request |
409 | 3035 | PLATFORM_ACCOUNT_UNCLAIMED | The seller has not claimed their account | Ask the seller to claim it |
409 | 3036 | PLATFORM_ACCOUNT_NOT_A_PERSON | {id} is a business account | Use the seller's personal account |
413 | 3034 | ORG_REQUEST_DOCUMENT_REJECTED | The file is over 10 MB | Send a smaller file |
422 | 3015 | IDEMPOTENCY_KEY_REUSED | Same key, different body | Use a new key |
503 | 3016 | PLATFORM_ACCOUNTS_UNAVAILABLE | Requests could not be read or changed right now | Retry |