# Taxability of retail delivery fees

Source: https://developer.avalara.com/sales-tax-integration-guide/xpx2826772007836/

# Taxability of retail delivery fees

Learn how AvaTax calculates retail delivery fees for states that impose them, and how to trigger the calculation with a $0.00 line item.

Certain states, including Colorado and Minnesota, impose a statutory retail delivery fee on deliveries that contain taxable tangible personal property. Enabling a sales tax nexus in these states doesn't automatically trigger retail delivery fee calculations or prompt merchants to configure retail delivery fee returns.

To calculate and report retail delivery fees accurately, integrations use a $0.00 line item that is mapped to the Avalara retail delivery fee tax code.

When an order is subject to a state retail delivery fee, your integration adds a dedicated fee line item to the `CreateTransaction` payload.

-   **Tax code mapping:** Assign the Avalara tax code `OF400000` for Retail Delivery Fee to the delivery fee line item.

-   **Line amount:** Pass an amount of `$0.00`, or the statutory fee amount if you collect the fee directly from the customer.

-   **Automatic taxability evaluation:** When AvaTax processes a line item with the tax code `OF400000`, it evaluates the other items in the transaction.

    -   If the transaction contains at least 1 taxable physical item with a positive dollar amount, AvaTax calculates the state-mandated delivery fee on the `OF400000` line.

    -   If all items in the transaction are exempt or nontaxable, AvaTax evaluates the fee as $0.00.

    -   In jurisdictions where retail delivery fees are also subject to local sales tax, including certain Colorado home-rule cities, AvaTax calculates the applicable local sales tax on the fee amount.

To support retail delivery fees in your integration:

-   **Add a delivery fee line:** When you create a transaction for a destination in a state with a retail delivery fee, include a line item with these values:

    -   `amount`: `0.00`

    -   `quantity`: `1`

    -   `taxCode`: `OF400000`

    -   `itemCode`: A unique SKU or identifier for the delivery fee, for example, `RDF-FEE`

-   **Call timing:** Include the RDF line item in the `CreateTransaction` calculation call with the items and shipping lines before payment authorization.

-   **Filing configuration:** Inform merchants that they must configure and schedule the state-specific retail delivery fee return in AvaTax, such as the Colorado DR 1786 return, in addition to establishing sales tax nexus.

The following example shows an `OF400000` retail delivery fee line item in a `CreateTransaction` request:

```
{
  "number": "3",
  "quantity": 1,
  "amount": 0.00,
  "taxCode": "OF400000",
  "itemCode": "RETAIL-DELIVERY-FEE",
  "description": "State Retail Delivery Fee",
  "discounted": false
}
```