> ## 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.

# API Endpoints

<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>
</div>

Base URL: `https://api.razorpay.com/v1/`

The Customer Identifier response contains attributes such as `id` and `customer_id`, and also a field `receivers`. This is an array that defines what receivers are available for the Customer Identifier.

For example, if the `receiver_types` field of the original request contained `bank_account`, then the response will contain a `receivers` array with one element, which gives details of that `bank_account` receiver such as account number,  IFSC, etc.

## Create

<Warning>
  **Note**

  The request format for Customer Identifier creation recently underwent a change, and the updated format can be found [here](/docs/api/payments/smart-collect). The request format given below will eventually be deprecated.

  For new integrations, we strongly recommend you use the updated request format, as it allows a host of new features, most particularly the support for completely-numeric account numbers by default.
</Warning>

`POST /virtual_accounts`

<CodeGroup>
  ```bash cURL theme={null}
  curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
     -X POST \
     --data "receiver_types[]=bank_account" \
     --data "description=First Customer Identifier" \
     --data "notes[reference_key]=reference_value" \
     https://api.razorpay.com/v1/virtual_accounts
  ```

  ```json Response theme={null}
  {
    "id": "va_4xbQrmEoA5WJ0G",
    "entity": "virtual_account",
    "description": "First Customer Identifier",
    "customer_id": "cust_805c8oBQdBGPwS",
    "status": "active",
    "amount_paid": 0,
    "notes": {
      "reference_key": "reference_value"
    },
    "receivers": [
      {
        "id": "ba_4lsdkfldlteskf",
        "entity": "bank_account",
        "name": "Merchant Billing Label",
        "account_number": "11122219877893452",
        "ifsc": "RAZR0000001"
      }
    ],
    "created_at": 1455696638
  }
  ```
</CodeGroup>

With the exception of the `Create` API, the request format for all other API endpoints remains the same, and can be checked [here](/docs/api/payments/smart-collect).

## Migration

To migrate to the new request format, simply replace the `receiver_types` parameter in the request body with the equivalent `receivers.types` parameters.

<CodeGroup>
  ```json Older Request theme={null}
  {
    "receiver_types": [
      "bank_account"
    ],
    "description": "First Customer Identifier",
    "customer_id": "cust_805c8oBQdBGPwS",
    "notes": {
      "reference_key": "reference_value"
    }
  }
  ```

  ```json Updated Request theme={null}
  {
    "receivers": {
      "types": [
        "bank_account"
      ]
    },
    "description": "First Customer Identifier",
    "customer_id": "cust_805c8oBQdBGPwS",
    "notes": {
      "reference_key": "reference_value"
    }
  }
  ```
</CodeGroup>

Note that `receiver.types` is a mandatory parameter.

<Info>
  **Note**

  By default, the account number generated using the new request format is wholly numeric, thus allowing it to be used on a wider range of platforms. This is a change from the older request format, which produced only alphanumeric account numbers.
</Info>
