# Commit a transaction

Source: https://developer.avalara.com/products/communications/integration-guides/communications-integration/gpn5847405575196/

Guide: Communications

# Commit a transaction

**Element type: Required**

**Enpoints/models used:** [Invoice](https://developer.avalara.com/api-reference/communications/v2/models/Invoice/), [Commit](https://developer.avalara.com/api-reference/communications/v2/methods/Tax%20Calculation/Commit/)

Your integration must provide a method for specifying whether an invoice should be committed when it’s processed. This is done using one of the following methods:

-   Set the `cmmt` field to `true` in the document's [Invoice](https://developer.avalara.com/api-reference/communications/v2/models/Invoice/) model. This value defaults to `false`. See example 1 below.
-   Run the [Commit](https://developer.avalara.com/api-reference/communications/v2/methods/Tax%20Calculation/Commit/) endpoint and set the `cmmt` field to `true`. See example 2 below.

Note

The `cmmt` flag in a `CalculateTaxes` request is a "use-once" feature that establishes the state of ALL the transactions for a particular document on its first call in a particular reporting month. Even if you try to set the `cmmt` flag to something else in the `CalculateTaxes` request, the commit state won’t change. Refer to the [When to commit](https://developer.avalara.com/communications-integration/design-transaction-workflow/when-to-commit) topic for more information and examples.

## Example 1

**View example**:

```
"inv": [
  {
    "doc": "StreamingContent1",
    "cmmt": false,
    "cust": 0,
    "date": "2021-01-01T12:00:00Z",
    "invm": true,
    "dtl": true,
    "summ": true,
    "acct": "Broadcaster",
    "custref": "Customer1234",
    "invn": "Invoice1234",
    "bcyc": "202010",
    "bpd": {
        "month": "10",
        "year": "2020"
    },
    "opt": [
        {
            "key": "1",
            "val": "StreamingSamples"
        }
    ],
    "bill": {
      "ctry": "USA",
      "addr": "11 West 53 Street",
      "city": "Manhattan",
      "st": "NY",
      "zip": "10019"
    },
    "itms": [
      {
        ...
      }
    ]
  }
] 
```

## Example 2

**View example**:

```
{
  "doc": "DocumentCode12345",
  "cmmt": true,
} 
```