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

# Fetch a Customer Identifier Using id With TPV

> Fetch a Customer Identifier by id using the Razorpay Smart Collect TPV API.

Use this endpoint to fetch a Customer Identifier using id.

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

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

  String virtualId = "va_4xbQrmEoA5WJ0G";

  VirtualAccount virtualaccount = instance.virtualAccounts.fetch(virtualId);
  ```

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

  client.virtual_account.fetch(virtualId)
  ```

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

  $api->virtualAccount->fetch($virtualId);
  ```

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

  virtualId = "va_IDDYE8gYTLJCEH"

  Razorpay::VirtualAccount.fetch(virtualId)
  ```

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

  instance.virtualAccounts.fetch(virtualId)
  ```

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

  body, err := client.VirtualAccount.Fetch("<virtualId>", nil, nil)
  ```

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

  string virtualId = "va_Z6t7VFTb9xHeOs";

  VirtualAccount virtualaccount = client.VirtualAccount.Fetch(virtualId);
  ```

  ```bash CLI theme={null}
  razorpay smart-collect fetch va_DlGmm7jInLudH8
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "id": "va_D6Vw6zyJ0OmRZg",
    "name": "Acme Corp",
    "entity": "virtual_account",
    "status": "active",
    "description": "Customer Identifier for Raftar Soft",
    "amount_expected": 5000,
    "notes": [],
    "amount_paid": null,
    "customer_id": "cust_9xnHzNGIEY4TAV",
    "receivers": [
      {
        "id": "ba_D6Vw76RrHA3DC9",
        "entity": "bank_account",
        "ifsc": "RATN0VAAPIS",
        "bank_name": "RBL Bank",
        "name": "Acme Corp",
        "notes": [],
        "account_number": "2223330025991681"
      }
    ],
    "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": null,
    "closed_at": 1568109789,
    "created_at": 1565939036
  }
  ```

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

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the Customer Identifier whose details are to be fetched.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of the Customer Identifier.
</ResponseField>

<ResponseField name="name" type="string">
  The `merchant billing label` as it appears on the Dashboard.
</ResponseField>

<ResponseField name="entity" type="string">
  Indicates the type of entity. Here, it is `virtual account`.
</ResponseField>

<ResponseField name="status" type="string">
  Indicates whether the Customer Identifier is in `active` or `closed` state.
</ResponseField>

<ResponseField name="description" type="string">
  A brief description about the Customer Identifier.
</ResponseField>

<ResponseField name="amount_expected" type="integer">
  The amount expected by the merchant.
</ResponseField>

<ResponseField name="amount_paid" type="integer">
  The amount paid by the customer into the Customer Identifier.
</ResponseField>

<ResponseField name="notes" type="json object">
  Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](/docs/api/understand#notes) to know more.
</ResponseField>

<ResponseField name="customer_id" type="string">
  Unique identifier of the customer the Customer Identifier is linked with. Check the [Customer API](/docs/api/customers) section to know more.
</ResponseField>

<ResponseField name="receivers" type="json object">
  Configuration of desired receivers for the Customer Identifier.
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the Customer Identifier. Sample id for Customer Identifier is `ba_Di5gbQsGn0QSz3`
</ResponseField>

<ResponseField name="entity" type="string">
  Name of the entity. Possible value is `bank_account`.
</ResponseField>

<ResponseField name="ifsc" type="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`.
</ResponseField>

<ResponseField name="bank_name" type="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`.
</ResponseField>

<ResponseField name="account_number" type="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`.
</ResponseField>

<ResponseField name="name" type="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`.
</ResponseField>

<ResponseField name="notes" type="json object">
  Any custom notes you might want to add to the Customer Identifier can be entered here. Check the [Notes section](/docs/api/understand#notes) to know more. This parameter appears in the response only when `bank_account` is passed as the receiver `type`.
</ResponseField>

<ResponseField name="allowed_payers" type="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](/docs/payments/smart-collect/third-party-validation) section.
</ResponseField>

<ResponseField name="type" type="string">
  The type of account through which the customer will make the payment. Possible value is `bank_account`.
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the `allowed_payers` account.
</ResponseField>

<ResponseField name="bank_account" type="object">
  Indicates the bank account details such as `ifsc` and `account_number`.
</ResponseField>

<ResponseField name="ifsc" type="string">
  The IFSC associated with the bank account through which the customer is expected to make the payment.
</ResponseField>

<ResponseField name="account_number" type="string">
  The bank account number through which the customer is expected to make the payment.
</ResponseField>

<ResponseField name="close_by" type="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.
</ResponseField>

<ResponseField name="closed_at" type="integer">
  UNIX timestamp at which the Customer Identifier is automatically closed.
</ResponseField>

<ResponseField name="created_at" type="integer">
  UNIX timestamp at which the Customer Identifier was created.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion
    title="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.
  </Accordion>
</AccordionGroup>
