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

# Fetch All Customer Identifiers With TPV

> Fetch all Customer Identifiers using the Razorpay Curlec **Smart Collect TPV** API.

Available in
🇮🇳 India
🇲🇾 Malaysia
🇸🇬 Singapore
🇺🇸 United States

Use this endpoint to fetch the details of all Customer Identifiers.

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

```java Java theme={null}
RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

JSONObject params = new JSONObject();
params.put("count","1");

List<VirtualAccount> virtualaccount = instance.virtualAccounts.fetchAll(params);
```

```python Python theme={null}
import razorpay
client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

client.virtual_account.all(options)
```

```php PHP theme={null}
$api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET');

$api->virtualAccount->all($options);
```

```ruby Ruby theme={null}
require "razorpay"
Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

options = {"count":1}

Razorpay::VirtualAccount.all(options)
```

```javascript Node.js theme={null}
var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

instance.virtualAccounts.all(options)
```

```go Go theme={null}
import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

data:= map[string]interface{}{
    "count" : 1,
}

body, err := client.VirtualAccount.All(data, nil)
```

```csharp .NET theme={null}
RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]

Dictionary<string, object> param = new Dictionary<string, object>();
param.Add("count","1");

List<VirtualAccount> virtualaccount = client.VirtualAccount.All(param);
```

```bash CLI theme={null}
razorpay smart-collect list \
  --count 25 \
  --skip 0 \
  --from 1609459200 \
  --to 1612137600
```

```json Success theme={null}
{
  "entity": "collection",
  "count": 2,
  "items": [
    {
      "id": "va_Di5gbNptcWV8fQ",
      "name": "Acme Corp",
      "entity": "virtual_account",
      "status": "closed",
      "description": "Customer Identifier created for M/S ABC Exports",
      "amount_expected": 2300,
      "notes": {
        "material": "teakwood"
      },
      "amount_paid": 239000,
      "customer_id": "cust_DOMUFFiGdCaCUJ",
      "receivers": [
        {
          "id": "ba_Di5gbQsGn0QSz3",
          "entity": "bank_account",
          "ifsc": "RATN0VAAPIS",
          "bank_name": "RBL Bank",
          "name": "Acme Corp",
          "notes": [],
          "account_number": "1112220061746877"
        }
      ],
      "allowed_payers": [
        {
          "type": "bank_account",
          "id":"ba_DlGmm9mSj8fjRM",
          "bank_account": {
            "ifsc": "UTIB0000013",
            "account_number": "914010012345679"
          }
        },
        {
          "type": "bank_account",
          "id":"ba_Cmtnm5tSj6agUW",
          "bank_account": {
            "ifsc": "UTIB0000014",
            "account_number": "914010012345680"
          }
        }
      ],
      "close_by": 1574427237,
      "closed_at": 1574164078,
      "created_at": 1574143517
    },
    {
      "id": "va_Dho86Avmdw6h09",
      "name": "Acme Corp",
      "entity": "virtual_account",
      "status": "active",
      "description": "Customer Identifier created for Raftar Soft",
      "amount_expected": null,
      "notes": {
        "material": "oakwood"
      },
      "amount_paid": 0,
      "customer_id": "cust_DOMUFFiGdCaDNK",
      "receivers": [
        {
          "id": "ba_Dho86DoV16LqiO",
          "entity": "bank_account",
          "ifsc": "RATN0VAAPIS",
          "bank_name": "RBL Bank",
          "name": "Acme Corp",
          "notes": [],
          "account_number": "1112220046254840"
        }
      ],
      "allowed_payers": [
        {
          "type": "bank_account",
          "id":"ba_DlGmm9mSj8fjRM",
          "bank_account": {
            "ifsc": "UTIB0000013",
            "account_number": "914010012345679"
          }
        },
        {
          "type": "bank_account",
          "id":"ba_Cmtnm5tSj6agUW",
          "bank_account": {
            "ifsc": "UTIB0000014",
            "account_number": "914010012345680"
          }
        }
      ],
      "close_by": 1574427237,
      "closed_at": null,
      "created_at": 1574081690
    }
  ]
}
```

```json Failure theme={null}
{
  "error": {
    "code": "BAD_REQUEST_ERROR",
    "description": "The api key provided is invalid",
    "source": "NA",
    "step": "NA",
    "reason": "NA",
    "metadata": {}
  }
}
```

## Query Parameters

**from** `integer`

Timestamp, in seconds, from when Customer Identifiers are to be fetched.

**to** `integer`

Timestamp, in seconds, till when Customer Identifiers are to be fetched.

**count** `integer`

Number of Customer Identifiers to be fetched. The default value is 10 and the maximum value is 100. This can be used for pagination, in combination with `skip`.

**skip** `integer`

Number of records to be skipped while fetching the Customer Identifiers. This can be used for pagination, in combination with `count`.

## Response Parameters

**id** `string`

The unique identifier of the Customer Identifier.

**name** `string`

The `merchant billing label` as it appears on the Dashboard.

**entity** `string`

Indicates the type of entity. Here, it is `virtual account`.

**status** `string`

Indicates whether the Customer Identifier is in `active` or `closed` state.

**description** `string`

A brief description about the Customer Identifier.

**amount\_expected** `integer`

The amount expected by the merchant.

**amount\_paid** `integer`

The amount paid by the customer into the Customer Identifier.

**notes** `json object`

Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://razorpay.com/docs/my/api/understand.md#notes) to know more.

**customer\_id** `string`

Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](https://razorpay.com/docs/my/api/customers.md) section to know more.

**receivers** `json object`

Configuration of desired receivers for the Customer Identifier.

**id** `string`

The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3`

**entity** `string`

Name of the entity. Possible value is `bank_account`.

**ifsc** `string`

The IFSC for the Customer Identifier created. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`.

**bank\_name** `string`

The bank associated with the Customer Identifier. For example, `RAZR0000001`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`.

**account\_number** `string`

The unique account number provided by the bank. For example, `1112220061746877`. This parameter appears in the response only when `bank_account` is passed as the receiver `type`.

**name** `string`

The `merchant billing label` as it appears on the Dashboard. This parameter appears in the response only when `bank_account` is passed as the receiver `type`.

**notes** `json object`

Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](https://razorpay.com/docs/my/api/understand.md#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`.

**allowed\_payers** `array`

Details of customer bank accounts which will be allowed to make payments to your Customer Identifier. The parent parameter under which the customer bank account details must be passed as child parameters. You can add account details of 10 allowed payers for a Customer Identifier. For more details, refer to the Third Party Validation section.

**type** `string`

The type of account through which the customer will make the payment. Possible value is `bank_account`.

**id** `string`

The unique identifier of the `allowed_payers` account.

**bank\_account** `object`

Indicates the bank account details such as `ifsc` and `account_number`.

**ifsc** `string`

The IFSC associated with the bank account through which the customer is expected to make the payment.

**account\_number** `string`

The bank account number through which the customer is expected to make the payment.

**close\_by** `integer`

UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail.

**closed\_at** `integer`

UNIX timestamp at which the Customer Identifier is automatically closed.

**created\_at** `integer`

UNIX timestamp at which the Customer Identifier was created.

## Errors

> [accordion] The API `\<key/secret\>
> ` provided is invalid.
>
> **Code:** `4xx`
>
> Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard.
>
> **Solution:** Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys.
