Delete Withdrawals in the VA Ledger

Deleting a Withdrawal in the VA Ledger

With the Virtual Account ledger, it is possible to delete a withdrawal stuck with the status "InProgress". You can do so the following - v3 REST API endpoint.

Example request:

curl --request DELETE \
     --url 'https://api.tatum.io/v3/offchain/withdrawal/{Withdrawal_ID}?revert=true' \
     --header 'accept: application/json' \
     --header 'x-api-key: {YOUR_API_KEY}'
  • Deleting a withdrawal from the VA ledger to the blockchain should only be done when the associated blockchain transaction failed and or it was dropped from the mempool.
  • When deleting a withdrawal, be mindful of the optional parameter "revert", where it defines IF the fee should be reverted to the account balance as well as with the amount. Defaults is true.
    Revert == true would be typically used when withdrawal was not broadcast to the blockchain.
    Revert == false is usually used for tokens, where gas was consumed but the transaction was reverted.
  • Deleting a withdrawal successfully processed by the blockchain will likely break your Virtual Account ledger. To fix this accounting issue, you will have to register the withdrawal again.

❗️

When the withdrawn currency is a token, it is recommended to use β€œrevert=false".

Disclaimer

On-chain balance has prevalence over the VA ledger balance. Balance desync within the VA ledger may be fixable. However, on-chain operations are permanent and non-reversible.

We strongly encourage users to implement redundant on-chain balance checks in their environment:

  1. After each deposit.
  2. Before executing any withdrawal from a VA ledger to the blockchain.

🚧

It is the responsability of the user to ensure on-chain balance liquidity.