# Proration

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

Guide: Communications

# Proration

Note

This section describes an optional feature that you can include in your integration. It is not required for certification.

The Proration (`pror`) key calculates prorated taxes on a transaction that represents a partial month of service. Percentage-based taxes are prorated by way of the charge (`chg`) amount passed. However, fixed and per line taxes are subject to special prorating rules and procedures. Some tax authorities allow sellers to prorate fixed and per line taxes for partial months, but many insist on receiving the full amount. REST v2 applies these rules automatically if the pro-rating feature is used. Just specify the percentage of the month the service was active as a decimal in the `pror` key.

A few things to keep in mind:

-   If prorating **is not** allowed on a tax, the full amount is taxed.

-   If prorating **is** allowed on a tax, the fixed or per line tax applicable to the service will be returned, multiplied by the percentage supplied.

-   Remove the Proration (`prop`) key from the line item (`itms`) if you don't want to use Proration functionality. Setting `prop` to 0 means 0% proration for pro-rateable fixed taxes.

Note

Proration functionality is not supported on Tax Inclusive (`incl` set to `true`) line items (`itms`) or on line items with a quantity (`qty`) greater than 1.

**Prorated adjustments**

If the proration is being used for an adjustment credit rather than a partial charge, the ratio of the percentage applied should reflect the portion of the month in which the service was not active.

Use the Pro-rated Adjustment Type (`proadj`) to tell Communications REST v2 how to handle the return of prorated adjusted fixed taxes.

-   `0` Default

-   `1` Don't return non-proratable fixed taxes in the response

-   `2` Return non-proratable fixed taxes in the response

## Example 1: Proration

**View request**:

In this example, proration (`pror`) is set to 50% for 10 lines (`line`).

```
{
  "cmpn": {
    "bscl": 1,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "bill": {
      "pcd": 534300
      },
      "cust": 1,
      "lfln": false,
      "date": "2018-05-15T12:00:00Z",
      "itms": [{  "ref": "ProrationTest",  "chg": 0,  "line": 10,  "sale": 1,  "pror": 0.50,  "tran": 7,  "serv": 42}
      ],
      "invm": false,
      "dtl": true,
      "summ": false
    }
  ]
}
```

**View response**:

The prorated tax amounts (`tax`) are seen on Tax Type IDs (`tid`) 6 and 23.

```
{
  "inv": [
    {
      "itms": [{  "ref": "ProrationTest",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecom Relay Surcharge",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 534100,      "rate": 0.1,      "sur": true,      "tax": 0.5,      "lvl": 1,      "tid": 23    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E-911",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 534200,      "rate": 0.4,      "sur": false,      "tax": 4,      "lvl": 1,      "tid": 10    },    {      "bill": true,      "cmpl": true,      "tm": 0.5,      "calc": 1,      "cat": "EXCISE TAXES",      "cid": 4,      "name": "Federal Excise Tax",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "rate": 0.03,      "sur": false,      "tax": 0.015,      "lvl": 0,      "tid": 6    }  ]}
      ]
    }
  ]
}
```

## Example 2: Prorated adjustment

**View request**:

In this example, proration (`pror`) is set to 50% for 10 lines (`line`), and the adjustment flag (`adj`) is set to `true`.

-   Line Item 001 (ProAdjTest-0) sets the Pro-rated Adjustment Type (`proadj`) to`0`

-   Line Item 002 (ProAdjTest-1) sets the Pro-rated Adjustment Type (`proadj`) to`1`

-   Line Item 003 (ProAdjTest-2) sets the Pro-rated Adjustment Type (`proadj`) to`2`

```
{
  "cmpn": {
    "bscl": 1,
    "svcl": 0,
    "fclt": false,
    "frch": false,
    "reg": false
  },
  "inv": [
    {
      "bill": {"pcd": 534300
      },
      "cust": 1,
      "lfln": false,
      "date": "2018-05-15T12:00:00Z",
      "itms": [{  "ref": "ProAdjTest-0",  "chg": 0,  "line": 10,  "sale": 1,  "pror": 0.50,  "proadj": 0,  "tran": 7,  "serv": 42,  "adj": true,  "adjm": 0,  "disc": 0}
,{  "ref": "ProAdjTest-1",  "chg": 0,  "line": 10,  "sale": 1,  "pror": 0.50,  "proadj": 1,  "tran": 7,  "serv": 42,  "adj": true,  "adjm": 0,  "disc": 0},{  "ref": "ProAdjTest-2",  "chg": 0,  "line": 10,  "sale": 1,  "pror": 0.50,  "proadj": 2,  "tran": 7,  "serv": 42,  "adj": true,  "adjm": 0,  "disc": 0}
      ],
      "invm": false,
      "dtl": true,
      "summ": false
    }
  ]
}
```

**View response**:

The fixed tax amounts (`tax`) for Tax Type ID (`tid`) 10 are set to 0 when `proadj` is set to`0` and`1`.

The fixed tax amount (`tax`) for Tax Type ID (`tid`) 10 is returned with the negative tax amount when `proadj` is set to`2`.

```
{
  "inv": [
  {
    "itms": [
      {"ref": "ProAdjTest-0",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecom Relay Surcharge",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 534100,      "rate": 0.1,      "sur": true,      "tax": -0.5,      "lvl": 1,      "tid": 23    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E-911",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 534200,      "rate": 0.4,      "sur": false,      "tax": 0,      "lvl": 1,      "tid": 10    },    {      "bill": true,      "cmpl": true,      "tm": 0.5,      "calc": 1,      "cat": "EXCISE TAXES",      "cid": 4,      "name": "Federal Excise Tax",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 0,      "rate": 0.03,      "sur": false,      "tax": -0.015,      "lvl": 0,      "tid": 6    }  ]},{  "ref": "ProAdjTest-1",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecom Relay Surcharge",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 534100,      "rate": 0.1,      "sur": true,      "tax": -0.5,      "lvl": 1,      "tid": 23    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E-911",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 534200,      "rate": 0.4,      "sur": false,      "tax": 0,      "lvl": 1,      "tid": 10    },    {      "bill": true,      "cmpl": true,      "tm": 0.5,      "calc": 1,      "cat": "EXCISE TAXES",      "cid": 4,      "name": "Federal Excise Tax",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 0,      "rate": 0.03,      "sur": false,      "tax": -0.015,      "lvl": 0,      "tid": 6    }  ]},{  "ref": "ProAdjTest-2",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecom Relay Surcharge",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 534100,      "rate": 0.1,      "sur": true,      "tax": -0.5,      "lvl": 1,      "tid": 23    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E-911",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 534200,      "rate": 0.4,      "sur": false,      "tax": -4,      "lvl": 1,      "tid": 10    },    {      "bill": true,      "cmpl": true,      "tm": 0.5,      "calc": 1,      "cat": "EXCISE TAXES",      "cid": 4,      "name": "Federal Excise Tax",      "exm": 0,      "lns": -10,      "min": 0,      "pcd": 0,      "rate": 0.03,      "sur": false,      "tax": -0.015,      "lvl": 0,      "tid": 6    }  ]}
      ]
    }
  ]
}{  "ref": "ProrationTest",  "txs": [    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "CONNECTIVITY CHARGES",      "cid": 5,      "name": "Telecom Relay Surcharge",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 534100,      "rate": 0.1,      "sur": true,      "tax": 0.5,      "lvl": 1,      "tid": 23    },    {      "bill": true,      "cmpl": true,      "tm": 0,      "calc": 4,      "cat": "E-911 CHARGES",      "cid": 7,      "name": "E-911",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 534200,      "rate": 0.4,      "sur": false,      "tax": 4,      "lvl": 1,      "tid": 10    },    {      "bill": true,      "cmpl": true,      "tm": 0.5,      "calc": 1,      "cat": "EXCISE TAXES",      "cid": 4,      "name": "Federal Excise Tax",      "exm": 0,      "lns": 10,      "min": 0,      "pcd": 0,      "rate": 0.03,      "sur": false,      "tax": 0.015,      "lvl": 0,      "tid": 6    }  ]}
      ]
    }
  ]
}
```