# Void/delete document

Source: https://developer.avalara.com/avatax-for-ap/cwe3836110291886/

# Void/delete document

Learn how to void or delete documents in your integration using the VoidTransaction endpoint.

If your platform supports voiding documents, then you must include this functionality in your integration. You can do this using the [VoidTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/VoidTransaction/) endpoint. This endpoint provides a way to recover from posting problems and cancelled transactions. The effect of the [VoidTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/VoidTransaction/) endpoint depends on both the current state of the document (uncommitted/saved, posted, or committed) and the `code` parameter used in the request body.

Below are some simple examples. Depending on your workflow, you can come across instances where a user cancelled a transaction before any money transfers. In this case, because you don’t owe the customer a refund, and depending on how you’ve submitted the transaction to AvaTax, you can either void or delete the transaction.