Get Member Wallet Balance
This API enables third-party systems or apps to retrieve wallet balance information for a parent merchant or its associated child members via CellPay.
Get Member Wallet Balance
Endpoint:
{{base-url}}/check-wallet-balance
Method: POST
Request Headers
The following HTTP headers are required when calling the API:
--header 'Cellpay-Access-Token: eyJhbGciOiJIUzI1NiJ9......' \
--header 'Content-Type: application/json' \
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | String | Optional* | Child/member username |
| * | If field is empty, the API returns the logged-in member wallet balance |
Parent retrieves child wallet balance
Request Example
{
"username": "57******27"
}
Response Example
{
"status": true,
"sessionExpired": false,
"payload": {
"memberWalletBalanceDetails": {
"memberId": "35****",
"memberName": "CELLPAY MULTIPURPOSE COOPERATIVE LIMITED",
"mobileNumber": "57******27",
"walletBalance": 0.00
}
}
}
Expected Result
- Wallet balance details are returned successfully
- Parent account is authorized to access the child account
- HTTP Status:
200 OK
Logged-in merchant retrieves own wallet balance
Request Example
{
"username": ""
}
Response Example
{
"status": true,
"sessionExpired": false,
"payload": {
"memberWalletBalanceDetails": {
"memberId": "69***",
"memberName": "CELLPAY API Merchant",
"mobileNumber": "12******32",
"walletBalance": 24189.00
}
}
}
Expected Result
- Logged-in merchant wallet balance is returned
- Empty request body defaults to authenticated merchant account
- HTTP Status:
200 OK
Parent attempts to access another parent’s child account
Request Example
{
"username": "73******61"
}
Response Example
{
"status": false,
"sessionExpired": false,
"errors": [
{
"shortMessage": "CELLPAY API Merchant is not parent of 73******61",
"longMessage": "CELLPAY API Merchant is not parent of 73******61"
}
],
"statusCode": "Failed"
}
Expected Result
- Access denied
- Requested child account does not belong to the authenticated parent
- HTTP Status:
400 Bad Request
Parent username is valid but child account does not exist
Request Example
{
"username": "98******41"
}
Response Example
{
"status": false,
"sessionExpired": false,
"errors": [
{
"shortMessage": "12******32 is not registered as parent.",
"longMessage": "12******32 is not registered as parent."
}
],
"statusCode": "Failed"
}
Expected Result
- Child/member account is not found
- Internal server error is returned
- HTTP Status:
500 Internal Server Error
Invalid parentUsername provided
Request Example
{
"username": "57******27"
}
Response Example
{
"status": false,
"sessionExpired": false,
"errors": [
{
"shortMessage": "57******27 is not registered as member.",
"longMessage": "57******27 is not registered as member."
}
],
"statusCode": "Failed"
}
Expected Result
- Invalid parent username provided
- Internal server error is returned
- HTTP Status:
500 Internal Server Error