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:

CountryDelete
Argentina
Brazil
Mexico
Peru

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:

StatusCan DeleteNotes
COMPLETEDActive accounts can be deleted
DISABLEDAlready deactivated accounts can be deleted
INPROGRESSWait for account creation to complete
Has pending transactionsResolve all pending transactions first
Has uncleared fundsWait 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:

ObjectDescriptionRequired
externalIdThe 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

FieldDescriptionUse Case
internalIdLocalpayment's unique identifier for the deleted virtual account.Transaction tracking and support
externalIdYour original reference number for the virtual account.Internal reconciliation
status.codeCurrent transaction status codeStatus monitoring

Next Steps

After deleting virtual accounts, you may want to: