Delete Withdrawals in the VA Ledger
With the Virtual Account ledger, it is possible to delete a withdrawal stuck with the status "InProgress
".
Steps
Step_1: Find and verify a VA Ledger Withdrawal
- Refer to this article
Step_2: Delete a Withdrawal in the VA Ledger
- You can delete a withdrawal using the following - v3 REST API endpoint.
- 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.
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}'
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:
- After each deposit.
- Before executing any withdrawal from a VA ledger to the blockchain.
It is the responsibility of the user to ensure on-chain balance liquidity.
Updated 29 days ago