How to Force Revert a Transaction with Negative Balance

Last updated: July 4, 2025

In some cases, you may need to revert a transaction involving an account with a negative balance. By default, the system prevents reversing transactions that would result in insufficient funds. However, there is a way to override this validation.

Using the Force Parameter

To revert a transaction involving an account with a negative balance, you can use the force query parameter in the revert API endpoint. This parameter allows you to disable the balance checks and force the reversal.

API Endpoint

Use the following API endpoint structure:

/api/ledger/v2/{ledgerID}/transactions/{txID}/revert?force=true

Replace {ledgerID} with your ledger ID and {txID} with the ID of the transaction you want to revert.

Example Usage

If you have a transaction with ID "123456" in a ledger with ID "main", the API call would look like this:

/api/ledger/v2/main/transactions/123456/revert?force=true

Important Considerations

  1. Use this feature with caution, as it allows you to create negative balances in accounts.

  2. Ensure that you have proper controls and auditing in place when using forced reversals.

  3. This feature is particularly useful for accounts that act as "always negative" balance accounts

By using the force=true parameter, you can override the default validation and revert transactions even when the source account has insufficient funds or a negative balance.