Skip to content

List transfers ​

Lists the pay-ins your platform made into one account's pocket, newest first, a page at a time. Pay-ins that failed after they were recorded (3060) and pay-ins still processing are listed too.

Use it to rebuild your records for one person, or to find pay-ins left processing after a timeout. For the pocket's whole history, including what the person moved or spent themselves, use List an account's transactions.

Endpoint ​

GET /v1/payments/merchant/accounts/{id}/transfers
AuthSecret key
Scopetransfers:write or accounts:read (either one)
PlatformYour organisation must be switched on as a platform, and the call must come from an allowed address if MOOKHPay set a list
Switched onWhere pockets are available: Kenya. Elsewhere the route answers 404

Headers ​

HeaderRequiredValue
AuthorizationYesBearer mkp_…

Parameters ​

Path

NameTypeRequiredConstraints
idstringYesOne of your account ids

Query. Unknown parameters are refused with 400 and code 1701.

NameTypeRequiredConstraints
limitstring of digitsNo1 to 100, default 20
starting_afterstringNoThe last transfer_id of the page before. One that is not a pay-in into this account is 400 and code 3012

Example request ​

sh
curl -G https://payments-ke-staging.mookhpay.co/v1/payments/merchant/accounts/acct_ke_9c2f41b07e5d38a6c1f0b294/transfers \
  --data-urlencode "limit=50" \
  -H "Authorization: Bearer $MOOKHPAY_SECRET_KEY"
js
const BASE = "https://payments-ke-staging.mookhpay.co/v1/payments/merchant";
const account = "acct_ke_9c2f41b07e5d38a6c1f0b294";

const transfers = [];
let startingAfter = null;
for (;;) {
  const query = new URLSearchParams({ limit: "100" });
  if (startingAfter) query.set("starting_after", startingAfter);
  const res = await fetch(`${BASE}/accounts/${account}/transfers?${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}`);
  transfers.push(...answer.data.transfers);
  if (!answer.data.has_more) break;
  startingAfter = answer.data.transfers.at(-1).transfer_id;
}
const stuck = transfers.filter((t) => t.status === "processing");
console.log(transfers.length, "pay-ins,", stuck.length, "to resend");

Response ​

200 OK with description Transfers.

json
{
  "ok": true,
  "description": "Transfers",
  "data": {
    "transfers": [
      {
        "transfer_id": "tr_ke_5a0c2e9b7d1f43a8b6e2c917",
        "account": "acct_ke_9c2f41b07e5d38a6c1f0b294",
        "pocket": { "slug": "kazi" },
        "amount": 150000,
        "currency": "KES",
        "status": "succeeded",
        "remarks": "Payment for the Safari Lager campaign",
        "external_reference": "job-7731",
        "created_at": "2026-11-25T08:14:31.000Z"
      },
      {
        "transfer_id": "tr_ke_0e7b4c1a9d2f58e3b6a0c741",
        "account": "acct_ke_9c2f41b07e5d38a6c1f0b294",
        "pocket": { "slug": "kazi" },
        "amount": 80000,
        "currency": "KES",
        "status": "failed",
        "remarks": null,
        "external_reference": "job-7690",
        "created_at": "2026-11-24T16:02:10.000Z"
      }
    ],
    "has_more": false
  }
}

Response fields ​

FieldTypeMeaning
transfersarrayUp to limit transfer objects, newest first
has_morebooleantrue when there are older pay-ins. Pass the last transfer_id as starting_after for the next page

Errors ​

HTTPCodeNameWhenWhat to do
4001701INVALID_REQUEST_DATAlimit outside 1 to 100, or an unknown parameterFix the query
4003012PLATFORM_CURSOR_INVALIDstarting_after is not a pay-in into this account. data.error is PLATFORM_CURSOR_INVALIDStart again without it
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 has neither transfers:write nor accounts:readIssue a key with one of them
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 or malformedCheck the id
4093061PLATFORM_ACCOUNT_DISCONNECTEDThe person disconnected your platform in MOOKHPayRead your own records of what you paid in
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 account could not be readRetry

Rate limit ​

120 requests a minute per platform, shared with every other account route. 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.