POST
/
merchants
/
accounts
/
getAll
cURL
curl -X POST "https://api.onekhusa.com/sandbox/v1/merchants/accounts/getAll" \
  --header "Authorization: Bearer your-jwt-token" \
  --header "Content-Type: application/json" \
  --header "X-Organisation-Id: FYH0NTVW0DXK" \
  --header "X-Merchant-Account-Number: 35253486" \
  --header "Accept-Language: en" \
  -d '{
    "organisationId": "FYH0NTVW0DXK",
    "pageNumber": 1,
    "numberOfReturnedRows": 10,
    "isIncremental": false,
    "searchBy": "AccountName",
    "searchText": "John Phiri"
  }'
[
  {
    "organisationId": "FYH0NTVW0DKK",
    "accountName": "TNM MPAMBA",
    "merchantAccountNumber": 35223487,
    "disbursmentBalance": 10000000,
    "collectionBalance": 2000000,
    "accountBalance": 200000000,
    "currencyCode": "MWK",
    "statusCode": "A",
    "statusName": "Active",
    "levelName": "Initiator Only",
    "levelNumber": 1,
    "capturedBy": "OPAYMENT GATEWAY",
    "dateCreated": "2025-08-24T16:51:59.227721"
  },
  {
    "organisationId": "FYH0NTVW0DXK",
    "accountName": "ANOTHER MERCHANT",
    "merchantAccountNumber": 35253486,
    "accountBalance": 25000000,
    "collectionBalance": 15000000,
    "disbursmentBalance": 10000000,
    "currencyCode": "MWK",
    "levelNumber": 2,
    "levelName": "Initiator -> Approver",
    "statusCode": "A",
    "statusName": "Active",
    "capturedBy": "JohnDoe",
    "dateCreated": "2024-01-16T14:20:00Z"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <Token>, where <Token> is your access token.

Headers

X-Organisation-Id
string
required

The organization identifier

X-Merchant-Account-Number
string
required

The merchant account number

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
organisationId
string
required

The unique identifier of your organisation

Required string length: 12
Example:

"ORG123456789"

pageNumber
integer
required

Page number for pagination (must be ≄ 1)

Required range: x >= 1
Example:

1

numberOfReturnedRows
integer
required

Number of records per page (must be > 0)

Required range: x >= 1
Example:

10

isIncremental
boolean
default:false

Include previous pages data (default: false)

Example:

false

searchBy
enum<string>
default:AccountName

Field to search by (default: "AccountName", allowed: ["AccountName"])

Available options:
AccountName
Example:

"AccountName"

searchText
string

Search term (case-insensitive, optional)

Example:

"John Phiri"

Response

200 - application/json

Success Response (200)

organisationId
integer

Organization identifier

Example:

352534866

accountName
string

Merchant account name

Example:

"John Phiri"

merchantAccountNumber
integer

Required string length: 8

Required range: 10000000 <= x <= 99999999
Example:

35253486

accountBalance
number

Current account balance

Example:

10000

collectionBalance
number

Available collection balance

Example:

50000000

currencyCode
string

A three-letter ISO 4217 code that identifies the currency used in the transaction

Example:

"MWK"

disbursmentBalance
number

Available disbursement balance

Example:

5000

levelNumber
integer

Merchant authorization level

Example:

1

levelName
string

Human-readable level name

Example:

"Initiator Only"

statusCode
string

Account status code

Example:

"A"

statusName
string

Human-readable status name

Example:

"Active"

capturedBy
string

User who created the account

Example:

"JohnDoe"

dateCreated
string<date-time>

Account creation timestamp (ISO 8601)

Example:

"2024-01-15T10:30:00Z"