---
page_source: https://docs.juspay.io/upi-inapp/flutter/headless-process-payloads/check-balance
page_title: Check Balance
---


## Check Balance



This operation will provide the merchant to check balance of a account.


###   Process Parameters



## Request Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK.
      - Value: upiCheckBalance
      - Tags: String, Mandatory
    - **UpiRequestId**:
      - Description: Unique identifier (uuid) for the request sent to NPCI
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: Unique Identifier for the account whose balance is to be checked.
      - Tags: String, Mandatory
    - **UdfParameters**:
      - Description: Stringified json for udf parameters
      - Tags: String, Optional
  - Tags: JSON, Mandatory


## Response Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String
- **Payload**:
  - Description: Response Parameters
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK.
      - Value: upiCheckBalance
      - Tags: String, Mandatory
    - **BankAccountUniqueId**:
      - Description: Unique Identifier for bank account across banks
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: Unique Identifier for the account whose balance is to be checked.
      - Tags: String, Mandatory
    - **BankCode**:
      - Description: IIN Code for the bank
      - Tags: String, Mandatory
    - **CustomerMobileNumber**:
      - Description: masked phone number of the customer
      - Value: <Customer mobile number>
      - Tags: String, Mandatory
    - **MaskedAccountNumber**:
      - Description: Account Number with last few digits visible
      - Tags: String, Mandatory
    - **Status**:
      - Description: If upiCheckBalance call was success or failure
      - Value: SUCCESS / FAILURE
      - Tags: String, Mandatory
    - **GatewayResponseCode**:
      - Description: Response Code received from NPCI
      - Tags: String, Mandatory
    - **GatewayResponseMessage**:
      - Description: Response Message received from NPCI
      - Tags: String, Mandatory
    - **Balance**:
      - Description: Account Balance
      - Tags: String, Optional
    - **AvailableBalance**:
      - Tags: String, Optional
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String, Optional
  - Tags: JSON
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String





#### Code Snippets: -

#### Java Code Snippet:

```java
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiCheckBalance",
    "upiRequestId": "<UPI Request Id>",
    "accountReferenceId": "<Account Reference Id>"
  }
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiCheckBalance",
    "upiRequestId": "<UPI Request Id>",
    "accountReferenceId": "<Account Reference Id>"
  }
}
```


## Sample Code Snippets:
### Request snippets:

#### Request Code Snippet:

```request
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiCheckBalance",
    "upiRequestId": "<UPI Request Id>",
    "accountReferenceId": "<Account Reference Id>"
  }
}
```

### Response snippets:

#### Response:
```plaintext
{
  "requestId": "<request id passed>",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiCheckBalance",
    "status": "SUCCESS" / "FAILURE",
    "accountReferenceId": "<accountReferenceId>",
    "bankAccountUniqueId": "<bankAccountUniqueId>",
    "bankCode": "11111",
    "customerMobileNumber": "XXXX7890",
    "maskedAccountNumber": "XXXX1234",
    "gatewayResponseCode": "<gatewayResponseCode>",
    "gatewayResponseMessage": "<gatewayResponseMessage>",
    "balance": "<balance>",
    "otherInfo": "{}"
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false
}
```

