API Test Keys
Fetch Account Balances
GET
/v2/balances
Click to copy
Use this endpoint to retrieve the balances of all accounts.
Is this page helpful?
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v2/balances
Success
Failure
1{2"entity": "collection",3"count": 3,4"items": [5{6"id": "Mk7LxMSn3OEJIR",7"currency": "INR",8"balance": 6358629,9"account_number": "XXXXXXXXXXX2871",10"account_type": "direct",11"bank": "yesbank",12"last_refreshed": 1736492320,13"entity": "balance",14"available_balance": 635862915},16{17"id": "D4gfEfFS1vkVTU",18"currency": "INR",19"balance": 191671838,20"account_number": "XXXXXXXX9472",21"account_type": "direct",22"bank": "rbl",23"last_refreshed": 1736318011,24"entity": "balance",25"available_balance": 19167183826},27{28"id": "D4axUawwmlcyqd",29"currency": "INR",30"balance": 10797225,31"account_number": "XXXXXXXXXXXX2549",32"account_type": "shared",33"bank": null,34"last_refreshed": 1736492554,35"entity": "balance",36"available_balance": 1079722537}38]39}
Query Parameters
account_type
string
Filters account based on type. Possible values are direct
or shared
. The parameter is case sensitive.
direct
: Current Accounts and Escrow Accountsshared
: RazorpayX Lite Accounts
bank
string
Your bank name. For example, yesbank
. The parameter is case sensitive.
count
integer
Number of balances to be fetched. This can be used for pagination, in combination with skip.
- Default value :
10
- Maximum value :
100
skip
integer
Numbers of balances to be skipped. This can be used for pagination, in combination with count.
Default value is 0
.
Response Parameters
entity
string
The entity being returned.
items
object
Array of all accounts and their balances.
id
string
Returns the unique identifier for the bank account. For example, D4axUawwmlcyqd
.
currency
string
Returns the currency in which the balance amount is relayed. For example, INR
.
balance
long
The total INR balance amount in paise. For example, 6358629
.
account_number
string
Associated account number in masked format. For example, XXXXXXXXX2871
.
account_type
string
Returns ssociated account type. Possible outcomes are direct
or shared
.
direct
: Current Accounts and Escrow Accountsshared
: RazorpayX Lite Accounts
bank
string
Returns account bank name. For example rbl
.
last_refreshed
long
The latest timestamp of Razorpay fetching balance from the bank in epoch format. For example 1729847660
.
available_balance
long
The total withdrawable INR balance amount in paise. For example, 6358629
.
Errors
The selected account type is invalid
Error Status: 400
Query parameter account_type
is incorrectly passed.
Solution
Invalid channel name: rbl
Error Status: 400
Query parameter bank
is incorrectly passed.
Solution
The count may not be greater than 100
Error Status: 400
The count
passed in the query parameter is greater than 100.
Solution
The count must be an integer
Error Status: 400
The count
passed in the query parameter is not an integer
Solution
Authentication failed
Error Status: 401
Incorrect Key or Secret.
Solution
Throttling Error
Error Status: 429
The server is processing too many requests at once and is unable to process your request.
Solution
Internal Server Error
Error Status: 500
The server has encountered a situation it does not know how to handle.
Solution
Bad Gateway
Error Status: 502
The server got an invalid response while working as a gateway to get a response needed to handle the request.
Solution
Service Unavailable
Error Status: 503
The server is not ready to handle the request. Common causes are a server that is down for maintenance or is overloaded.
Solution
Gateway Timeout
Error Status: 504
This error response is given when the server acts as a gateway and cannot get a timely response.
Solution
Fetch Account Balances
GET
/v2/balances
Click to copy
Use this endpoint to retrieve the balances of all accounts.
Is this page helpful?
Query Parameters
account_type
string
Filters account based on type. Possible values are direct
or shared
. The parameter is case sensitive.
direct
: Current Accounts and Escrow Accountsshared
: RazorpayX Lite Accounts
bank
string
Your bank name. For example, yesbank
. The parameter is case sensitive.
count
integer
Number of balances to be fetched. This can be used for pagination, in combination with skip.
- Default value :
10
- Maximum value :
100
skip
integer
Numbers of balances to be skipped. This can be used for pagination, in combination with count.
Default value is 0
.
Response Parameters
entity
string
The entity being returned.
items
object
Array of all accounts and their balances.
id
string
Returns the unique identifier for the bank account. For example, D4axUawwmlcyqd
.
currency
string
Returns the currency in which the balance amount is relayed. For example, INR
.
balance
long
The total INR balance amount in paise. For example, 6358629
.
account_number
string
Associated account number in masked format. For example, XXXXXXXXX2871
.
account_type
string
Returns ssociated account type. Possible outcomes are direct
or shared
.
direct
: Current Accounts and Escrow Accountsshared
: RazorpayX Lite Accounts
bank
string
Returns account bank name. For example rbl
.
last_refreshed
long
The latest timestamp of Razorpay fetching balance from the bank in epoch format. For example 1729847660
.
available_balance
long
The total withdrawable INR balance amount in paise. For example, 6358629
.
Errors
The selected account type is invalid
Error Status: 400
Query parameter account_type
is incorrectly passed.
Solution
Invalid channel name: rbl
Error Status: 400
Query parameter bank
is incorrectly passed.
Solution
The count may not be greater than 100
Error Status: 400
The count
passed in the query parameter is greater than 100.
Solution
The count must be an integer
Error Status: 400
The count
passed in the query parameter is not an integer
Solution
Authentication failed
Error Status: 401
Incorrect Key or Secret.
Solution
Throttling Error
Error Status: 429
The server is processing too many requests at once and is unable to process your request.
Solution
Internal Server Error
Error Status: 500
The server has encountered a situation it does not know how to handle.
Solution
Bad Gateway
Error Status: 502
The server got an invalid response while working as a gateway to get a response needed to handle the request.
Solution
Service Unavailable
Error Status: 503
The server is not ready to handle the request. Common causes are a server that is down for maintenance or is overloaded.
Solution
Gateway Timeout
Error Status: 504
This error response is given when the server acts as a gateway and cannot get a timely response.
Solution
Curl
1curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \2-X GET https://api.razorpay.com/v2/balances
Success
Failure
1{2"entity": "collection",3"count": 3,4"items": [5{6"id": "Mk7LxMSn3OEJIR",7"currency": "INR",8"balance": 6358629,9"account_number": "XXXXXXXXXXX2871",10"account_type": "direct",11"bank": "yesbank",12"last_refreshed": 1736492320,13"entity": "balance",14"available_balance": 635862915},16{17"id": "D4gfEfFS1vkVTU",18"currency": "INR",19"balance": 191671838,20"account_number": "XXXXXXXX9472",21"account_type": "direct",22"bank": "rbl",23"last_refreshed": 1736318011,24"entity": "balance",25"available_balance": 19167183826},27{28"id": "D4axUawwmlcyqd",29"currency": "INR",30"balance": 10797225,31"account_number": "XXXXXXXXXXXX2549",32"account_type": "shared",33"bank": null,34"last_refreshed": 1736492554,35"entity": "balance",36"available_balance": 1079722537}38]39}