Payouts
Fetch Virtual Account Balance
Query the current balance of a virtual account. Pass va_id to get VA balance, wallet balance, account number, and IFSC code in a single response.
Fetch Virtual Account Balance
curl --request GET \
--url https://api.bluswap.co/api/v1/merchants/get/account_getbalance \
--header 'Content-Type: <content-type>' \
--header 'X-Real-IP: <x-real-ip>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.bluswap.co/api/v1/merchants/get/account_getbalance"
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>",
"X-Real-IP": "<x-real-ip>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-api-key': '<api-key>',
'Content-Type': '<content-type>',
'X-Real-IP': '<x-real-ip>'
}
};
fetch('https://api.bluswap.co/api/v1/merchants/get/account_getbalance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bluswap.co/api/v1/merchants/get/account_getbalance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Real-IP: <x-real-ip>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bluswap.co/api/v1/merchants/get/account_getbalance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Real-IP", "<x-real-ip>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bluswap.co/api/v1/merchants/get/account_getbalance")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.header("X-Real-IP", "<x-real-ip>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bluswap.co/api/v1/merchants/get/account_getbalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request["X-Real-IP"] = '<x-real-ip>'
response = http.request(request)
puts response.read_body{
"account_number": "<string>",
"ifscCode": "<string>",
"va_balance": 123,
"wallet_balance": 123,
"old_data": true,
"updated_at": "<string>"
}Use this endpoint to retrieve the current balance of a virtual account. Pass the
va_id of the account you want to query and bluSwap returns the latest VA balance, wallet balance, and the timestamp of the last update.
Headers
string
required
Your secret API key.
string
required
Must be
application/json.string
required
Your whitelisted server IP address.
Query Parameters
string
required
Virtual account ID of the particular account whose balance you want to retrieve.
Sample Request
curl --location --request GET 'https://api.bluswap.co/api/v1/merchants/get/account_getbalance?va_id=YOUR_VA_ID' \
--header 'x-api-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--header 'X-Real-IP: YOUR_WHITELISTED_IP'
const response = await fetch(
'https://api.bluswap.co/api/v1/merchants/get/account_getbalance?va_id=YOUR_VA_ID',
{ headers: { 'x-api-key': '<YOUR_API_KEY>', 'Content-Type': 'application/json', 'X-Real-IP': '<YOUR_WHITELISTED_IP>' } }
);
console.log(await response.json());
import requests
response = requests.get(
"https://api.bluswap.co/api/v1/merchants/get/account_getbalance",
params={"va_id": "YOUR_VA_ID"},
headers={"x-api-key": "<YOUR_API_KEY>", "X-Real-IP": "<YOUR_WHITELISTED_IP>"},
)
print(response.json())
var request = java.net.http.HttpRequest.newBuilder(java.net.URI.create("https://api.bluswap.co/api/v1/merchants/get/account_getbalance?va_id=YOUR_VA_ID")).headers("x-api-key", "<YOUR_API_KEY>", "Content-Type", "application/json", "X-Real-IP", "<YOUR_WHITELISTED_IP>").GET().build();
var response = java.net.http.HttpClient.newHttpClient().send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
package main
import "net/http"
func main() {
request, _ := http.NewRequest(http.MethodGet, "https://api.bluswap.co/api/v1/merchants/get/account_getbalance?va_id=YOUR_VA_ID", nil)
request.Header.Set("x-api-key", "<YOUR_API_KEY>")
request.Header.Set("Content-Type", "application/json")
request.Header.Set("X-Real-IP", "<YOUR_WHITELISTED_IP>")
response, _ := http.DefaultClient.Do(request)
defer response.Body.Close()
}
<?php
$curl = curl_init('https://api.bluswap.co/api/v1/merchants/get/account_getbalance?va_id=YOUR_VA_ID');
curl_setopt_array($curl, [CURLOPT_HTTPHEADER => ['x-api-key: <YOUR_API_KEY>', 'Content-Type: application/json', 'X-Real-IP: <YOUR_WHITELISTED_IP>'], CURLOPT_RETURNTRANSFER => true]);
echo curl_exec($curl);
curl_close($curl);
require "net/http"
uri = URI("https://api.bluswap.co/api/v1/merchants/get/account_getbalance?va_id=YOUR_VA_ID")
request = Net::HTTP::Get.new(uri, {"x-api-key" => "<YOUR_API_KEY>", "Content-Type" => "application/json", "X-Real-IP" => "<YOUR_WHITELISTED_IP>"})
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
Sample Response
{
"status": "Success",
"status_code": 200,
"message": "Fetched Virtual account balance",
"detail": null,
"data": {
"account_number": "xxxxxxxxxxxx",
"ifscCode": "XXXX02202958",
"va_balance": 72255.56,
"wallet_balance": 11745.93,
"old_data": false,
"updated_at": "2026-01-12T13:08:19.453951"
}
}
Response Fields
string
The virtual account number associated with the queried
va_id.string
IFSC code of the virtual account’s bank branch.
number
Current balance held in the virtual account, in INR.
number
Current balance held in the wallet associated with the account, in INR.
boolean
Indicates whether the returned balance data may be stale. If
true, the figures may not reflect the most recent transactions.string
ISO 8601 timestamp of the last balance update (e.g.,
2026-01-12T13:08:19.453951).⌘I
Fetch Virtual Account Balance
curl --request GET \
--url https://api.bluswap.co/api/v1/merchants/get/account_getbalance \
--header 'Content-Type: <content-type>' \
--header 'X-Real-IP: <x-real-ip>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.bluswap.co/api/v1/merchants/get/account_getbalance"
headers = {
"x-api-key": "<api-key>",
"Content-Type": "<content-type>",
"X-Real-IP": "<x-real-ip>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-api-key': '<api-key>',
'Content-Type': '<content-type>',
'X-Real-IP': '<x-real-ip>'
}
};
fetch('https://api.bluswap.co/api/v1/merchants/get/account_getbalance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bluswap.co/api/v1/merchants/get/account_getbalance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"X-Real-IP: <x-real-ip>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bluswap.co/api/v1/merchants/get/account_getbalance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("X-Real-IP", "<x-real-ip>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bluswap.co/api/v1/merchants/get/account_getbalance")
.header("x-api-key", "<api-key>")
.header("Content-Type", "<content-type>")
.header("X-Real-IP", "<x-real-ip>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bluswap.co/api/v1/merchants/get/account_getbalance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = '<content-type>'
request["X-Real-IP"] = '<x-real-ip>'
response = http.request(request)
puts response.read_body{
"account_number": "<string>",
"ifscCode": "<string>",
"va_balance": 123,
"wallet_balance": 123,
"old_data": true,
"updated_at": "<string>"
}