# Price-based tax rules

Change a class's tax rate when an item's unit price goes above a threshold.

Price-based tax rules belong to a market and use `read_markets` / `write_markets`. They are available only for single-country, single-currency markets, with at most one rule per tax class. The pricing engine compares each unit price after merchandise discounts and before tax with the threshold, applies `below_rate` at or below it and `above_rate` above it, and then calculates duties and order totals.

## General tax settings

Three settings on the market itself decide how all of this applies: `tax_enabled` (whether tax is collected at all; when false, orders in the market carry no tax whatever the classes, zones and rates say), `tax_included` (whether catalog prices are entered with tax included) and `tax_display_mode` (`inclusive` or `exclusive`: how storefront prices are shown, independently of how they are entered). Read them on the market and change them with Update a market (`PATCH /api/2025-01/markets/{marketId}`) on the [Markets](/store-api/markets/markets) page; changing `tax_included` asks for confirmation first. New markets collect tax with tax-exclusive prices, shown without tax.

## Compare the price before tax

A price-based rule sets the rate for one tax class by an item's unit price after merchandise discounts and before tax. For tax-inclusive prices the price compared is the price without tax at `below_rate`. At or below the threshold `below_rate` applies; above it, `above_rate`. For example, a rule with threshold `1000.00`, `below_rate` `5.00`, and `above_rate` `12.00` taxes a discounted unit priced at `1000.00` at 5%, and a unit priced at `1000.01` at 12%. The rule's rate is shared between the class's rate lines in proportion to their ordinary rates, so CGST 9% and SGST 9% under a 5% rule are charged as CGST 2.5% and SGST 2.5%. Shipping, cash-on-delivery charges, and checkout fees continue using their own tax classes and rates.

## Check eligibility first

Price thresholds are meaningful only in one jurisdiction and one currency, so these rules are available only when the market has exactly one country and one currency. Call the eligibility endpoint before presenting the feature. Each class may have one rule, and its ordinary zone rates must still exist wherever the class should be taxed.

```json
// POST /api/2025-01/markets/{marketId}/tax-price-rules
{
  "tax_class_id": "7c9e4f2b-1a3d-4e5f-8b6c-2d0e1f3a4b5c",
  "threshold_price": "1000.00",
  "below_rate": "5.00",
  "above_rate": "12.00"
}
```

## Endpoints

## Check price-rule eligibility

`GET /api/2025-01/markets/{marketId}/tax-price-rules/eligibility`

Returns eligible only when the market has exactly one country and one currency. A threshold is jurisdiction-specific and currency-specific, while the current rule is scoped to the market and tax class. When it is not eligible, `reason` says why in English. `threshold_max` is the largest threshold_price accepted.

Scope: `read_markets`

Response:

```json
{"success":true,"data":{"eligible":true,"country_count":1,"currency_count":1,"threshold_max":"99999999999.9999"}}
```

## List price-based tax rules

`GET /api/2025-01/markets/{marketId}/tax-price-rules`

Each rule changes item tax for one tax class according to the final unit price after discounts. Rules do not apply to shipping, COD, or checkout fees. The class must still have an ordinary rate in each applicable zone. Where the matched zone's rates for the class add up to 0% (exports, zero-rated zones), the rule is skipped and no tax is charged; catalog price estimates skip it there too. While rules exist, a market update that adds a second country is refused with `TAX_PRICE_RULE_BLOCKS_MULTI_COUNTRY`, one that adds a second currency with `TAX_PRICE_RULE_BLOCKS_MULTI_CURRENCY`, and one that replaces the market's currency with `TAX_PRICE_RULE_BLOCKS_CURRENCY_CHANGE`: a threshold is an amount in one country's currency.

Scope: `read_markets`

Response:

```json
{"success":true,"data":{"price_rules":[{"id":"4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d","store_id":"1f0e2d3c-4b5a-6978-8695-a4b3c2d1e0f9","market_id":"9a1f2c3d-4e5f-6789-abcd-ef0123456789","tax_class_id":"7c9e4f2b-1a3d-4e5f-8b6c-2d0e1f3a4b5c","market_name":"United States","tax_class_name":"Footwear","threshold_price":"110.00","below_rate":"4","above_rate":"8","currency_code":"USD","created_at":"2026-07-15T08:00:00-04:00","updated_at":"2026-07-15T08:00:00-04:00"}]}}
```

## Get a price-based tax rule

`GET /api/2025-01/markets/{marketId}/tax-price-rules/{ruleId}`

Returns the rule and its market, class, currency, threshold, and below/above rates.

Scope: `read_markets`

Response:

```json
{"success":true,"data":{"price_rule":{"id":"4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d","store_id":"1f0e2d3c-4b5a-6978-8695-a4b3c2d1e0f9","market_id":"9a1f2c3d-4e5f-6789-abcd-ef0123456789","tax_class_id":"7c9e4f2b-1a3d-4e5f-8b6c-2d0e1f3a4b5c","market_name":"United States","tax_class_name":"Footwear","threshold_price":"110.00","below_rate":"4","above_rate":"8","currency_code":"USD","created_at":"2026-07-15T08:00:00-04:00","updated_at":"2026-07-15T08:00:00-04:00"}}}
```

## Create a price-based tax rule

`POST /api/2025-01/markets/{marketId}/tax-price-rules`

Requires a single-country, single-currency market and allows one rule per tax class. The threshold is a decimal string in the market currency, compared with each item's unit price after discounts and before tax (for tax-inclusive prices, the price without tax at `below_rate`); at the threshold `below_rate` applies. The two rates must differ, but either may be higher. The class must have ordinary zone rates wherever the rule should apply: the rule's rate is shared between those rate lines in proportion to their ordinary rates, so a 4% state rate + 4% county rate under a 2% rule are charged as 1% + 1%. In a zone whose rates for the class total 0%, the rule is skipped. Fires `tax_price_rules/create`.

Scope: `write_markets`

Response:

```json
{"success":true,"data":{"price_rule":{"id":"4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d","store_id":"1f0e2d3c-4b5a-6978-8695-a4b3c2d1e0f9","market_id":"9a1f2c3d-4e5f-6789-abcd-ef0123456789","tax_class_id":"7c9e4f2b-1a3d-4e5f-8b6c-2d0e1f3a4b5c","market_name":"United States","tax_class_name":"Footwear","threshold_price":"110.00","below_rate":"4","above_rate":"8","currency_code":"USD","created_at":"2026-07-15T08:00:00-04:00","updated_at":"2026-07-15T08:00:00-04:00"}},"code":"TAX_PRICE_RULE_CREATED","message":"Price-based tax rule created."}
```

## Update a price-based tax rule

`PUT /api/2025-01/markets/{marketId}/tax-price-rules/{ruleId}`

Updates the threshold and below/above rates. The two rates must differ, but either may be higher. Fires `tax_price_rules/update`.

Scope: `write_markets`

Response:

```json
{"success":true,"data":{"price_rule":{"id":"4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d","store_id":"1f0e2d3c-4b5a-6978-8695-a4b3c2d1e0f9","market_id":"9a1f2c3d-4e5f-6789-abcd-ef0123456789","tax_class_id":"7c9e4f2b-1a3d-4e5f-8b6c-2d0e1f3a4b5c","market_name":"United States","tax_class_name":"Footwear","threshold_price":"110.00","below_rate":"4","above_rate":"8","currency_code":"USD","created_at":"2026-07-15T08:00:00-04:00","updated_at":"2026-07-15T08:00:00-04:00"}},"code":"TAX_PRICE_RULE_UPDATED","message":"Price-based tax rule updated."}
```

## Delete a price-based tax rule

`DELETE /api/2025-01/markets/{marketId}/tax-price-rules/{ruleId}`

Deletes the rule without changing ordinary tax rates. Fires `tax_price_rules/delete`.

Scope: `write_markets`

Response:

```json
{"success":true,"data":{"success":true},"code":"TAX_PRICE_RULE_DELETED","message":"Price-based tax rule deleted."}
```

## Webhook events

Price-rule events are published for every create, update, and delete, and the saved change and its event become visible together. Payloads include the class, market currency, threshold, and both rates.

## Price-based tax rule created

Event: `tax_price_rules/create` · App scope: `read_markets` · Staff permission: `markets:write`

Subscribe to receive a price-based tax rule after it is created for a market's tax class.

```json
{
  "tax_price_rule": {
    "above_rate": "8",
    "below_rate": "4",
    "created_at": "2026-06-09T12:00:00-04:00",
    "currency_code": "USD",
    "id": "6d1f3a4b-5c7e-4890-9a2b-3c4d5e6f7081",
    "market_id": "9a1f2c3d-4e5f-6789-abcd-ef0123456789",
    "market_name": "United States",
    "tax_class_id": "4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d",
    "tax_class_name": "Footwear",
    "threshold_price": "110.00",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Price-based tax rule updated

Event: `tax_price_rules/update` · App scope: `read_markets` · Staff permission: `markets:write`

Subscribe to receive the current price-based tax rule after its threshold or below-and-above rates change.

```json
{
  "changed_fields": [
    "threshold_price"
  ],
  "tax_price_rule": {
    "above_rate": "8",
    "below_rate": "4",
    "created_at": "2026-06-09T12:00:00-04:00",
    "currency_code": "USD",
    "id": "6d1f3a4b-5c7e-4890-9a2b-3c4d5e6f7081",
    "market_id": "9a1f2c3d-4e5f-6789-abcd-ef0123456789",
    "market_name": "United States",
    "tax_class_id": "4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d",
    "tax_class_name": "Footwear",
    "threshold_price": "110.00",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Price-based tax rule deleted

Event: `tax_price_rules/delete` · App scope: `read_markets` · Staff permission: `markets:write`

Subscribe to remove a deleted price-based tax rule from your integration. The payload keeps its rule, market, and tax class ids.

```json
{
  "tax_price_rule": {
    "id": "6d1f3a4b-5c7e-4890-9a2b-3c4d5e6f7081",
    "market_id": "9a1f2c3d-4e5f-6789-abcd-ef0123456789",
    "tax_class_id": "4e2b8c1a-7f3d-4a5b-9c6d-1e0f2a3b4c5d"
  }
}
```

