Repository: medusajs/medusa
Pull request #12450: fix(dashboard, medusa): validate provider for top level tax regions
Author: login: fPolic
Labels: name: type: bug
name: team: medusa
Created: 2025-05-12T13:12:45Z | Merged: 2025-05-12T16:04:48Z

**What**
- prevent top level tax region creation without a provider on Admin and in HTTP validation layer


Diff:
diff --git a/.changeset/old-carrots-develop.md b/.changeset/old-carrots-develop.md
new file mode 100644
index 0000000000000..55e2847b25d42
--- /dev/null
+++ b/.changeset/old-carrots-develop.md
@@ -0,0 +1,6 @@
+---
+"@medusajs/dashboard": patch
+"@medusajs/medusa": patch
+---
+
+fix(dashboard, medusa): validate provider exists when creating a top level tax region
diff --git a/integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts b/integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts
index d7c9922114c0f..492227f942163 100644
--- a/integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts
+++ b/integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts
@@ -20,12 +20,22 @@ medusaIntegrationTestRunner({
         let taxRegion
 
         beforeEach(async () => {
+          const parentRegion = await api.post(
+            "/admin/tax-regions",
+            {
+              country_code: "us",
+              provider_id: "tp_system",
+            },
+            adminHeaders
+          )
+
           taxRegion = (
             await api.post(
               "/admin/tax-regions",
               {
                 country_code: "us",
                 province_code: "tx",
+                parent_id: parentRegion.data.tax_region.id,
                 metadata: { test: "created" },
               },
               adminHeaders
@@ -83,6 +93,49 @@ medusaIntegrationTestRunner({
           )
         })
 
+        it("should create a province tax region without a provider", async () => {
+          const response = await api.post(
+            `/admin/tax-regions`,
+            {
+              country_code: "us",
+              parent_id: taxRegion.id,
+              province_code: "ny",
+            },
+            adminHeaders
+          )
+
+          expect(response.status).toEqual(200)
+          expect(response.data.tax_region).toEqual(
+            expect.objectContaining({
+              id: expect.any(String),
+              country_code: "us",
+              province_code: "ny",
+              provider_id: null,
+            })
+          )
+        })
+
+        it("should fail to create a country tax region without a provider", async () => {
+          const {
+            response: { status, data },
+          } = await api
+            .post(
+              `/admin/tax-regions`,
+              {
+                country_code: "uk",
+              },
+              adminHeaders
+            )
+            .catch((err) => err)
+
+          expect(status).toEqual(400)
+          expect(data).toEqual({
+            message:
+              "Invalid request: Provider is required when creating a non-province tax region.",
+            type: "invalid_data",
+          })
+        })
+
         it("should throw if tax region does not exist", async () => {
           const {
             response: { status, data },
diff --git a/packages/admin/dashboard/src/i18n/translations/$schema.json b/packages/admin/dashboard/src/i18n/translations/$schema.json
index 2fc9da45a374a..a65eb0ee97902 100644
--- a/packages/admin/dashboard/src/i18n/translations/$schema.json
+++ b/packages/admin/dashboard/src/i18n/translations/$schema.json
@@ -6462,14 +6462,14 @@
             "errors": {
               "type": "object",
               "properties": {
-                "rateIsRequired": {
+                "missingProvider": {
                   "type": "string"
                 },
-                "nameIsRequired": {
+                "missingCountry": {
                   "type": "string"
                 }
               },
-              "required": ["rateIsRequired", "nameIsRequired"],
+              "required": ["missingProvider", "missingCountry"],
               "additionalProperties": false
             },
             "successToast": {
diff --git a/packages/admin/dashboard/src/i18n/translations/en.json b/packages/admin/dashboard/src/i18n/translations/en.json
index fcad3dde1e167..ff86747a8800e 100644
--- a/packages/admin/dashboard/src/i18n/translations/en.json
+++ b/packages/admin/dashboard/src/i18n/translations/en.json
@@ -1718,8 +1718,8 @@
       "header": "Create Tax Region",
       "hint": "Create a new tax region to define tax rates for a specific country.",
       "errors": {
-        "rateIsRequired": "Tax rate is required when creating a default tax rate.",
-        "nameIsRequired": "Name is required when creating a default tax rate."
+        "missingProvider": "Provider is required when creating a tax region.",
+        "missingCountry": "Country is required when creating a tax region."
       },
       "successToast": "The tax region was successfully created."
     },
diff --git a/packages/admin/dashboard/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx b/packages/admin/dashboard/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx
index d8a4c2281a1da..b7f91fcb61796 100644
--- a/packages/admin/dashboard/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx
+++ b/packages/admin/dashboard/src/routes/tax-regions/tax-region-create/components/tax-region-create-form/tax-region-create-form.tsx
@@ -18,21 +18,40 @@ import { useComboboxData } from "../../../../../hooks/use-combobox-data"
 import { Combobox } from "../../../../../components/inputs/combobox"
 import { formatProvider } from "../../../../../lib/format-provider"
 import { sdk } from "../../../../../lib/client"
+import { i18n } from "../../../../../components/utilities/i18n"
 
 type TaxRegionCreateFormProps = {
   parentId?: string
 }
 
-const TaxRegionCreateSchema = z.object({
-  name: z.string().optional(),
-  code: z.string().optional(),
-  rate: z.object({
-    float: z.number().optional(),
-    value: z.string().optional(),
-  }),
-  country_code: z.string().min(1),
-  provider_id: z.string(),
-})
+const TaxRegionCreateSchema = z
+  .object({
+    name: z.string().optional(),
+    code: z.string().optional(),
+    rate: z.object({
+      float: z.number().optional(),
+      value: z.string().optional(),
+    }),
+    country_code: z.string(),
+    provider_id: z.string(),
+  })
+  .superRefine(({ provider_id, country_code }, ctx) => {
+    if (!provider_id) {
+      ctx.addIssue({
+        code: z.ZodIssueCode.custom,
+        message: i18n.t("taxRegions.create.errors.missingProvider"),
+        path: ["provider_id"],
+      })
+    }
+
+    if (!country_code) {
+      ctx.addIssue({
+        code: z.ZodIssueCode.custom,
+        message: i18n.t("taxRegions.create.errors.missingCountry"),
+        path: ["country_code"],
+      })
+    }
+  })
 
 export const TaxRegionCreateForm = ({ parentId }: TaxRegionCreateFormProps) => {
   const { t } = useTranslation()
diff --git a/packages/medusa/src/api/admin/tax-regions/validators.ts b/packages/medusa/src/api/admin/tax-regions/validators.ts
index e704a37ae53d5..08a980d7e9126 100644
--- a/packages/medusa/src/api/admin/tax-regions/validators.ts
+++ b/packages/medusa/src/api/admin/tax-regions/validators.ts
@@ -3,6 +3,7 @@ import {
   createFindParams,
   createOperatorMap,
   createSelectParams,
+  WithAdditionalData,
 } from "../../utils/validators"
 import { applyAndAndOrOperators } from "../../utils/common-validators"
 
@@ -39,8 +40,8 @@ export const AdminGetTaxRegionsParams = createFindParams({
   .merge(AdminGetTaxRegionsParamsFields)
   .merge(applyAndAndOrOperators(AdminGetTaxRegionsParamsFields))
 
-export type AdminCreateTaxRegionType = z.infer<typeof AdminCreateTaxRegion>
-export const AdminCreateTaxRegion = z.object({
+export type AdminCreateTaxRegionType = z.infer<typeof CreateTaxRegion>
+export const CreateTaxRegion = z.object({
   country_code: z.string(),
   provider_id: z.string().nullish(),
   province_code: z.string().nullish(),
@@ -57,6 +58,16 @@ export const AdminCreateTaxRegion = z.object({
   metadata: z.record(z.unknown()).nullish(),
 })
 
+export const AdminCreateTaxRegion = WithAdditionalData(
+  CreateTaxRegion,
+  (schema) => {
+    return schema.refine((data) => data.parent_id || data.provider_id, {
+      path: ["provider_id"],
+      message: "Provider is required when creating a non-province tax region.",
+    })
+  }
+)
+
 export type AdminUpdateTaxRegionType = z.infer<typeof AdminUpdateTaxRegion>
 export const AdminUpdateTaxRegion = z.object({
   province_code: z.string().nullish(),


Reviews:
user: login: fPolic
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T13:13:02Z
user: login: olivermrbl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T15:09:23Z
user: login: olivermrbl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T15:12:22Z
user: login: fPolic
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T15:43:12Z
user: login: fPolic
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T15:48:21Z
user: login: olivermrbl
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T16:04:25Z
user: login: olivermrbl
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-12T16:04:41Z

Review comments:
diff_hunk: @@ -20,12 +20,21 @@ medusaIntegrationTestRunner({
         let taxRegion
 
         beforeEach(async () => {
+          const parentRegion = await api.post(
+            "/admin/tax-regions",
+            {
+              country_code: "us",
+              provider_id: "tp_system_system", // TODO: update when Oli's PR is merged
path: integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts
user: login: fPolic
body: todo: depnds on https://github.com/medusajs/medusa/pull/12441
created_at: 2025-05-12T13:13:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -57,6 +58,16 @@ export const AdminCreateTaxRegion = z.object({
   metadata: z.record(z.unknown()).nullish(),
 })
 
+export const AdminCreateTaxRegion = WithAdditionalData(
+  CreateTaxRegion,
+  (schema) => {
+    return schema.refine((data) => data.parent_id || data.provider_id, {
path: packages/medusa/src/api/admin/tax-regions/validators.ts
user: login: olivermrbl
body: question: Does this work as expected? I think I would have expected this to be `!data.parent_id && !data.provider_id`, but perhaps I am just reading this wrong 😄 
created_at: 2025-05-12T15:09:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -20,12 +20,21 @@ medusaIntegrationTestRunner({
         let taxRegion
 
         beforeEach(async () => {
+          const parentRegion = await api.post(
path: integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts
user: login: olivermrbl
body: suggestion: should we also add a test ensuring that we can create a province region without a provider? It seems to be missing
created_at: 2025-05-12T15:12:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -20,12 +20,21 @@ medusaIntegrationTestRunner({
         let taxRegion
 
         beforeEach(async () => {
+          const parentRegion = await api.post(
path: integration-tests/http/__tests__/tax-region/admin/tax-region.spec.ts
user: login: fPolic
body: this is tested implcitley in `beforeEach` where we create a parent tax region and a province region, but I added an explicit case as well
created_at: 2025-05-12T15:43:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -57,6 +58,16 @@ export const AdminCreateTaxRegion = z.object({
   metadata: z.record(z.unknown()).nullish(),
 })
 
+export const AdminCreateTaxRegion = WithAdditionalData(
+  CreateTaxRegion,
+  (schema) => {
+    return schema.refine((data) => data.parent_id || data.provider_id, {
path: packages/medusa/src/api/admin/tax-regions/validators.ts
user: login: fPolic
body: Yeah was expecting the same but refinement function should test the expected condition, i.e. return falsy to signal failure. So the condition is a negation of your condition.
created_at: 2025-05-12T15:48:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -57,6 +58,16 @@ export const AdminCreateTaxRegion = z.object({
   metadata: z.record(z.unknown()).nullish(),
 })
 
+export const AdminCreateTaxRegion = WithAdditionalData(
+  CreateTaxRegion,
+  (schema) => {
+    return schema.refine((data) => data.parent_id || data.provider_id, {
path: packages/medusa/src/api/admin/tax-regions/validators.ts
user: login: olivermrbl
body: TIL, interesting design choice 😄 
created_at: 2025-05-12T16:04:25Z
author_association: CONTRIBUTOR

PR comments:
user: login: vercel[bot]
created_at: 2025-05-12T13:12:50Z
body: [vc]: #PSzRCOdZgxUY8mLgf4O5ReMqOammn0ucJdE/gmRFssA=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJtZWR1c2EtZG9jcyIsInJvb3REaXJlY3RvcnkiOiJ3d3cvYXBwcy9kb2NzIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL21lZHVzYWpzL21lZHVzYS1kb2NzL0U4WUdoWUNYc1UyNHREREcyVVBzcmtyNGhTaXAiLCJwcmV2aWV3VXJsIjoibWVkdXNhLWRvY3MtZ2l0LWZpeC12YWxpZGF0ZS1wcm92aWRlci1mb3ItcmVnaW9uLW1lZHVzYWpzLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiSUdOT1JFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiIifX0seyJuYW1lIjoiYXBpLXJlZmVyZW5jZSIsInJvb3REaXJlY3RvcnkiOiJ3d3cvYXBwcy9hcGktcmVmZXJlbmNlIiwiaW5zcGVjdG9yVXJsIjoiaHR0cHM6Ly92ZXJjZWwuY29tL21lZHVzYWpzL2FwaS1yZWZlcmVuY2UvM1V3S3BERGl0S1BuYlZaYTl2OEdhZGk1S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lZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn19LHsibmFtZSI6ImRvY3MtdjIiLCJyb290RGlyZWN0b3J5Ijoid3d3L2FwcHMvYm9vayIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9tZWR1c2Fqcy9kb2NzLXYyL0hZMUsxWGdlZGUyaFZ6aFdLcE1NNmRDN29ZNTkiLCJwcmV2aWV3VXJsIjoiZG9jcy12Mi1naXQtZml4LXZhbGlkYXRlLXByb3ZpZGVyLWZvci1yZWdpb24tbWVkdXNhanMudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJJR05PUkVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6IiJ9fSx7Im5hbWUiOiJ1c2VyLWd1aWRlIiwicm9vdERpcmVjdG9yeSI6Ind3dy9hcHBzL3VzZXItZ3VpZGUiLCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vbWVkdXNhanMvdXNlci1ndWlkZS9ETENuSHZlMVUyamUydTNSR0Q0ZWNxaDdQdW1WIiwicHJldmlld1VybCI6InVzZXItZ3VpZGUtZ2l0LWZpeC12YWxpZGF0ZS1wcm92aWRlci1mb3ItcmVnaW9uLW1lZHVzYWpzLnZlcmNlbC5hcHAiLCJuZXh0Q29tbWl0U3RhdHVzIjoiSUdOT1JFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiIifX1dfQ==
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **api-reference** | 🔄 Building ([Inspect](https://vercel.com/medusajs/api-reference/3UwKpDDitKPnbVZa9v8Gadi5K5bY)) | [Visit Preview](https://api-reference-git-fix-validate-provider-for-region-medusajs.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/api-reference-git-fix-validate-provider-for-region-medusajs.vercel.app?via=pr-comment-feedback-link) | May 12, 2025 3:55pm |
| **medusa-dashboard** | ✅ Ready ([Inspect](https://vercel.com/medusajs/medusa-dashboard/4kiLfrq8qBQqK7RCaDyy1ECVLDDr)) | [Visit Preview](https://medusa-dashboard-git-fix-validate-provider-for-region-medusajs.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/medusa-dashboard-git-fix-validate-provider-for-region-medusajs.vercel.app?via=pr-comment-feedback-link) | May 12, 2025 3:55pm |

<details><summary>6 Skipped Deployments</summary>

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **api-reference-v2** | ⬜️ Ignored ([Inspect](https://vercel.com/medusajs/api-reference-v2/G6GSZCW2DdukHAKbd5Q8n4fB5zjo)) | [Visit Preview](https://api-reference-v2-git-fix-validate-provider-for-region-medusajs.vercel.app) |  | May 12, 2025 3:55pm |
| **docs-ui** | ⬜️ Ignored ([Inspect](https://vercel.com/medusajs/docs-ui/7as1TLamdWeCGBBZRefinyUtyCvF)) | [Visit Preview](https://docs-ui-git-fix-validate-provider-for-region-medusajs.vercel.app) |  | May 12, 2025 3:55pm |
| **docs-v2** | ⬜️ Ignored ([Inspect](https://vercel.com/medusajs/docs-v2/HY1K1Xgede2hVzhWKpMM6dC7oY59)) | [Visit Preview](https://docs-v2-git-fix-validate-provider-for-region-medusajs.vercel.app) |  | May 12, 2025 3:55pm |
| **medusa-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/medusajs/medusa-docs/E8YGhYCXsU24tDDG2UPsrkr4hSip)) | [Visit Preview](https://medusa-docs-git-fix-validate-provider-for-region-medusajs.vercel.app) |  | May 12, 2025 3:55pm |
| **resources-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/medusajs/resources-docs/BMb1xYL97M94x4jCDCTQ6frjbGWa)) | [Visit Preview](https://resources-docs-git-fix-validate-provider-for-region-medusajs.vercel.app) |  | May 12, 2025 3:55pm |
| **user-guide** | ⬜️ Ignored ([Inspect](https://vercel.com/medusajs/user-guide/DLCnHve1U2je2u3RGD4ecqh7PumV)) | [Visit Preview](https://user-guide-git-fix-validate-provider-for-region-medusajs.vercel.app) |  | May 12, 2025 3:55pm |
</details>









author_association: NONE
user: login: changeset-bot[bot]
created_at: 2025-05-12T13:12:50Z
body: ###  🦋  Changeset detected

Latest commit: 7c197c6ac93c417ef0f7d6b90883be711ea484ab

**The changes in this PR will be included in the next version bump.**

<details><summary>This PR includes changesets to release 66 packages</summary>

  | Name                               | Type  |
| ---------------------------------- | ----- |
| @medusajs/dashboard                | Patch |
| @medusajs/medusa                   | Patch |
| @medusajs/admin-bundler            | Patch |
| @medusajs/test-utils               | Patch |
| @medusajs/medusa-oas-cli           | Patch |
| integration-tests-http             | Patch |
| @medusajs/api-key                  | Patch |
| @medusajs/auth                     | Patch |
| @medusajs/cart                     | Patch |
| @medusajs/currency                 | Patch |
| @medusajs/customer                 | Patch |
| @medusajs/file                     | Patch |
| @medusajs/fulfillment              | Patch |
| @medusajs/index                    | Patch |
| @medusajs/inventory                | Patch |
| @medusajs/link-modules             | Patch |
| @medusajs/locking                  | Patch |
| @medusajs/notification             | Patch |
| @medusajs/order                    | Patch |
| @medusajs/payment                  | Patch |
| @medusajs/pricing                  | Patch |
| @medusajs/product                  | Patch |
| @medusajs/promotion                | Patch |
| @medusajs/region                   | Patch |
| @medusajs/sales-channel            | Patch |
| @medusajs/stock-location           | Patch |
| @medusajs/store                    | Patch |
| @medusajs/tax                      | Patch |
| @medusajs/user                     | Patch |
| @medusajs/workflow-engine-inmemory | Patch |
| @medusajs/workflow-engine-redis    | Patch |
| @medusajs/oas-github-ci            | Patch |
| @medusajs/cache-inmemory           | Patch |
| @medusajs/cache-redis              | Patch |
| @medusajs/event-bus-local          | Patch |
| @medusajs/event-bus-redis          | Patch |
| @medusajs/auth-emailpass           | Patch |
| @medusajs/auth-github              | Patch |
| @medusajs/auth-google              | Patch |
| @medusajs/file-local               | Patch |
| @medusajs/file-s3                  | Patch |
| @medusajs/fulfillment-manual       | Patch |
| @medusajs/locking-postgres         | Patch |
| @medusajs/locking-redis            | Patch |
| @medusajs/notification-local       | Patch |
| @medusajs/notification-sendgrid    | Patch |
| @medusajs/payment-stripe           | Patch |
| @medusajs/core-flows               | Patch |
| @medusajs/framework                | Patch |
| @medusajs/js-sdk                   | Patch |
| @medusajs/modules-sdk              | Patch |
| @medusajs/orchestration            | Patch |
| @medusajs/types                    | Patch |
| @medusajs/utils                    | Patch |
| @medusajs/workflows-sdk            | Patch |
| @medusajs/cli                      | Patch |
| @medusajs/telemetry                | Patch |
| @medusajs/admin-sdk                | Patch |
| @medusajs/admin-shared             | Patch |
| @medusajs/admin-vite-plugin        | Patch |
| @medusajs/icons                    | Patch |
| @medusajs/toolbox                  | Patch |
| @medusajs/ui-preset                | Patch |
| create-medusa-app                  | Patch |
| medusa-dev-cli                     | Patch |
| @medusajs/ui                       | Patch |

</details>

Not sure what this means? [Click here  to learn what changesets are](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add another changeset to this PR](https://github.com/medusajs/medusa/new/fix/validate-provider-for-region?filename=.changeset/light-lemons-turn.md&value=---%0A%22%40medusajs%2Fmedusa%22%3A%20patch%0A%22%40medusajs%2Fdashboard%22%3A%20patch%0A%22integration-tests-http%22%3A%20patch%0A---%0A%0Afix(dashboard%2C%20medusa)%3A%20validate%20provider%20for%20top%20level%20tax%20regions%0A)


author_association: NONE