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

# Add VPA Receiver to an Existing Customer Identifier (TPV)

> Add VPA Receiver to an existing Customer Identifier using the Razorpay **Smart Collect TPV** 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>
</div>

Use this endpoint to add a VPA receiver to an existing Customer Identifier.

If you have created a Customer Identifier with only a VPA receiver, you cannot replace or update it.

<RequestExample>
  ```bash Curl theme={null}
  curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET]
  -X POST https://api.razorpay.com/v1/virtual_accounts/va_DzcFjMezDcN8vv/receivers
  -H 'content-type: application/json'
  -d '{
    "types": [
      "vpa"
    ],
    "vpa": {
      "descriptor": "gaurikumari"
    }
  }'
  ```

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

  String virtualId = "va_Di5gbNptcWV8fQ";

  JSONObject virtualRequest = new JSONObject();
  List<Object> types = new ArrayList<>();
  types.add("vpa");
  virtualRequest.put("types",types);
  JSONObject vpa = new JSONObject();
  vpa.put("descriptor","gaurikumari");
  virtualRequest.put("vpa",vpa);

  VirtualAccount virtualaccount = instance.virtualAccounts.addReceiver(virtualId,virtualRequest);
  ```

  ```python Python theme={null}
  import razorpay
  razorpay.Client(auth=("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]"))

  client.virtual_account.add_receiver(virtualId,{
    "types": [
      "vpa"
    ],
    "vpa": {
      "descriptor": "gauravkumar"
    }
  })
  ```

  ```php PHP theme={null}
  $api = new Api('YOUR_KEY_ID, 'YOUR_KEY_SECRET');
  $api->virtualAccount->fetch($virtualId)->addReceiver(array('types' => array('vpa'),'vpa' => array('descriptor'=>'gauravkumar')));
  ```

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

  virtualId = "va_Di5gbNptcWV8fQ"

  para_attr = {
    "types": [
      "vpa"
    ],
    "vpa": {
      "descriptor": "gauravkumar"
    }
  }

  Razorpay::VirtualAccount.add_receiver(virtualId, para_attr)
  ```

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

  instance.virtualAccounts.addReceiver(virtualId,{
    types: [
      "vpa"
    ],
    vpa: {
      descriptor: "gauravkumar"
    }
  })
  ```

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

  types := make(map[string]interface{})
  type["0"] = "vpa"

  data:= map[string]interface{}{
  	"type": type,
  	"vpa": map[string]interface{}{
  	  "descriptor": "gauravkumar",
  	},
    }
  ```

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

  string virtualId = "va_Z6t7VFTb9xHeOs";

  Dictionary<string, object> virtualRequest = new Dictionary<string, object>();
  List<string> types = new List<string>();
  types.Add("vpa");
  virtualRequest.Add("types", types);
  Dictionary<string, object> vpa = new Dictionary<string, object>();
  vpa.Add("descriptor", "gaurikumari");
  virtualRequest.Add("vpa", vpa);

  VirtualAccount refund = client.VirtualAccount.Fetch(virtualId).AddReceiver(virtualRequest);
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "id": "va_DzcFjMezDcN8vv",
    "name": "Acme Corp",
    "entity": "virtual_account",
    "status": "active",
    "description": "",
    "amount_expected": null,
    "notes": [],
    "amount_paid": 0,
    "customer_id": "cust_DzbSeP2RJD1ZHg",
    "receivers": [
      {
        "id": "ba_DzcFjVqAMSCEIW",
        "entity": "bank_account",
        "ifsc":"RATN0VAAPIS",
        "bank_name": "RBL Bank",
        "name": "Acme Corp",
        "notes": [],
        "account_number": "2223333232194699"
      },
      {
        "id": "vpa_DzcZR5ofjCUKAx",
        "entity": "vpa",
        "username": "rpy.payto00000gaurikumari",
        "handle": "icici",
        "address": "rpy.payto00000gaurikumari@icici"
      }
    ],
    "close_by": null,
    "closed_at": null,
    "created_at": 1577969986
  }
  ```
</ResponseExample>

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the Customer Identifier to which another receiver type is to be added.
</ParamField>

## Request Parameters

<ParamField body="types" type="array" required>
  The receiver type to be added to the Customer Identifier. Possible values are:

  * `bank_account`
  * `vpa`
</ParamField>

<ParamField body="vpa" type="json object">
  Descriptor details for the virtual UPI ID. This is to be passed only when `vpa` is passed as the receiver `types`.
</ParamField>

<ParamField body="descriptor" type="string">
  You can provide a custom descriptor for the UPI ID. This is a unique identifier provided by you to identify the customer. For example, `gaurikumari` and `akashkumar` are the descriptors in the usernames `rpy.payto00000gaurikumari` and `rpy.payto00000akashkumar` respectively. The combination of merchant prefix and descriptor must be 20 characters. If you go ahead with the default merchant prefix, you will get 10 characters. Hence the descriptor should be 10 characters only. If a user tries to input 11 or more characters in a descriptor, our API will throw an error for invalid character length.
</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/api/understand).
</ResponseField>

<ResponseField name="customer_id" type="string">
  Unique identifier of the customer the Customer Identifier is linked with. Know more about [Customer API](/docs/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 or virtual UPI ID. 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 are:

  * `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 or virtual UPI ID can be entered here. Know more about [notes](/docs/api/understand). This parameter appears in the response only when `bank_account` is passed as the receiver `type`.
</ResponseField>

<ResponseField name="username" type="string">
  The UPI ID consists of the username and the bank handle. The `username` consists of the `namespace` (assigned by the bank to Razorpay), the `merchant prefix` (which can be customised by you) and the `descriptor` (which you provide to identify the customer). The unique identifier which forms the first half of the virtual UPI ID. For example, `rpy.payto00000gaurikumari`. This parameter appears in the response only when `vpa` is passed as the receiver `type`. The descriptor can be 10 characters only.
</ResponseField>

<ResponseField name="handle" type="string">
  The bank name that forms the second half of the virtual UPI ID.  For example, `icici`. This parameter appears in the response only when `vpa` is passed as the receiver `type`.
</ResponseField>

<ResponseField name="address" type="string">
  The UPI ID that combines the `username` and the `handle` with the `@` symbol. For example, `rpy.payto00000gaurikumari@icici`. This parameter appears in the response only when `vpa` 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>
