> ## Documentation Index
> Fetch the complete documentation index at: https://shipmagic-docs.speedysquirrelhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Customs, Fees and Tariffs

> Add duties, customs charges and fees into your shipping rates

**Tariff rules** let you add custom charges into the ShipMagic rates, without touching the rules that calculate the shipping itself.

Tariff rules are configured on the app's **Settings** page, under **Customs, Fees & Tariffs**.

## Where tariffs run

Tariffs are the last step in the pricing pipeline:

```
Rate calculation  ->  Blending  ->  Tariffs
```

This ordering matters. Because tariffs run *after* blending, the charge lands on the rates the customer will actually be shown — including rates that several rules combined into one. You don't have to think about which rule produced a rate, only about the rate itself.

## Creating a rule

<Steps>
  <Step title="Open the section">
    Go to **Settings** and scroll to **Customs, Fees & Tariffs**, just below Blending. Click **Add**.
  </Step>

  <Step title="Name the rule">
    Give it a name you'll recognise, such as `EU low-value import duty`. This is internal — customers never see it. Set **Status** to Enabled or Disabled.
  </Step>

  <Step title="Add conditions">
    Decide which cart items the charge is calculated on, and which destinations it applies to.
  </Step>

  <Step title="Set the charge">
    Choose an amount type, an amount, and — for fixed amounts — how often it is charged.
  </Step>

  <Step title="Choose the shipping rates">
    Apply it to every rate, or only to rates you name.
  </Step>
</Steps>

## Conditions

A tariff rule is built from conditions, the same way a shipping rule is. **Rule must match** decides whether an item has to satisfy **All conditions** or **Any condition**.

| Attribute          | Matches on                     |
| ------------------ | ------------------------------ |
| **Product Tag**    | Tags on the product            |
| **Product Type**   | The product's type             |
| **Product Vendor** | The product's vendor           |
| **Country Code**   | Where the order is shipping to |

<Note>
  **Product Tag** and **Product Type** are read from your synced product data. If a product hasn't been synced, those conditions won't match it. See [Syncing Products](/core-concepts/syncing-products).
</Note>

## The charge

### Amount type

| Type                        | What it calculates                                                 |
| --------------------------- | ------------------------------------------------------------------ |
| **Fixed amount**            | A flat sum, charged once per unit, line, category or order         |
| **% of matched item value** | A percentage of the value of the items that matched the conditions |
| **% of shipping rate**      | A percentage of the shipping rate the tariff is being added to     |

Amounts are in your store's currency and are not converted.

### Charge basis

**Charge basis** appears only for **Fixed amount**. The two percentage types produce the same total however you slice them, so there is nothing to choose.

Take a cart of three lines — two of them tagged `electronics`, one tagged `apparel` — with a rule of **Product Tag equals** `electronics, apparel` and a fixed charge of €3:

| Cart line        | Quantity | Tag           |
| ---------------- | -------- | ------------- |
| Wireless earbuds | 2        | `electronics` |
| Cotton t-shirt   | 1        | `apparel`     |
| USB cable        | 3        | `electronics` |

| Charge basis          | Charged                              | Total |
| --------------------- | ------------------------------------ | ----- |
| **Per unit**          | 6 times, once per item in the cart   | €18   |
| **Per line item**     | 3 times, once per matching cart line | €9    |
| **Per item category** | 2 times, once per tag                | €6    |
| **Once per order**    | 1 time                               | €3    |

## Which shipping rates it applies to

Apply the tariff to **All shipping rates**, or name the ones you want. A charge is only ever added if that rate is in the final list returned to checkout, so a rule naming a rate that didn't survive blending simply does nothing.

## Showing the charge to the customer

Shopify's rate API has no separate line for surcharges, so the tariff is added into the shipping rate's price. If you want the customer to know why, fill in **Add to rate description**. The token `{amount}` is replaced with the charge:

```
Includes {amount} import duty
```

That appears beneath the rate name at checkout, alongside any [rate description](/rate-descriptions) you've already set.

## Using several rules together

Every rule that matches is applied, and the charges add up. Percentages are always calculated against the rate's price **before** any tariff was added, so the order your rules happen to be listed in never changes the total.

## Example: the EU low-value import duty

From 1 July 2026 the EU applies a flat €3 customs duty per item on low-value e-commerce consignments. Here is one way to set that up:

| Field                       | Value                                                                                                                                |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **Name**                    | EU low-value import duty                                                                                                             |
| **Rule must match**         | All conditions                                                                                                                       |
| **Condition**               | Country Code · equals · `AT; BE; BG; HR; CY; CZ; DK; EE; FI; FR; DE; GR; HU; IE; IT; LV; LT; LU; MT; NL; PL; PT; RO; SK; SI; ES; SE` |
| **Amount type**             | Fixed amount                                                                                                                         |
| **Amount**                  | 3                                                                                                                                    |
| **Charge basis**            | Per item category                                                                                                                    |
| **Apply to**                | All shipping rates                                                                                                                   |
| **Add to rate description** | Includes `{amount}` EU import duty                                                                                                   |

## Related

<Columns cols={2}>
  <Card title="Rate blending" icon="code-merge" href="/rate-blending">
    What runs immediately before tariffs.
  </Card>

  <Card title="Syncing products" icon="arrows-rotate" href="/core-concepts/syncing-products">
    Required for tag and type conditions.
  </Card>

  <Card title="Rate descriptions" icon="message-lines" href="/rate-descriptions">
    The text the tariff description is appended to.
  </Card>

  <Card title="Country and province codes" icon="globe" href="/country-and-province-codes">
    The codes to use in a destination condition.
  </Card>
</Columns>
