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

# Fetch a Customer Identifier Using id

> Fetch a Customer Identifier with id using the Razorpay API

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇸🇬 Singapore</span>
  <span>🇺🇸 United States</span>
</div>

Use this endpoint to fetch a Customer Identifier with 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)
  ```

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

  virtualId = "va_IDDYE8gYTLJCEH"

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

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->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)
  ```

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

  virtualId = "va_IDDYE8gYTLJCEH"

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

  ```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 - bank account 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"
      }
    ],
    "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. Know more about [notes](/docs/sg/api/understand#notes).
</ResponseField>

<ResponseField name="customer_id" type="string">
  Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](/docs/sg/api/customers).
</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 virtual bank account. Sample IDs for:

  * Virtual bank account: `ba_Di5gbQsGn0QSz3`
  * Virtual UPI ID: `vpa_CkTmLXqVYPkbxx`
</ResponseField>

<ResponseField name="entity" type="string">
  Name of the entity. Possible values:

  * `bank_account`
  * `vpa`
</ResponseField>

<ResponseField name="ifsc" type="string">
  The IFSC for the virtual bank account 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 virtual bank account. For example, `RBL Bank`. 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 virtual bank account can be entered here. Know more about [notes](/docs/sg/api/understand#notes). This parameter appears in the response only when `bank_account` is passed as the receiver `type`.
</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).

  <Warning>
    **Watch Out!**

    * Any request beyond `2147483647` UNIX timestamp will fail.
    * A Customer Identifier API that has not been used for 90 days will be automatically closed even if no `close_by` date has been set.
  </Warning>
</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>
