# Reconcile transactions after an outage

Source: https://developer.avalara.com/ecommerce-integration-guide/calculate-tax-offline/reconcile-transactions-after-an-outage/

If you used a fallback tax rate for a permanent transaction, you must reconcile the transaction after your application comes back online. You don't need to reconcile temporary transactions, such as sales order tax estimates. Similarly, if you retry a transaction one or more times using [CreateOrAdjustTransaction](https://developer.avalara.com/avatax/dev-guide/calculating-tax-offline/reconcile-transactions-after-outage/), and the API call eventually succeeds, you also don't need to reconcile the transaction.

The necessary steps to reconcile transactions after an outage are as follows:

-   Save the original API call (e.g the [CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/) object) along with the tax amount that you used as a fallback.

-   Apply a `TaxOverride` of type `TaxAmount` to your [CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/).

-   Call the [CreateOrAdjustTransaction API](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateOrAdjustTransaction/) to reconcile the transaction correctly regardless of whether the original API call succeeded.

See an example cURL request below. In this example, AvaTax determines whether the document exists based on the `code`. If the code exists, then AvaTax will update that document as an adjustment; if the code doesn’t exist, then AvaTax will create it.

[![Closed](https://avalara-devdocs-prod.mcoutput.com/avatax-for-ecom/Content/Skins/Default/Stylesheets/Images/transparent.gif)Example](javascript:void\(0\);)

```
curl    -X POST    -H 'Accept: application/json'    -H 'Authorization: Basic ${btoa(`:`)}'    -H 'Content-Type: application/json'    --data '{      "adjustmentReason": "NotAdjusted",      "adjustmentDescription": "Test Description",      "createTransactionModel": {        "lines": [          {            "number": "1",            "quantity": 1,            "amount": 100,            "taxCode": "P0000000",            "itemCode": "TEST",            "description": "Test item description",            "addresses": {              "singleLocation": {                "line1": "100 Ravine Lane NE",                "city": "Bainbridge Island",                "region": "WA",                "country": "US",                "postalCode": "98110"              },              "taxOverride": {                "type": "TaxAmount",                "taxAmount": 10,                "reason": "Precalculated Tax"              }            }          ],          "code": "12345",          "type": "SalesOrder",          "companyCode": "DEFAULT",          "date": "2020-11-12",          "customerCode": "ABC",          "purchaseOrderNo": "123456789",          "addresses": {            "singleLocation": {              "line1": "100 Ravine Lane NE",              "city": "Bainbridge Island",              "region": "WA",              "country": "US",              "postalCode": "98110"            }          }        },        "commit": true,        "taxOverride": {          "type": "TaxAmount",          "taxAmount": 10,          "reason": "Precalculated Tax"        },        "currencyCode": "USD",        "serviceMode": "Automatic",        "description": "Test item description"      }    }'    'https://sandbox-rest.avatax.com/api/v2/transactions/createoradjust' 
```