> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateManualTaxMapping

# Package: tax

# Namespace: ManualTaxMappingService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/manual-tax-mappings/create-manual-tax-mapping.md

## Permission Scopes:
Manage Orders: SCOPE.DC-STORES.MANAGE-ORDERS

## Introduction

Creates a manual tax mapping for a specific tax group and region combination.

You must specify the tax group ID and tax region ID. The tax group and tax region
must already exist before creating the mapping.
To create multiple manual tax mappings in a single request, use [Bulk Create Manual Tax Mappings](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/manual-tax-mappings/bulk-create-manual-tax-mappings.md).

---

## REST API

### Schema

```
 Method: createManualTaxMapping
 Description: Creates a manual tax mapping for a specific tax group and region combination.  You must specify the tax group GUID and tax region GUID. The tax group and tax region must already exist before creating the mapping. To create multiple manual tax mappings in a single request, use [Bulk Create Manual Tax Mappings](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/manual-tax-mappings/bulk-create-manual-tax-mappings.md).
 URL: https://www.wixapis.com/billing/v1/manual-tax-mappings
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  manualTaxMapping, manualTaxMapping.taxGroupId, manualTaxMapping.taxRegionId, manualTaxMapping.taxRate
 Method parameters: 
   param name: manualTaxMapping | type: ManualTaxMapping   | required: true 
        - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. | required: true | validation: format GUID
        - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. | required: true | validation: format GUID
        - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination.  Specified as a decimal string representing a fraction, not a percentage. For example, `"0.05"` is 5%, `"0.1"` is 10%, and `"0.08"` is 8%. Don't pass a number (`0.05`), an integer (`5`), or a percentage string (`"5%"`). Up to 6 decimal places are supported. | required: true | validation: decimalValue {"maxScale":6,"gte":"0"}
        - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate.  | validation: maxLength 1000
        - name: taxType | type: string | description: Type of tax being applied, such as `VAT`, `GST`, or `Sales Tax`. This depends on the jurisdiction's tax laws.  | validation: maxLength 200
        - name: taxName | type: string | description: Customer-facing name of the tax, shown at checkout. For example, `STATE TAX`, `GST`, or `VAT`.  Cosmetic only. It doesn't affect the calculated amount. Can be left empty, in which case checkout shows a default label such as `Sales Tax`.  | validation: maxLength 200
        - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`.  | validation: maxLength 200
        - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction where this tax rate applies, such as country, state, county, city, or special district.  
             - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
        - name: exemptRates | type: array<ExemptDetails> | description: Tax exemption details for user-defined exempt groups.  | validation: maxItems 50
           - name: taxExemptGroupId | type: string | description: Tax exempt group GUID.  | validation: format GUID
           - name: taxRate | type: string | description: Tax override rate for given tax mapping.  | validation: decimalValue {"maxScale":6,"gte":"0"}
        - name: extendedFields | type: ExtendedFields | description: Extended fields for storing additional custom data.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
 Return type: CreateManualTaxMappingResponse
  - name: manualTaxMapping | type: ManualTaxMapping | description: Created manual tax mapping.  
     - name: id | type: string | description: Manual tax mapping GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the manual tax mapping is updated. To prevent conflicting changes, the current revision must be passed when updating the manual tax mapping.  Ignored when creating a manual tax mapping.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the manual tax mapping was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the manual tax mapping was last updated.  | read-only: true | validation: format date-time
     - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment.  | validation: format GUID
     - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply.  | validation: format GUID
     - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination.  Specified as a decimal string representing a fraction, not a percentage. For example, `"0.05"` is 5%, `"0.1"` is 10%, and `"0.08"` is 8%. Don't pass a number (`0.05`), an integer (`5`), or a percentage string (`"5%"`). Up to 6 decimal places are supported.  | validation: decimalValue {"maxScale":6,"gte":"0"}
     - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate.  | validation: maxLength 1000
     - name: taxType | type: string | description: Type of tax being applied, such as `VAT`, `GST`, or `Sales Tax`. This depends on the jurisdiction's tax laws.  | validation: maxLength 200
     - name: taxName | type: string | description: Customer-facing name of the tax, shown at checkout. For example, `STATE TAX`, `GST`, or `VAT`.  Cosmetic only. It doesn't affect the calculated amount. Can be left empty, in which case checkout shows a default label such as `Sales Tax`.  | validation: maxLength 200
     - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`.  | validation: maxLength 200
     - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction where this tax rate applies, such as country, state, county, city, or special district.  
         - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
     - name: exemptRates | type: array<ExemptDetails> | description: Tax exemption details for user-defined exempt groups.  | validation: maxItems 50
        - name: taxExemptGroupId | type: string | description: Tax exempt group GUID.  | validation: format GUID
        - name: taxRate | type: string | description: Tax override rate for given tax mapping.  | validation: decimalValue {"maxScale":6,"gte":"0"}
     - name: extendedFields | type: ExtendedFields | description: Extended fields for storing additional custom data.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: TAX_GROUP_ID_NOT_FOUND | Description: The specified tax group GUID doesn't exist.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: TAX_REGION_ID_NOT_FOUND | Description: The specified tax region GUID doesn't exist.
   HTTP Code: 409 | Status Code: ALREADY_EXISTS | Application Code: MANUAL_TAX_MAPPING_ALREADY_EXISTS | Description: A manual tax mapping already exists for the given tax group and tax region combination.


```

### Examples

### Create Manual Tax Mapping
Creates a custom tax rate mapping for a specific tax group and region combination

```curl
curl -X POST \
  'https://www.wixapis.com/billing/v1/manual-tax-mappings' \
  -H 'Content-type: application/json' \
  -H 'Authorization: <AUTH>' \
  -d '{
	  "manualTaxMapping": {
      "taxGroupId": "f1a7350b-7275-43f1-9846-672123a67d7b",
      "taxRegionId": "0115fa48-7167-46e1-a93f-e0d308124546",
      "taxRate": "0.1",
      "taxType": "VAT/GST",
      "taxName": "VAT",
      "jurisdiction": "Ukraine",
      "jurisdictionType": "COUNTRY"
    }
	}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.billing.manualTaxMappings.createManualTaxMapping(manualTaxMapping)
 Description: Creates a manual tax mapping for a specific tax group and region combination.  You must specify the tax group GUID and tax region GUID. The tax group and tax region must already exist before creating the mapping. To create multiple manual tax mappings in a single request, use [Bulk Create Manual Tax Mappings](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/tax/manual-tax-mappings/bulk-create-manual-tax-mappings.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  manualTaxMapping, manualTaxMapping.taxGroupId, manualTaxMapping.taxRegionId, manualTaxMapping.taxRate
 Method parameters: 
   param name: manualTaxMapping | type: ManualTaxMapping   | required: true 
        - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. | required: true | validation: format GUID
        - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. | required: true | validation: format GUID
        - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination.  Specified as a decimal string representing a fraction, not a percentage. For example, `"0.05"` is 5%, `"0.1"` is 10%, and `"0.08"` is 8%. Don't pass a number (`0.05`), an integer (`5`), or a percentage string (`"5%"`). Up to 6 decimal places are supported. | required: true | validation: decimalValue {"maxScale":6,"gte":"0"}
        - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate.  | validation: maxLength 1000
        - name: taxType | type: string | description: Type of tax being applied, such as `VAT`, `GST`, or `Sales Tax`. This depends on the jurisdiction's tax laws.  | validation: maxLength 200
        - name: taxName | type: string | description: Customer-facing name of the tax, shown at checkout. For example, `STATE TAX`, `GST`, or `VAT`.  Cosmetic only. It doesn't affect the calculated amount. Can be left empty, in which case checkout shows a default label such as `Sales Tax`.  | validation: maxLength 200
        - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`.  | validation: maxLength 200
        - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction where this tax rate applies, such as country, state, county, city, or special district.  
             - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
        - name: exemptRates | type: array<ExemptDetails> | description: Tax exemption details for user-defined exempt groups.  | validation: maxItems 50
           - name: taxExemptGroupId | type: string | description: Tax exempt group GUID.  | validation: format GUID
           - name: taxRate | type: string | description: Tax override rate for given tax mapping.  | validation: decimalValue {"maxScale":6,"gte":"0"}
        - name: extendedFields | type: ExtendedFields | description: Extended fields for storing additional custom data.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
 Return type: PROMISE<ManualTaxMapping>
  - name: _id | type: string | description: Manual tax mapping GUID.  | read-only: true | validation: format GUID
  - name: revision | type: string | description: Revision number, which increments by 1 each time the manual tax mapping is updated. To prevent conflicting changes, the current revision must be passed when updating the manual tax mapping.  Ignored when creating a manual tax mapping.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the manual tax mapping was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the manual tax mapping was last updated.  | read-only: true 
  - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment.  | validation: format GUID
  - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply.  | validation: format GUID
  - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination.  Specified as a decimal string representing a fraction, not a percentage. For example, `"0.05"` is 5%, `"0.1"` is 10%, and `"0.08"` is 8%. Don't pass a number (`0.05`), an integer (`5`), or a percentage string (`"5%"`). Up to 6 decimal places are supported.  | validation: decimalValue {"maxScale":6,"gte":"0"}
  - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate.  | validation: maxLength 1000
  - name: taxType | type: string | description: Type of tax being applied, such as `VAT`, `GST`, or `Sales Tax`. This depends on the jurisdiction's tax laws.  | validation: maxLength 200
  - name: taxName | type: string | description: Customer-facing name of the tax, shown at checkout. For example, `STATE TAX`, `GST`, or `VAT`.  Cosmetic only. It doesn't affect the calculated amount. Can be left empty, in which case checkout shows a default label such as `Sales Tax`.  | validation: maxLength 200
  - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`.  | validation: maxLength 200
  - name: jurisdictionType | type: JurisdictionType | description: Type of jurisdiction where this tax rate applies, such as country, state, county, city, or special district.  
     - enum: UNDEFINED, COUNTRY, STATE, COUNTY, CITY, SPECIAL
  - name: exemptRates | type: array<ExemptDetails> | description: Tax exemption details for user-defined exempt groups.  | validation: maxItems 50
     - name: taxExemptGroupId | type: string | description: Tax exempt group GUID.  | validation: format GUID
     - name: taxRate | type: string | description: Tax override rate for given tax mapping.  | validation: decimalValue {"maxScale":6,"gte":"0"}
  - name: extendedFields | type: ExtendedFields | description: Extended fields for storing additional custom data.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: TAX_GROUP_ID_NOT_FOUND | Description: The specified tax group GUID doesn't exist.
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: TAX_REGION_ID_NOT_FOUND | Description: The specified tax region GUID doesn't exist.
   HTTP Code: 409 | Status Code: ALREADY_EXISTS | Application Code: MANUAL_TAX_MAPPING_ALREADY_EXISTS | Description: A manual tax mapping already exists for the given tax group and tax region combination.


```

### Examples

### Create Manual Tax Mapping
Set an 8% sales tax rate for a tax group and region.

```javascript
import { manualTaxMappings } from "@wix/billing";

async function createManualTaxMapping() {
  const response = await manualTaxMappings.createManualTaxMapping({
    taxGroupId: "a1b2c3d4-e5f6-7a8b-9c0d-e1f2a3b4c5d6",
    taxRegionId: "b2c3d4e5-f6a7-8b9c-0d1e-f2a3b4c5d6e7",
    taxRate: "0.080000",
    taxType: "Sales Tax",
    taxName: "STATE TAX",
    jurisdiction: "New York",
    jurisdictionType: "STATE",
  });
  return response;
}

/* Promise resolves to:
 * {
 *   "_id": "c3d4e5f6-a7b8-9c0d-1e2f-a3b4c5d6e7f8",
 *   "taxGroupId": "a1b2c3d4-e5f6-7a8b-9c0d-e1f2a3b4c5d6",
 *   "taxRegionId": "b2c3d4e5-f6a7-8b9c-0d1e-f2a3b4c5d6e7",
 *   "taxRate": "0.080000",
 *   "taxType": "Sales Tax",
 *   "taxName": "STATE TAX",
 *   "jurisdiction": "New York",
 *   "jurisdictionType": "STATE"
 * }
 */

```

### createManualTaxMapping (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { manualTaxMappings } from '@wix/billing';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { manualTaxMappings },
  // Include the auth strategy and host as relevant
});


async function createManualTaxMapping(manualTaxMapping) {
  const response = await myWixClient.manualTaxMappings.createManualTaxMapping(manualTaxMapping);
};
```

---