> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Virtual Accounts

> GET /api/v1/merchants/get/virtual_accounts — Retrieve your active virtual accounts and their va_id values. Required to initiate payouts.

Every payout must be debited from one of your bluSwap virtual accounts. Use this endpoint to retrieve all active virtual accounts linked to your merchant profile along with their `va_id` values and current balances. You need the `va_id` of the account you want to debit when you call the initiate payout endpoint.

## Headers

**x-api-key** `string` *required*

Your secret API key.

**Content-Type** `string` *required*

Must be `application/json`.

## Sample Request

```bash Shell theme={"dark"}
curl --location --request GET 'https://api.bluswap.co/api/v1/merchants/get/virtual_accounts' \
  --header 'x-api-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json'
```

```javascript Node.js theme={"dark"}
const response = await fetch(
  'https://api.bluswap.co/api/v1/merchants/get/virtual_accounts',
  {
    headers: {
      'x-api-key': '<YOUR_API_KEY>',
      'Content-Type': 'application/json'
    }
  }
);
console.log(await response.json());
```

```python Python theme={"dark"}
import requests

response = requests.get(
    "https://api.bluswap.co/api/v1/merchants/get/virtual_accounts",
    headers={"x-api-key": "<YOUR_API_KEY>"},
)
print(response.json())
```

```java Java theme={"dark"}
var request = java.net.http.HttpRequest.newBuilder(
    java.net.URI.create("https://api.bluswap.co/api/v1/merchants/get/virtual_accounts"))
  .headers(
    "x-api-key", "<YOUR_API_KEY>",
    "Content-Type", "application/json")
  .GET()
  .build();
var response = java.net.http.HttpClient.newHttpClient()
  .send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```go Go theme={"dark"}
package main

import "net/http"

func main() {
  request, _ := http.NewRequest(
    http.MethodGet,
    "https://api.bluswap.co/api/v1/merchants/get/virtual_accounts",
    nil,
  )
  request.Header.Set("x-api-key", "<YOUR_API_KEY>")
  request.Header.Set("Content-Type", "application/json")
  response, _ := http.DefaultClient.Do(request)
  defer response.Body.Close()
}
```

```php PHP theme={"dark"}
<?php
$curl = curl_init('https://api.bluswap.co/api/v1/merchants/get/virtual_accounts');
curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    'x-api-key: <YOUR_API_KEY>',
    'Content-Type: application/json'
  ],
  CURLOPT_RETURNTRANSFER => true
]);
echo curl_exec($curl);
curl_close($curl);
```

```ruby Ruby theme={"dark"}
require "net/http"

uri = URI("https://api.bluswap.co/api/v1/merchants/get/virtual_accounts")
request = Net::HTTP::Get.new(uri, {
  "x-api-key" => "<YOUR_API_KEY>",
  "Content-Type" => "application/json"
})
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
```

## Sample Response

```json theme={"dark"}
{
  "status": "Success",
  "status_code": 200,
  "message": "Transactions fetched successfully",
  "detail": null,
  "data": {
    "virtual_accounts": [
      {
        "va_id": "XXXXXXXXXXXXXXXXXX",
        "account_number": "XXXXXXXXXXXXXX",
        "ifscCode": "XXXXXXX",
        "account_id": "XXXXXXXXXXXX",
        "va_balance": 500.0
      },
      {
        "va_id": "XXXXXXXXXXXXXXXXXX",
        "account_number": "XXXXXXXXXXXXXXXXXX",
        "ifscCode": "XXXXXXXXXXXXXXXXXX",
        "account_id": "XXXXXXXXXXXXXXXXXX",
        "va_balance": 53836.76
      }
    ],
    "total_count": 2
  }
}
```

## Response fields

**virtual\_accounts** `array`

Array of virtual account objects linked to your merchant profile.

**va\_id** `string`

Unique identifier for the virtual account. Pass this value in the `va_id` field when initiating a payout.

**account\_number** `string`

Bank account number associated with the virtual account.

**ifscCode** `string`

IFSC code of the bank branch for this virtual account.

**account\_id** `string`

Account identifier associated with this virtual account in the bluSwap system.

**va\_balance** `number`

Current available balance in the virtual account (in INR). Ensure this is sufficient before initiating a payout.

**total\_count** `integer`

Total number of virtual accounts returned.

## Find a `va_id` in the dashboard

If you prefer to look up a `va_id` manually rather than through the API, you can copy it directly from the bluSwap dashboard.

**1. Navigate to Fund Transfer → Dashboard**

Log in to your bluSwap merchant account and open the **Fund Transfer** section from the main navigation, then select **Dashboard**.

**2. View the list of available Virtual Accounts**

The dashboard displays all virtual accounts linked to your profile along with their current balances.

**3. Click the clipboard/copy icon next to the required Virtual Account**

Locate the virtual account you want to use and click the clipboard or copy icon next to it to copy its `va_id` to your clipboard.

**4. Use the copied va\_id when initiating payouts or checking balances**

Paste the copied `va_id` into the relevant field when calling the initiate payout endpoint or when checking the balance for a specific virtual account.

> [!TIP]
>
> Select the virtual account with a sufficient balance for your payout amount. Check the `va_balance` field in the API response or the balance column in the dashboard before initiating high-value transfers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.