# Reconciling transactions after an outage

Source: https://developer.avalara.com/avatax-dm-combined-erp/sales-tax-badge/calculate-tax-offline/reconcile-transactions-after-outage/

# Reconciling 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. Temporary transactions such as SalesOrder tax estimates do not need to be reconciled; 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 do not 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 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 will determine whether the document exists based on the`code`. If the code exists, then AvaTax is going to update that document as an adjustment; if the code does not exist, then AvaTax will create it.

```
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'
```

[Previous](/avatax-dm-combined-erp/sales-tax-badge/calculate-tax-offline/retry-or-fallback)

[Next](/avatax-dm-combined-erp/sales-tax-badge/avatax-faqs)