---
page_title: Update VAN
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/virtual-account--ecollect/update-van
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fvirtual-account--ecollect%2Fupdate-van
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Update VAN



This API will update the status of the virtual account. Disabling the status will revoke all incoming transactions against the account.## Endpoints:
- Sandbox: https://sandbox.juspay.in/customers/:customer_id/virtual-accounts/:virtual_account_reference

- Production: https://api.juspay.in/customers/:customer_id/virtual-accounts/:virtual_account_reference

## Request Type: 
PUT

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Value: MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: required, Base64 Encoded username:password
## Headers:

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Code Snippets:

#### Request Code Snippet:

```request
curl --location --request PUT 'https://sandbox.juspay.in/customers/:customer_id/virtual-accounts/:virtual_account_reference' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic QTA0QT*******ODg1Og==' \
--header 'x-routing-id: customer_1122'\
--header 'x-merchantid: merchant_id' \
--data-urlencode 'command=enable'

```

### Sample Request and Response:

#### Response:
```json
{
    "status": "ENABLED",
    "last_updated": "2024-01-03T09:02:04.42731421Z",
    "virtual_account_reference": "test1",
    "date_created": "2024-01-03T08:57:12.31589749Z"
}

```

## Path Parameters:

#### customer_id:
Customer ID provided by Juspay or object reference Id given by merchant while customer creation.
- Tags: String, Mandatory

#### virtual_account_reference:
Unique ID that merchants can use to represent the virtual account. [AlphaNumeric Values Only]
- Value: value
- Tags: String, Mandatory
## Body Parameters:
### Basic Parameters:

#### command:
- Description: Accepted values are "enable" and "disable".
- Value: value
- Tags: String, Mandatory
## API Responses:
### 200:

#### status:
- Tags: String

#### virtual_account_reference:
- Tags: String

#### date_created:
- Tags: String

#### last_updated:
- Tags: String
### 400:

#### status:
- Tags: String

#### error_code:
- Tags: String

#### error_message:
- Tags: String

#### status_id:
- Tags: String


---

## See Also

- [List VAN](https://juspay.io/in/docs/api-reference/docs/virtual-account--ecollect/list-van)
- [Introduction](https://juspay.io/in/docs/api-reference/docs/push-provisioning/introduction)
