Delete Virtual Account
Permanently disable virtual accounts that are no longer needed using the API endpoint.
The DELETE operation permanently deactivates a virtual account, preventing it from receiving any future payments. The historical record and transaction data associated with the account are preserved in our system for compliance, reporting, and reconciliation purposes.
Important: This action is irreversible. A deactivated account cannot be reactivated. If you need to re-enable payment collection for the same beneficiary, you must create a new virtual account .
Use this endpoint to clean up accounts that are no longer active in your operational workflow.
Availability
Virtual Account deletion via API is available in the following countries:
Before You Begin
Ensure you have:
- Valid API credentials (access token).
- Virtual account external ID you want to delete.
Virtual Account Deletion
Currently, virtual account deletion is only available through the API endpoint. Use this method for automated cleanup processes and account management.
Before deleting a virtual account, ensure it meets the following criteria:
| Status | Can Delete | Notes |
|---|---|---|
| COMPLETED | ✅ | Active accounts can be deleted |
| DISABLED | ✅ | Already deactivated accounts can be deleted |
| INPROGRESS | ❌ | Wait for account creation to complete |
| Has pending transactions | ❌ | Resolve all pending transactions first |
| Has uncleared funds | ❌ | Wait for funds to clear and settle |
Example Request
Send a DELETE request to remove a virtual account using the external ID:
curl --request DELETE \
--url https://api.stage.localpayment.com/api/virtual-account/{externalId} \
--header 'Authorization: Bearer <your_access_token>' \
--header 'accept: application/json'Key Request Parameters
The request requires several key parameters:
| Object | Description | Required |
|---|---|---|
externalId | The external ID of the virtual account to delete (path parameter) | ✅ |
See all available parameters in the request.
Successful Response
{
"currency": "MXN",
"externalId": "a79aabec-16c6-4a84-8abe-be2dcd2e07a1",
"internalId": "d710312c-8c3f-4b65-8e62-7f83eeba321a",
"accountNumber": "484.484.00000011",
"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": "100",
"description": "INPROGRESS",
"detail": "Virtual account in progress"
},
"errors": []
}Key Response Fields
| Field | Description | Use Case |
|---|---|---|
internalId | Localpayment's unique identifier for the deleted virtual account. | Transaction tracking and support |
externalId | Your original reference number for the virtual account. | Internal reconciliation |
status.code | Current transaction status code | Status monitoring |
Next Steps
After deleting virtual accounts, you may want to:
Verify virtual account status before attempting deletion.
Generate new virtual accounts for ongoing business needs.
Updated 3 days ago
