m2pfintech

Check Wallet Balance

Retrieves the current available balance for a specific wallet. For multi-currency cards (e.g., forex cards), you can check the balance of each currency wallet individually.

Response Details

The balance response includes:

  • Available Balance: The amount currently available for transactions
  • Wallet Currency: The currency of the wallet (INR, USD, EUR, etc.)
  • Wallet Status: Current status of the wallet

When to Use

  • Pre-Transaction Check: Verify sufficient balance before initiating a debit/transfer
  • Balance Display: Show real-time balance in your app/portal
  • Reconciliation: Compare balances for accounting and reconciliation purposes
POST
/v1/wallets/balance

Authorization

bearerAuth tenantId
AuthorizationBearer <token>

JWT Bearer token from the Authentication API

In: header

X-TENANT-ID<token>

Your unique tenant identifier assigned during onboarding

In: header

Header Parameters

X-TENANT-ID*string

Your unique tenant identifier assigned during partner onboarding

Request Body

application/json

Wallet identification details

mobile?

Cardholder's registered mobile number. Optional — used for additional validation.

entityId*string

Required. Unique entity identifier for the cardholder.

Length1 <= length
accountId?string

Wallet/account ID to check balance for. If not provided, returns the balance of the primary wallet. For multi-currency cards, specify the account ID of the specific currency wallet.

Response Body

application/json

application/json

application/json

curl -X POST "https://sandbox-api.m2pprepaid.com/prepaid/customer/v1/wallets/balance" \  -H "X-TENANT-ID: ACME_CORP" \  -H "Content-Type: application/json" \  -d '{    "entityId": "798782647420001622070825",    "accountId": "17556437212850072"  }'

{
  "result": {
    "accountId": "17556437212850072",
    "entityId": "798782647420001622070825",
    "balance": 15250.75,
    "currency": "INR",
    "status": "ACTIVE"
  },
  "pagination": null
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Bad Request",
  "status": 400,
  "detail": "entityId: must not be empty",
  "message": "error.http.400"
}

{
  "type": "https://www.m2pfintech.com/problem/problem-with-message",
  "title": "Customer does not exist",
  "status": 409,
  "detail": "Customer does not exist for id: 798782647420001622070825",
  "message": "error.business",
  "businessCode": "PPCUST_002"
}