# How to configure your taxes (https://developer.godaddy.com/en/docs/api-users/commerce/configure-taxes)

***

title: How to configure your taxes
description: Create and manage tax rates through the Tax GraphQL subgraph — the store-scoped endpoint for all tax configuration operations.
agentNotes:
permissions: \[]
scopes: \["commerce.tax:read", "commerce.tax:create", "commerce.tax:write", "commerce.tax:delete"]
idempotent: false
destructive: false
failureRecovery: "Query operations are safe to retry. For mutations, check the current rate state with the rates query before retrying to avoid duplicate creates."
related:
apis:

* title: "Tax GraphQL reference"
  href: "/docs/references/rest/taxes"
  guides:
* title: "Manage a store"
  href: "/docs/api-users/commerce/set-up-a-store"
* title: "Manage catalog items"
  href: "/docs/api-users/commerce/manage-catalog"
* title: "Process an order"
  href: "/docs/api-users/commerce/manage-orders-and-customers"
  concepts:
* title: "About the Commerce API"
  href: "/docs/api-users/commerce"
* title: "Authentication"
  href: "/docs/api-users/auth"
* title: "Rate limits"
  href: "/docs/api-users/rate-limits"
* title: "Paginate results"
  href: "/docs/api-users/pagination"

***

## Overview

Tax rates define what percentage is applied to purchases in your store. All Tax operations (reads, creates, status changes, and deletes) are GraphQL queries and mutations sent to `POST /v2/commerce/stores/{storeId}/tax-subgraph`. Send `x-store-id` on every request — that header is what the Tax subgraph authorizes against. If the header is missing, GraphQL returns `AUTHENTICATION_ERROR` (`Failed to authorize`) with HTTP 200. If the path `{storeId}` and header disagree, the header wins.

The Tax subgraph also supports Classifications, Jurisdictions, and Overrides for more advanced tax configurations. This article covers the core rate operations. Go to the [Tax GraphQL reference](https://developer.godaddy.com/docs/references/rest/taxes) for the full schema.

## Prerequisites

The following prerequisites are required before you can configure taxes:

* a GoDaddy account with an active commerce store
* a [Personal Access Token (PAT)](https://developer.godaddy.com/docs/api-users/auth) with the scopes for the operations you need (`commerce.tax:read` for queries; `commerce.tax:create`, `:write`, or `:delete` for the corresponding mutations)
* your `storeId`

  Go to [Your stores](https://developer.godaddy.com/docs/api-users/commerce#your-stores) to find your store ID.

## List tax rates

`rates(first, after, ...)` returns a paginated collection of rates. Results use edge-based cursor pagination. Go to [Paginate results](https://developer.godaddy.com/docs/api-users/pagination) for cursor-based pagination guidance. Optional `orderBy` takes **exactly one** of `id`, `name`, `createdAt`, or `updatedAt` with `ASC` or `DESC` — not `"desc"`, and not two keys in one object.

The following procedure retrieves the first page of tax rates.

1. Query the first 10 tax rates:

```bash tab="curl"
curl -s -X POST "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/tax-subgraph" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  -H "x-store-id: ${STORE_ID}" \
  -H "Content-Type: application/json" \
  -d '{"query": "query GetRates($first: Int) { rates(first: $first) { edges { node { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } } } pageInfo { hasNextPage endCursor } } }", "variables": {"first": 10}}'
```

```js tab="Node"
const token = process.env.GODADDY_PAT;
const storeId = process.env.STORE_ID;

const res = await fetch(
  `https://api.godaddy.com/v2/commerce/stores/${storeId}/tax-subgraph`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "x-store-id": storeId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: `query GetRates($first: Int) {
        rates(first: $first) {
          edges { node { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } } }
          pageInfo { hasNextPage endCursor }
        }
      }`,
      variables: { first: 10 },
    }),
  }
);
const data = await res.json();
console.log(data.data.rates);
```

```python tab="Python"
import os, requests

token = os.environ["GODADDY_PAT"]
store_id = os.environ["STORE_ID"]

res = requests.post(
    f"https://api.godaddy.com/v2/commerce/stores/{store_id}/tax-subgraph",
    headers={
        "Authorization": f"Bearer {token}",
        "x-store-id": store_id,
        "Content-Type": "application/json",
    },
    json={
        "query": "query GetRates($first: Int) { rates(first: $first) { edges { node { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } } } pageInfo { hasNextPage endCursor } } }",
        "variables": {"first": 10},
    },
)
res.raise_for_status()
print(res.json()["data"]["rates"])
```

```go tab="Go"
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
)

func main() {
    token := os.Getenv("GODADDY_PAT")
    storeId := os.Getenv("STORE_ID")

    payload := map[string]any{
        "query":     `query GetRates($first: Int) { rates(first: $first) { edges { node { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } } } pageInfo { hasNextPage endCursor } } }`,
        "variables": map[string]any{"first": 10},
    }
    body, _ := json.Marshal(payload)

    url := fmt.Sprintf("https://api.godaddy.com/v2/commerce/stores/%s/tax-subgraph", storeId)
    req, _ := http.NewRequest("POST", url, bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("x-store-id", storeId)
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()

    var result map[string]any
    json.NewDecoder(res.Body).Decode(&result)
    fmt.Println(result)
}
```

2. Review the paginated response:

```json
{
  "data": {
    "rates": {
      "edges": [
        {
          "node": {
            "id": "<TAX_RATE_ID>",
            "name": "<TAX_RATE_NAME>",
            "label": "<TAX_RATE_DISPLAY_LABEL>",
            "status": "<TAX_RATE_STATUS>",
            "value": {
              "__typename": "RatePercentage",
              "percentage": "<RATE_PERCENTAGE>"
            }
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "endCursor": "<PAGINATION_CURSOR>"
      }
    }
  }
}
```

## Get a tax rate

`rate(id: ID!)` retrieves a single tax rate by its ID.

The following procedure reads a single tax rate by ID.

* Retrieve a tax rate by its `id`:

```bash tab="curl"
RATE_ID="<TAX_RATE_ID>"

curl -s -X POST "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/tax-subgraph" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  -H "x-store-id: ${STORE_ID}" \
  -H "Content-Type: application/json" \
  -d "{\"query\": \"query GetRate(\$id: ID!) { rate(id: \$id) { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } createdAt } }\", \"variables\": {\"id\": \"${RATE_ID}\"}}"
```

```js tab="Node"
const token = process.env.GODADDY_PAT;
const storeId = process.env.STORE_ID;
const rateId = "<TAX_RATE_ID>";

const res = await fetch(
  `https://api.godaddy.com/v2/commerce/stores/${storeId}/tax-subgraph`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "x-store-id": storeId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: `query GetRate($id: ID!) { rate(id: $id) { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } createdAt } }`,
      variables: { id: rateId },
    }),
  }
);
const data = await res.json();
console.log(data.data.rate);
```

```python tab="Python"
import os, requests

token = os.environ["GODADDY_PAT"]
store_id = os.environ["STORE_ID"]
rate_id = "<TAX_RATE_ID>"

res = requests.post(
    f"https://api.godaddy.com/v2/commerce/stores/{store_id}/tax-subgraph",
    headers={
        "Authorization": f"Bearer {token}",
        "x-store-id": store_id,
        "Content-Type": "application/json",
    },
    json={
        "query": "query GetRate($id: ID!) { rate(id: $id) { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } createdAt } }",
        "variables": {"id": rate_id},
    },
)
res.raise_for_status()
print(res.json()["data"]["rate"])
```

```go tab="Go"
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
)

func main() {
    token := os.Getenv("GODADDY_PAT")
    storeId := os.Getenv("STORE_ID")
    rateId := "<TAX_RATE_ID>"

    payload := map[string]any{
        "query":     `query GetRate($id: ID!) { rate(id: $id) { id name label status value { __typename ... on RatePercentage { percentage } ... on RateAmount { amount { value currencyCode } } } createdAt } }`,
        "variables": map[string]any{"id": rateId},
    }
    body, _ := json.Marshal(payload)

    url := fmt.Sprintf("https://api.godaddy.com/v2/commerce/stores/%s/tax-subgraph", storeId)
    req, _ := http.NewRequest("POST", url, bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("x-store-id", storeId)
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()

    var result map[string]any
    json.NewDecoder(res.Body).Decode(&result)
    fmt.Println(result)
}
```

## Create a tax rate

`createRate(input: MutationCreateRateInput!)` creates a new rate. `label` and `value` are required. `name` is generated from the label when omitted. `status` defaults to `ACTIVE`. `value` is a `RateValueInput`: set `percentage` (string, out of 100) or `amount` (`{ value, currencyCode }`), not both. For `amount.value`, send integer minor units (`850`, not `8.5`).

Optional input fields from the schema: `calculationMethod` (`ADDITIVE` or `INCLUSIVE`; defaults to `ADDITIVE`), `description`, `jurisdictionId`, `metafields`, and `references`. You can omit `metafields` and `references` entirely. If you send `metafields`, the array must be nonempty — `[]` is rejected. Don't send `createdAt` or `updatedAt` — those fields exist only for Tax v1 to v2 migration. For metafields, prefer `type: "string"` (lowercase).

When you **read** a rate, `value` is a union. Select it with inline fragments (`... on RatePercentage` / `... on RateAmount`) — there is no `value { rate }` field.

The following procedure creates a new tax rate.

1. Create a tax rate with a label and value:

```bash tab="curl"
curl -s -X POST "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/tax-subgraph" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  -H "x-store-id: ${STORE_ID}" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation CreateRate($input: MutationCreateRateInput!) { createRate(input: $input) { id name label status createdAt } }",
    "variables": {
      "input": {
        "label": "<TAX_RATE_DISPLAY_LABEL>",
        "name": "<TAX_RATE_UNIQUE_NAME>",
        "value": { "percentage": "8.5" }
      }
    }
  }'
```

```js tab="Node"
const token = process.env.GODADDY_PAT;
const storeId = process.env.STORE_ID;

const res = await fetch(
  `https://api.godaddy.com/v2/commerce/stores/${storeId}/tax-subgraph`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "x-store-id": storeId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: `mutation CreateRate($input: MutationCreateRateInput!) {
        createRate(input: $input) { id name label status createdAt }
      }`,
      variables: {
        input: {
          label: "<TAX_RATE_DISPLAY_LABEL>",
          name: "<TAX_RATE_UNIQUE_NAME>",
          value: { percentage: "8.5" },
        },
      },
    }),
  }
);
const data = await res.json();
console.log(data.data.createRate);
```

```python tab="Python"
import os, requests

token = os.environ["GODADDY_PAT"]
store_id = os.environ["STORE_ID"]

res = requests.post(
    f"https://api.godaddy.com/v2/commerce/stores/{store_id}/tax-subgraph",
    headers={
        "Authorization": f"Bearer {token}",
        "x-store-id": store_id,
        "Content-Type": "application/json",
    },
    json={
        "query": "mutation CreateRate($input: MutationCreateRateInput!) { createRate(input: $input) { id name label status createdAt } }",
        "variables": {
            "input": {
                "label": "<TAX_RATE_DISPLAY_LABEL>",
                "name": "<TAX_RATE_UNIQUE_NAME>",
                "value": {"percentage": "8.5"},
            }
        },
    },
)
res.raise_for_status()
print(res.json()["data"]["createRate"])
```

```go tab="Go"
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
)

func main() {
    token := os.Getenv("GODADDY_PAT")
    storeId := os.Getenv("STORE_ID")

    payload := map[string]any{
        "query": `mutation CreateRate($input: MutationCreateRateInput!) {
            createRate(input: $input) { id name label status createdAt }
        }`,
        "variables": map[string]any{
            "input": map[string]any{
                "label": "<TAX_RATE_DISPLAY_LABEL>",
                "name":  "<TAX_RATE_UNIQUE_NAME>",
                "value": map[string]any{"percentage": "8.5"},
            },
        },
    }
    body, _ := json.Marshal(payload)

    url := fmt.Sprintf("https://api.godaddy.com/v2/commerce/stores/%s/tax-subgraph", storeId)
    req, _ := http.NewRequest("POST", url, bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("x-store-id", storeId)
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()

    var result map[string]any
    json.NewDecoder(res.Body).Decode(&result)
    fmt.Println(result)
}
```

2. Save the `id` from the response (you'll need it to activate or modify the rate):

```json
{
  "data": {
    "createRate": {
      "id": "<TAX_RATE_ID>",
      "name": "<TAX_RATE_UNIQUE_NAME>",
      "label": "<TAX_RATE_DISPLAY_LABEL>",
      "status": "ACTIVE",
      "createdAt": "<ISO8601_CREATED_TIMESTAMP>"
    }
  }
}
```

## Activate a tax rate

`activateRate(id: ID!)` sets a rate's status to `ACTIVE`. Requires `commerce.tax:write`.

The following procedure activates an existing tax rate.

1. Activate a rate by its `id`:

```bash tab="curl"
RATE_ID="<TAX_RATE_ID>"

curl -s -X POST "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/tax-subgraph" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  -H "x-store-id: ${STORE_ID}" \
  -H "Content-Type: application/json" \
  -d "{\"query\": \"mutation ActivateRate(\$id: ID!) { activateRate(id: \$id) { id label status activatedAt } }\", \"variables\": {\"id\": \"${RATE_ID}\"}}"
```

```js tab="Node"
const token = process.env.GODADDY_PAT;
const storeId = process.env.STORE_ID;
const rateId = "<TAX_RATE_ID>";

const res = await fetch(
  `https://api.godaddy.com/v2/commerce/stores/${storeId}/tax-subgraph`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "x-store-id": storeId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: `mutation ActivateRate($id: ID!) { activateRate(id: $id) { id label status activatedAt } }`,
      variables: { id: rateId },
    }),
  }
);
const data = await res.json();
console.log(data.data.activateRate);
```

```python tab="Python"
import os, requests

token = os.environ["GODADDY_PAT"]
store_id = os.environ["STORE_ID"]
rate_id = "<TAX_RATE_ID>"

res = requests.post(
    f"https://api.godaddy.com/v2/commerce/stores/{store_id}/tax-subgraph",
    headers={
        "Authorization": f"Bearer {token}",
        "x-store-id": store_id,
        "Content-Type": "application/json",
    },
    json={
        "query": "mutation ActivateRate($id: ID!) { activateRate(id: $id) { id label status activatedAt } }",
        "variables": {"id": rate_id},
    },
)
res.raise_for_status()
print(res.json()["data"]["activateRate"])
```

```go tab="Go"
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
)

func main() {
    token := os.Getenv("GODADDY_PAT")
    storeId := os.Getenv("STORE_ID")
    rateId := "<TAX_RATE_ID>"

    payload := map[string]any{
        "query":     `mutation ActivateRate($id: ID!) { activateRate(id: $id) { id label status activatedAt } }`,
        "variables": map[string]any{"id": rateId},
    }
    body, _ := json.Marshal(payload)

    url := fmt.Sprintf("https://api.godaddy.com/v2/commerce/stores/%s/tax-subgraph", storeId)
    req, _ := http.NewRequest("POST", url, bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("x-store-id", storeId)
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()

    var result map[string]any
    json.NewDecoder(res.Body).Decode(&result)
    fmt.Println(result)
}
```

2. Confirm the rate status updated to `ACTIVE`:

```json
{
  "data": {
    "activateRate": {
      "id": "<TAX_RATE_ID>",
      "label": "<TAX_RATE_DISPLAY_LABEL>",
      "status": "ACTIVE",
      "activatedAt": "<ISO8601_ACTIVATED_TIMESTAMP>"
    }
  }
}
```

## Deactivate a tax rate

`deactivateRate(id: ID!)` sets a rate's status to `INACTIVE`. Requires `commerce.tax:write`. Deactivated rates no longer apply to purchases.

The following procedure deactivates an active tax rate.

1. Deactivate a rate by its `id`:

```bash tab="curl"
RATE_ID="<TAX_RATE_ID>"

curl -s -X POST "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/tax-subgraph" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  -H "x-store-id: ${STORE_ID}" \
  -H "Content-Type: application/json" \
  -d "{\"query\": \"mutation DeactivateRate(\$id: ID!) { deactivateRate(id: \$id) { id label status } }\", \"variables\": {\"id\": \"${RATE_ID}\"}}"
```

```js tab="Node"
const token = process.env.GODADDY_PAT;
const storeId = process.env.STORE_ID;
const rateId = "<TAX_RATE_ID>";

const res = await fetch(
  `https://api.godaddy.com/v2/commerce/stores/${storeId}/tax-subgraph`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "x-store-id": storeId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: `mutation DeactivateRate($id: ID!) { deactivateRate(id: $id) { id label status } }`,
      variables: { id: rateId },
    }),
  }
);
const data = await res.json();
console.log(data.data.deactivateRate);
```

```python tab="Python"
import os, requests

token = os.environ["GODADDY_PAT"]
store_id = os.environ["STORE_ID"]
rate_id = "<TAX_RATE_ID>"

res = requests.post(
    f"https://api.godaddy.com/v2/commerce/stores/{store_id}/tax-subgraph",
    headers={
        "Authorization": f"Bearer {token}",
        "x-store-id": store_id,
        "Content-Type": "application/json",
    },
    json={
        "query": "mutation DeactivateRate($id: ID!) { deactivateRate(id: $id) { id label status } }",
        "variables": {"id": rate_id},
    },
)
res.raise_for_status()
print(res.json()["data"]["deactivateRate"])
```

```go tab="Go"
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
)

func main() {
    token := os.Getenv("GODADDY_PAT")
    storeId := os.Getenv("STORE_ID")
    rateId := "<TAX_RATE_ID>"

    payload := map[string]any{
        "query":     `mutation DeactivateRate($id: ID!) { deactivateRate(id: $id) { id label status } }`,
        "variables": map[string]any{"id": rateId},
    }
    body, _ := json.Marshal(payload)

    url := fmt.Sprintf("https://api.godaddy.com/v2/commerce/stores/%s/tax-subgraph", storeId)
    req, _ := http.NewRequest("POST", url, bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("x-store-id", storeId)
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()

    var result map[string]any
    json.NewDecoder(res.Body).Decode(&result)
    fmt.Println(result)
}
```

2. Confirm the rate status updated to `INACTIVE`:

```json
{
  "data": {
    "deactivateRate": {
      "id": "<TAX_RATE_ID>",
      "label": "<TAX_RATE_DISPLAY_LABEL>",
      "status": "INACTIVE"
    }
  }
}
```

## Delete a tax rate

`deleteRate(id: ID!)` permanently removes a tax rate. Requires `commerce.tax:delete`. This action can't be undone. Use `deactivateRate` instead if you might need the rate again.

The following procedure deletes a tax rate.

1. Delete a rate by its `id`:

```bash tab="curl"
RATE_ID="<TAX_RATE_ID>"

curl -s -X POST "https://api.godaddy.com/v2/commerce/stores/${STORE_ID}/tax-subgraph" \
  -H "Authorization: Bearer $GODADDY_PAT" \
  -H "x-store-id: ${STORE_ID}" \
  -H "Content-Type: application/json" \
  -d "{\"query\": \"mutation DeleteRate(\$id: ID!) { deleteRate(id: \$id) { id label } }\", \"variables\": {\"id\": \"${RATE_ID}\"}}"
```

```js tab="Node"
const token = process.env.GODADDY_PAT;
const storeId = process.env.STORE_ID;
const rateId = "<TAX_RATE_ID>";

const res = await fetch(
  `https://api.godaddy.com/v2/commerce/stores/${storeId}/tax-subgraph`,
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${token}`,
      "x-store-id": storeId,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      query: `mutation DeleteRate($id: ID!) { deleteRate(id: $id) { id label } }`,
      variables: { id: rateId },
    }),
  }
);
const data = await res.json();
console.log(data);
```

```python tab="Python"
import os, requests

token = os.environ["GODADDY_PAT"]
store_id = os.environ["STORE_ID"]
rate_id = "<TAX_RATE_ID>"

res = requests.post(
    f"https://api.godaddy.com/v2/commerce/stores/{store_id}/tax-subgraph",
    headers={
        "Authorization": f"Bearer {token}",
        "x-store-id": store_id,
        "Content-Type": "application/json",
    },
    json={
        "query": "mutation DeleteRate($id: ID!) { deleteRate(id: $id) { id label } }",
        "variables": {"id": rate_id},
    },
)
res.raise_for_status()
print(res.json())
```

```go tab="Go"
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "os"
)

func main() {
    token := os.Getenv("GODADDY_PAT")
    storeId := os.Getenv("STORE_ID")
    rateId := "<TAX_RATE_ID>"

    payload := map[string]any{
        "query":     `mutation DeleteRate($id: ID!) { deleteRate(id: $id) { id label } }`,
        "variables": map[string]any{"id": rateId},
    }
    body, _ := json.Marshal(payload)

    url := fmt.Sprintf("https://api.godaddy.com/v2/commerce/stores/%s/tax-subgraph", storeId)
    req, _ := http.NewRequest("POST", url, bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer "+token)
    req.Header.Set("x-store-id", storeId)
    req.Header.Set("Content-Type", "application/json")

    res, err := http.DefaultClient.Do(req)
    if err != nil { panic(err) }
    defer res.Body.Close()

    var result map[string]any
    json.NewDecoder(res.Body).Decode(&result)
    fmt.Println(result)
}
```

2. `deleteRate` returns the deleted `Rate` object. Selecting no subfields is a GraphQL validation error (`Field "deleteRate" of type "Rate" must have a selection of subfields`).

```json
{
  "data": {
    "deleteRate": {
      "id": "<TAX_RATE_ID>",
      "label": "<TAX_RATE_DISPLAY_LABEL>"
    }
  }
}
```

## Common errors

| Status                                                      | Most likely cause                                                                                | Note                                                                                                                    |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| `200` with `errors[].extensions.code: AUTHENTICATION_ERROR` | `x-store-id` is missing or is not a store this token can access.                                 | Authorization uses the header, not the path `{storeId}`.                                                                |
| `400`                                                       | GraphQL selection or variables are invalid.                                                      | `deleteRate` must select fields on `Rate`. `Rate.value` is a union — use `... on RatePercentage` / `... on RateAmount`. |
| `401`                                                       | PAT is missing or expired. Go to [Authentication](https://developer.godaddy.com/docs/api-users/auth) to generate a new token. |                                                                                                                         |
| `403`                                                       | Token doesn't include the required scope for the operation.                                      |                                                                                                                         |
| `404`                                                       | Tax rate ID doesn't exist or isn't accessible with the provided token.                           |                                                                                                                         |
| `429`                                                       | Rate limit exceeded.                                                                             | Honor the `Retry-After` header before retrying.                                                                         |
