> 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`). > - 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 - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. | required: true - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). | required: true - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). Return type: CreateManualTaxMappingResponse - name: manualTaxMapping | type: ManualTaxMapping | description: Created manual tax mapping. - name: id | type: string | description: Manual tax mapping 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. - name: createdDate | type: string | description: Date and time the manual tax mapping was created. - name: updatedDate | type: string | description: Date and time the manual tax mapping was last updated. - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). ``` ### 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: ' \ -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.tax.ManualTaxMappingService.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 - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. | required: true - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). | required: true - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). Return type: PROMISE - name: _id | type: string | description: Manual tax mapping 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. - name: _createdDate | type: Date | description: Date and time the manual tax mapping was created. - name: _updatedDate | type: Date | description: Date and time the manual tax mapping was last updated. - name: taxGroupId | type: string | description: Tax group GUID. Tax groups define collections of items or services that share the same tax treatment. - name: taxRegionId | type: string | description: Tax region GUID. Tax regions represent geographical areas where specific tax rules apply. - name: taxRate | type: string | description: Tax rate to apply for this tax group and region combination. Specified as a decimal value (for example, `0.080000` for 8%). - name: description | type: string | description: Description of the manual tax mapping. Use this field to add context or notes about the tax rate. - 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. - name: taxName | type: string | description: Name of the tax being applied. For example, `STATE TAX` or `GST`. - name: jurisdiction | type: string | description: Name of the jurisdiction where this tax rate applies. For example, `California` or `United Kingdom`. - 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 | description: Tax exemption details for user-defined exempt groups. - name: taxRate | type: string | description: Tax override rate for given tax mapping. - 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). ``` ### Examples ### createManualTaxMapping ```javascript import { manualTaxMappings } from '@wix/billing'; async function createManualTaxMapping(manualTaxMapping) { const response = await manualTaxMappings.createManualTaxMapping(manualTaxMapping); }; ``` ### createManualTaxMapping (with elevated permissions) ```javascript import { manualTaxMappings } from '@wix/billing'; import { auth } from '@wix/essentials'; async function myCreateManualTaxMappingMethod(manualTaxMapping) { const elevatedCreateManualTaxMapping = auth.elevate(manualTaxMappings.createManualTaxMapping); const response = await elevatedCreateManualTaxMapping(manualTaxMapping); } ``` ### createManualTaxMapping (self-hosted) Self-hosted 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); }; ``` ---