> This page is for Enterprise.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://citi-demo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://citi-demo.ferndocs.com/_mcp/server.

# Deactivate Virtual Accounts

DELETE https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts

Deactivation can be performed only if an account holds no balances.  Deactivation is an irreversible action Please perform the necessary verification before deactivating any virtual accounts.

Reference: https://citi-demo.ferndocs.com/enterprises/api-reference/account-services/receivable-services/virtual-accounts-wallet/virtual-account-deactivation

## Servers

- `https://tts.sandbox.apib2b.citi.com/citiconnect/sb` (sandbox URL , default)
- `https://b2b.tts.icgservices.citi.com/citiconnect/prod` (production gateway URL)

## Request

### Query parameters

- `client_id` (string, required) — Unique reference shared during CitiConnect API onboarding (`client_id` used during OAuth token generation).
- `branch_code` (string, optional) — Citi's bank code associated with given a header account number.

### Headers

- `Encrypted-Params` (string, optional) — Encrypt the key values as below: - Virtual account Use your digital cert to do the encryption. virtual\_account: In the GET operation: Virtual account that was reserved as well as activated are allowed In DELETE operation: Virtual account that was activated is only allowed

## Response

### 202

Accepted

- `request_id` (string, optional) — Auto-generated unique identification assigned for the request.
- `status` (string, optional) — Status of the request. Possible statuses are SUCCESS REJECTED PENDING
- `message` (string, optional) — Detailed response for the particular request.
- `action` (string, optional) — Action of the given request. - ''RESERVATION'' - ''ACTIVATION''.
- `branch_code` (string, optional) — Citi's bank code associated with given a header account number.
- `error_details` (list of Error-Detail, optional)
- `account` (list of Accounts, optional)

## Errors

### 400 Bad Request Error

- `any`

### 401 Unauthorized Error

Unauthorized

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 403 Forbidden Error

Forbidden

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 404 Not Found Error

Not Found

- `httpCode` (string, optional) — HTTP status code of this API.
- `httpMessage` (string, optional) — Short message about the issue.
- `moreInformation` (string, optional) — More information about the issue.

### 405 Method Not Allowed Error

Method Not Allowed

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

### 429 Too Many Requests Error

Too Many Request

- `status` (string, optional) — HTTP status code of this API response.
- `message` (string, optional) — Short message about the issue.

### 500 Internal Server Error

Internal Server Error

- `ref_id` (string, optional) — Uniqiue reference ID for a particular request.
- `error_details` (list of Error-Detail, optional)
- `httpCode` (string, optional)
- `httpMessage` (string, optional)
- `moreInformation` (string, optional)
- `status` (string, optional)
- `message` (string, optional)

## Types

### Error-Detail

- `code` (string, optional) — Unique ID for the error code. Under GET method and callbacks, this parameter is a non-retrievable internal error code:CC00013.
- `issue` (string, optional) — More details about the issue.
- `action` (string, optional) — Corrective action to be taken to resolve above issue.

### Accounts

- `virtual_account` (string, optional) — Required parameter only if the value of the `action` parameter is set to 'ACTIVATION'.This parameter specifies the virtual account to be activated.
- `entity_id` (string, optional) — ID that was assigned specific to the entity being activated under this virtual account.

## Examples

**Response**

```json
{
  "request_id": "29b9c9d7-d4d9-48ce-8823-f9b3ee276b8f",
  "status": "ACCEPTED",
  "message": "Request accepted Successfully"
}
```

**SDK Code**

```python SynchronousResponseExample
import requests

url = "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts"

querystring = {"branch_code":"960","client_id":"f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e"}

headers = {"Encrypted-Params": "encrypted-virtual-account-payload"}

response = requests.delete(url, headers=headers, params=querystring)

print(response.json())
```

```javascript SynchronousResponseExample
const url = 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e';
const options = {
  method: 'DELETE',
  headers: {'Encrypted-Params': 'encrypted-virtual-account-payload'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SynchronousResponseExample
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Encrypted-Params", "encrypted-virtual-account-payload")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SynchronousResponseExample
require 'uri'
require 'net/http'

url = URI("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Encrypted-Params"] = 'encrypted-virtual-account-payload'

response = http.request(request)
puts response.read_body
```

```java SynchronousResponseExample
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e")
  .header("Encrypted-Params", "encrypted-virtual-account-payload")
  .asString();
```

```php SynchronousResponseExample
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e', [
  'headers' => [
    'Encrypted-Params' => 'encrypted-virtual-account-payload',
  ],
]);

echo $response->getBody();
```

```csharp SynchronousResponseExample
using RestSharp;

var client = new RestClient("https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Encrypted-Params", "encrypted-virtual-account-payload");
IRestResponse response = client.Execute(request);
```

```swift SynchronousResponseExample
import Foundation

let headers = ["Encrypted-Params": "encrypted-virtual-account-payload"]

let request = NSMutableURLRequest(url: NSURL(string: "https://tts.sandbox.apib2b.citi.com/citiconnect/sb/receivablesservices/v2/virtualaccounts?branch_code=960&client_id=f56f0f6b-74fe-4dfa-b4ab-0da35a46b65e")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```