> ## Documentation Index
> Fetch the complete documentation index at: https://docs.localpayment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable/Disable Virtual Account

Localpayment allows you to temporarily suspend or reactivate virtual accounts, providing flexibility to manage account status without permanent deletion. This is useful for temporary holds, dispute resolution, or seasonal business patterns.

## Before You Begin

Ensure you have:

* Valid [API credentials ](https://docs.localpayment.com/docs/api-keys-and-environments.md)(access token).
* Virtual account external ID you want to enable or disable.
* Understanding of the virtual account's current status.

***

## Virtual Account Status Management

Manage your virtual account status using any of the following methods:

> [card] [Enable Virtual Account](#enable-virtual-account)
>
> Enable a previously deactivated virtual account to resume payment acceptance.

> [card] [Disable Virtual Account](#disable-virtual-account)
>
> Temporarily suspend a virtual account to prevent further payments while preserving account data.

> [card] [Check Account Status](https://docs.localpayment.com/docs/get-virtual-account-status.md)
>
> Verify the current status of a virtual account before performing activation or deactivation.

***

## Virtual Account Status Reference

Understanding virtual account statuses is crucial for proper enable/disable management:

| Description | Can Enable | Can Disable |
| - | - | - |
| INPROGRESS | ❌ | ❌ |
| COMPLETED | ❌ | ✅ |
| DELETED | ❌ | ❌ |
| DISABLED | ✅ | ❌ |

***

## Enable Virtual Account

Reactivate a previously deactivated virtual account to resume payment acceptance.

Send a `PUT` request to [Update Virtual Account Status](https://docs.localpayment.com/reference/update-virtual-account-status.md) endpoint using the external ID:

### Example Request

Below is an example using `curl`:

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
curl --request PUT \
     --url https://api.stage.localpayment.com/api/virtual-account/{externalId}/activation/enable/ \
  --header 'Authorization: Bearer <your_access_token>' \
     --header 'accept: application/json'
```

### Key Request Parameters

The request requires several key objects:

| Parameter | Description | Required |
| - | - | - |
| `externalId` | The external ID of the virtual account to enable (path parameter) | ✅ |

### Successful Response

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "currency": "MXN",
  "externalId": "e36ef929-c2d4-fcf0-b30c-99dc51798f4b",
  "internalId": "c09095fb-6a0e-47af-9f43-3d9452b0f290",
  "accountNumber": "{{accountNumber}}",
  "beneficiary": {
    "type": "INDIVIDUAL",
    "name": "John",
    "document": {
      "type": "RFC",
      "id": "EXTF900101NI1"
    },
    "bank": {
      "branch": {},
      "account": {
        "number": "646011319800023123",
        "aliases": [],
        "owner": {
          "document": {}
        }
      }
    },
    "fullName": "John Doe",
    "lastName": "Doe"
  },
  "status": {
    "code": "200",
    "description": "COMPLETED",
    "detail": "Virtual account has been created"
  },
  "errors": []
}
```

### Key Response Fields

| Field | Description | Use Case |
| :- | :- | :- |
| `internalId` | Localpayment's unique identifier for the virtual account. | Support and system reference |
| `externalId` | Your original reference number for the virtual account. | Internal reconciliation and tracking |
| `status.code` | Current status code of the virtual account. | Determine account usability and next actions |

***

## Disable Virtual Account

Temporarily suspend a virtual account to prevent further payments while preserving account data and history.

Send a `PUT` request to [Update Virtual Account Status](https://docs.localpayment.com/reference/update-virtual-account-status.md) endpoint using the external ID:

> [!WARNING]
>
> **Important**
>
> In Peru, when a virtual account is disabled, it will appears as nonexistent in your banking app.

### Example Request

Below is an example using `curl`:

```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
curl --request PUT \
     --url https://api.stage.localpayment.com/api/virtual-account/{externalId}/activation/disable/ \
  --header 'Authorization: Bearer <your_access_token>' \
     --header 'accept: application/json'
```

### Key Request Parameters

The request requires several key objects:

| Parameter | Description | Required |
| - | - | - |
| `externalId` | The external ID of the virtual account to disable (path parameter) | ✅ |

### Successful Response

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "currency": "MXN",
  "externalId": "f059a032-9253-4607-9b8e-2948ed18d595",
  "internalId": "c09095fb-6a4e-17cf-9343-9d9452b0f290",
  "accountNumber": "{{accountNumber}}",
  "beneficiary": {
    "type": "INDIVIDUAL",
    "name": "John",
    "document": {
      "type": "RFC",
      "id": "EXTF900101NI1"
    },
    "bank": {
      "branch": {},
      "account": {
        "number": "646011319800023123",
        "aliases": [],
        "owner": {
          "document": {}
        }
      }
    },
    "fullName": "John Doe",
    "lastName": "Doe"
  },
  "status": {
    "code": "300",
    "description": "DISABLED",
    "detail": "Virtual account disabled"
  },
  "errors": []
}
```

### Key Response Fields

| Field | Description | Use Case |
| :- | :- | :- |
| `internalId` | Localpayment's unique identifier for the virtual account. | Support and system reference |
| `externalId` | Your original reference number for the virtual account. | Internal reconciliation and tracking |
| `status.code` | Current status code of the virtual account. | Determine account usability and next actions |

***

## Next Steps

After managing virtual account activation status, you may need to perform additional actions:

> [card] [Check Virtual Account Status](https://docs.localpayment.com/docs/get-virtual-account-status.md)
>
> Verify the current status of enabled or disabled virtual accounts.

> [card] [Delete Virtual Account](https://docs.localpayment.com/docs/delete-virtual-account.md)
>
> Permanently deactivate a virtual account. This prevents all future payments to it but retains its full history. The action is irreversible. Use for accounts no longer needed; create a new one to resume operations.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.