> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Balance

> Fetch Account Balances

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇺🇸 United States</span>
</div>

Use this endpoint to retrieve the balances of all accounts.

<RequestExample>
  ```bash Curl theme={null}
  curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
  -X GET https://api.razorpay.com/v1/banking_balances
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "entity": "collection",
    "count": 4,
    "items": [
      {
        "entity": "banking_balance",
        "currency": "INR",
        "account_number": "409001396356",
        "account_type": "current_account",
        "bank_name": "RBL Bank",
        "bank_code": "RATN",
        "amount": 186682638,
        "available_amount": 186682638,
        "refreshed_at": 1721889110
      },
      {
        "entity": "banking_balance",
        "currency": "INR",
        "account_number": "002281300049209",
        "account_type": "current_account",
        "bank_name": "Yes Bank",
        "bank_code": "YESB",
        "amount": 10489829,
        "available_amount": 186682638,
        "refreshed_at": 1696419847
      },
      {
        "entity": "banking_balance",
        "currency": "INR",
        "account_number": "002281300012871",
        "account_type": "fixed_deposit",
        "bank_name": "Yes Bank",
        "bank_code": "YESB",
        "amount": 10489829,
        "available_amount": 186682638,
        "refreshed_at": 1696419847
      },
      {
        "entity": "banking_balance",
        "currency": "INR",
        "account_number": "984539953520846",
        "account_type": "razorpayx_lite",
        "bank_name": null,
        "bank": null,
        "amount": 1029,
        "available_amount": 1029,
        "refreshed_at": 1729847660
      }
    ]
  }
  ```

  ```json Failure theme={null}
  {
    "error": {
      "code": "BAD_REQUEST_ERROR",
      "description": "The selected account type is invalid.",
      "source": "business",
      "step": null,
      "reason": "input_validation_failed",
      "metadata": {},
      "field": "account_type"
    }
  }
  ```
</ResponseExample>

## Query Parameters

<Warning>
  **Watch Out!**

  RazorpayX Lite is currently not available for new merchants. To set up a new RazorpayX account, refer to [Current Account](/docs/us/x/account-types/current-account).
</Warning>

<ParamField query="account_type" type="string">
  Filters account based on type. Possible values are `current_account` or `razorpayx_lite`. The parameter is case sensitive.

  * `current_account`: Current Accounts and Escrow Accounts
  * `razorpayx_lite`: RazorpayX Lite Accounts
</ParamField>

<ParamField query="bank_code" type="string">
  Filters based on bank name. This should be the first four characters of IFSC for any bank.
  For example, `RATN`or `YESB`. The parameter is case sensitive.
</ParamField>

<ParamField query="count" type="integer">
  Number of accounts to be fetched based on the most recently refreshed balance.
  This can be used for pagination, in combination with skip.

  * Default value : `10`
  * Maximum value : `100`
</ParamField>

<ParamField query="skip" type="integer">
  Numbers of balances to be skipped. This can be used for pagination, in combination with count.
  Default value is `0`.
</ParamField>

## Response Parameters

<ResponseField name="entity" type="string">
  The entity being returned. For example, `banking_balance`.
</ResponseField>

<ResponseField name="count" type="integer">
  Count of items being returned. For example `2`.
</ResponseField>

<ResponseField name="items" type="object">
  Array of all accounts and their balances.
</ResponseField>

<ResponseField name="currency" type="string">
  Returns the currency in which the balance amount is relayed. For example, `INR`.
</ResponseField>

<ResponseField name="amount" type="long">
  The total INR balance amount in paise. For example, `6358629`.
</ResponseField>

<ResponseField name="account_number" type="string">
  Associated account number. For example, `123456789281`.
</ResponseField>

<ResponseField name="account_type" type="string">
  Returns associated account type. For example, `current_account`.
</ResponseField>

<ResponseField name="bank_name" type="string">
  Returns the full name of the bank.
  For example `YESB`.
</ResponseField>

<ResponseField name="bank_code" type="string">
  Returns bank code. This will be the first four characters of IFSC for any bank.
  For example `YESB`.
</ResponseField>

<ResponseField name="refreshed_at" type="long">
  The latest timestamp of Razorpay fetching balance from the bank in epoch format. For example `1729847660`.
</ResponseField>

<ResponseField name="available_amount" type="long">
  The net withdrawable INR balance amount in paise. This will deduct any lien balance and include any OD balance on the account. For example, `6358629`.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion title="`The selected account type is invalid`">
    **Code:** `400`

    Query parameter `account_type` is incorrectly passed.

    **Solution:** Enter the `account_type` as `current_account` or `razorpayx_lite` only. The query parameter is case sensitive.
  </Accordion>

  <Accordion title="`Invalid channel name: rbl`">
    **Code:** `400`

    Query parameter `bank_code` is incorrectly passed.

    **Solution:** Enter the `bank_code` in the correct format. This should be the first four characters of IFSC for any bank, and is case sensitive.
  </Accordion>

  <Accordion title="`The count may not be greater than 100`">
    **Code:** `400`

    The `count` passed in the query parameter is greater than 100.

    **Solution:** The maximum value that can be passed here is `100`.
  </Accordion>

  <Accordion title="`The count must be an integer`">
    **Code:** `400`

    The `count` passed in the query parameter is not an integer

    **Solution:** Enter only integer values.
  </Accordion>

  <Accordion title="`Authentication failed`">
    **Code:** `401`

    Incorrect Key or Secret.

    **Solution:** Enter the correct Key and Secret as per the request body.
  </Accordion>

  <Accordion title="`Throttling Error`">
    **Code:** `429`

    The server is processing too many requests at once and is unable to process your request.

    **Solution:** Retry the request after some time.
  </Accordion>

  <Accordion title="`We are facing some trouble completing your request at the moment. Please try again shortly.`">
    **Code:** `500`

    Internal Server Error. The server has encountered a situation it does not know how to handle.

    **Solution:** Retry the request after some time.
  </Accordion>

  <Accordion title="`Bad Gateway`">
    **Code:** `502`

    The server got an invalid response while working as a gateway to get a response needed to handle the request.

    **Solution:** Retry the request after some time.
  </Accordion>

  <Accordion title="`Service Unavailable`">
    **Code:** `503`

    The server is not ready to handle the request. Common causes are a server that is down for maintenance or is overloaded.

    **Solution:** Retry the request after some time.
  </Accordion>

  <Accordion title="`Gateway Timeout`">
    **Code:** `504`

    This error response is given when the server acts as a gateway and cannot get a timely response.

    **Solution:** Retry the request after some time.
  </Accordion>
</AccordionGroup>
