# Use DocVoided

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

# Use DocVoided

Learn how to use the DocVoided code to void a committed transaction and update its status.

For the first case, let’s assume you already saved and committed a transaction, but your customer found an issue when they looked over their receipt. In this case, you can void the transaction altogether and resubmit a new one. Because you’ve already committed the transaction for reporting, your best option is to record the void with the `DocVoided` code. Here’s what your request can look like in that case:

**Example**

```
{
  ...
  "companyCode": 555,
  "transactionCode": "5555555aa-5aa5-5a55-a555-55a555a5555a",
  "code": "DocVoided",
  "commit": true
}
```

The response returns a detailed summary of this action of the following structure:

**Example**

```
{
  "id": 55555555,
  "code": "5555555aa-5aa5-5a55-a555-55a555a5555a",
  "companyId": 5555555,
  "date": "2024-07-15T00:00:00",
  "taxDate": "2024-07-15T00:00:00",
  "paymentDate": "2024-08-01T00:00:00",
  "status": "Cancelled",
  "type": "SalesInvoice",
  ...
}
```

You’ll notice this transaction status in the response changed to `"status": "Cancelled"`. Also, when viewed in AvaTax, the transaction will now change to **Voided** under your company's transactions tab. You can also include this transaction in your reports.