Delete Virtual Account
Permanently delete virtual accounts that are no longer needed using the API endpoint. This operation removes the account from the system and archives associated data for compliance purposes. Use deletion for cleaning up completed transactions or accounts that are no longer active.
Important
Virtual accounts take 24 hours to be fully deleted from the system.
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:
View Account Status
Verify virtual account status before attempting deletion.
Create New Virtual Accounts
Generate new virtual accounts for ongoing business needs.
Updated 3 days ago
