m2pfintech
API LibraryWallet Management

Fetch Wallet Balance

Retrieves the current wallet balance for a given kit and wallet type. Returns both the confirmed offline wallet balance and the staged offline wallet balance. The staged balance represents transactions that have been initiated but not yet fully confirmed.

POST
/wallet/fetch/balance

Authorization

tenantAuth
tenant<token>

The DCMS tenant name for multi-tenant isolation. Every API call must include this header to identify the client organization.

In: header

Header Parameters

tenant*string

The DCMS client or tenant name for multi-tenant isolation.

Request Body

application/json

kitNo*string

Unique kit number identifying the card whose wallet balance is being queried.

entityId*string

Customer entity identifier who owns the wallet.

walletType*string

Type of wallet to query. Currently supports NCMC wallet type.

Value in"NCMC"

Response Body

application/json

application/json

curl -X POST "https://api.dcms.example.com/v1/wallet/fetch/balance" \  -H "tenant: ACME_BANK" \  -H "Content-Type: application/json" \  -d '{    "kitNo": "4241220463",    "entityId": "828826",    "walletType": "NCMC"  }'
{
  "result": {
    "entityId": "878826",
    "kitNo": "4240220463",
    "offlineStagedWalletBalance": "500.00",
    "offlineWalletBalance": "250.00",
    "walletType": "NCMC"
  },
  "exception": null,
  "pagination": null
}
{
  "result": null,
  "exception": {
    "errorCode": "MCC007",
    "shortMessage": "valid kit not found",
    "detailMessage": "No valid kit found for the given kit number and entity ID",
    "httpStatus": "BAD_REQUEST",
    "fieldError": [
      "Invalid Kit No"
    ],
    "languageCode": "en"
  },
  "pagination": null
}