# Use DocDeleted

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

# Use DocDeleted

Learn how to delete uncommitted transactions in AvaTax using the DocDeleted method.

For the next example, let’s this time assume that the customer included items in their shopping cart. When submitted to AvaTax, these become saved but uncommitted transactions. Then the customer abandons their cart. For this case, you can either use the `DocVoided` method like we did above or you can delete the transaction altogether. The following example shows hot to submit a request to delete the transaction.

**Example**

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

Notice here we specified `DocDeleted` rather than `DocVoided` in the `code` field. Because you didn't commit the file, AvaTax will delete the transaction instead of voiding int. If you wanted to keep a record of this, you could use `DocVoided`.