> 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 # Method name: queryTaxGroups() # Method package: wixBillingV2 # Method menu location: wixBillingV2 --> taxGroups --> queryTaxGroups # Method Link: https://dev.wix.com/docs/velo/apis/wix-billing-v2/tax-groups/query-tax-groups.md # Method Description: Creates a query to retrieve a list of tax groups. The `queryTaxGroups()` function builds a query to retrieve a list of tax groups and returns a `TaxGroupsQueryBuilder` object. The returned object contains the query definition, which is typically used to run the query using the `find()` function. You can refine the query by chaining `TaxGroupsQueryBuilder` functions onto the query. `TaxGroupsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTaxGroups()` returns. `queryTaxGroups()` runs with the following `TaxGroupsQueryBuilder` default that you can override: + `ascending("_id")` The functions that are chained to `queryTaxGroups()` are applied in the order they are called. For example, if you apply `ascending("name")` and then `ascending("_createdDate")`, the results are sorted first by the `"name"`, and then, if there are multiple results with the same `"name"`, the items are sorted by `"_createdDate"`. The following `TaxGroupsQueryBuilder` functions are supported for the `queryTaxGroups()` function. For a full description of the tax group object, see the object returned for the `items` property in `TaxGroupsQueryResult`. |PROPERTY |SUPPORTED FILTERS & SORTING |:---:|:---:| |`_id`|[`eq()`](/tax-groups-query-builder/eq),[`ne()`](/tax-groups-query-builder/ne),[`in()`](/tax-groups-query-builder/in),[`ascending()`](/tax-groups-query-builder/ascending),[`descending()`](/tax-groups-query-builder/descending)| |`name`|[`eq()`](/tax-groups-query-builder/eq),[`ne()`](/tax-groups-query-builder/ne),[`in()`](/tax-groups-query-builder/in),[`ascending()`](/tax-groups-query-builder/ascending),[`descending()`](/tax-groups-query-builder/descending)| |`_createdDate`|[`eq()`](/tax-groups-query-builder/eq),[`ne()`](/tax-groups-query-builder/ne),[`exists()`](/tax-groups-query-builder/exists),[`in()`](/tax-groups-query-builder/in),[`hasSome()`](/tax-groups-query-builder/has-some),[`lt()`](/tax-groups-query-builder/lt),[`le()`](/tax-groups-query-builder/le),[`gt()`](/tax-groups-query-builder/gt),[`ge()`](/tax-groups-query-builder/ge),[`ascending()`](/tax-groups-query-builder/ascending),[`descending()`](/tax-groups-query-builder/descending)| |`_updatedDate`|[`eq()`](/tax-groups-query-builder/eq),[`ne()`](/tax-groups-query-builder/ne),[`exists()`](/tax-groups-query-builder/exists),[`in()`](/tax-groups-query-builder/in),[`hasSome()`](/tax-groups-query-builder/has-some),[`lt()`](/tax-groups-query-builder/lt),[`le()`](/tax-groups-query-builder/le),[`gt()`](/tax-groups-query-builder/gt),[`ge()`](/tax-groups-query-builder/ge),[`ascending()`](/tax-groups-query-builder/ascending),[`descending()`](/tax-groups-query-builder/descending)| # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## queryTaxGroups example ```javascript import { taxGroups } from 'wix-billing.v2'; async function queryTaxGroups() { const { items } = taxGroups.queryTaxGroups().find(); } ``` ## queryTaxGroups example for exporting from backend code ```javascript import { taxGroups } from 'wix-billing.v2'; import { webMethod, Permissions } from 'wix-web-module'; export const queryTaxGroups = webMethod( Permissions.Anyone, async (query) => { try { const result = await taxGroups.queryTaxGroups(query); return result; } catch (error) { console.error(error); // Handle the error } } ); ``` ---