> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Global Hub Tax Engine settings

> Learn how to create, retrieve, and update the Global Tax Hub Engine through the Settings API.

Learn how to create, retrieve, and update the Global Tax Hub Engine through the Settings API.

## Create a Global Tax Hub Engine

To create a new Global Tax Hub Engine, see the following request and a sample of 200 response:

HTTP request:

`POST https://rest.zuora.com/settings/tax-engines/global-tax-hub`

Request body:

```json
{
   "name": "Global Tax Hub Engine",
   "taxEngineType": "GlobalTaxHub",
   "url": "https://communicationsua.avalara.net/api/v2/afc/CalcTaxes",
   "voidUrl": "https://communicationsua.avalara.net/api/v2/afc/commit",
   "authenticationType": "BasicAuth",
   "vendor": "AvalaraTelco",
   "username": "username",
   "password": "password",
   "requestTemplate": "mock template",//Will be set to the default template if empty
   "voidTemplate": "mock template"//Will be set to the default template if empty
}
```

The following fields are required in the request body:

* `name`
* `taxEngineType`
* `vendor`
* `authenticationType -` The username and password are required when the `authenticationType` is set to `Basic Auth`.
* `Url`

Response body:

```json
{
   "id": "402833ec850fae4a01850fb5d039132d",
   "name": "Global Tax Hub Engine",
   "taxEngineType": "GlobalTaxHub",
   "customFieldMetas": [],
   "vendor": "AvalaraTelco",
   "authenticationType": "BasicAuth",
   "username": "username",
   "url": "https://communicationsua.avalara.net/api/v2/afc/CalcTaxes",
   "voidUrl": "https://communicationsua.avalara.net/api/v2/afc/commit",
   "networkOpenTimeoutInSeconds": 60,
   "networkReadTimeoutInSeconds": 60,
   "requestTemplate": "mock template",
   "voidTemplate": "mock template",
   "success": true
}
```

## Get a Global Tax Hub Engine

To access detailed information about a particular Global Tax Hub engine, you must include the ID of the specific engine as a path parameter. Here's an example of a sample request and the corresponding 200 response:

HTTP request:

`GET https://rest.zuora.com/settings/tax-engines/global-tax-hub/{id}`

Request body:

None

Response body:

```json
{
   "id": "402833ec850fae4a01850fb5d039132d",
   "name": "Global Tax Hub Engine",
   "taxEngineType": "GlobalTaxHub",
   "customFieldMetas": [],
   "vendor": "AvalaraTelco",
   "authenticationType": "BasicAuth",
   "username": “username”,
   "description": "Test",
   "url": "https://communicationsua.avalara.net/api/v2/afc/CalcTaxes",
   "voidUrl": "https://communicationsua.avalara.net/api/v2/afc/commit",
   "networkOpenTimeoutInSeconds": 60,
   "networkReadTimeoutInSeconds": 60,
   "requestTemplate": "mock template",
   "voidTemplate": "mock template",
   "success": true
}
```

## Update a Global Tax Hub Engine

To update an existing Global Tax Hub Engine, you must include the ID of the engine as a path parameter. Here's an example of a sample request and the corresponding 200 response:

HTTP request:

`PUT https://rest.zuora.com/settings/tax-engines/global-tax-hub/{id}`

Request body:

```json
{
   "name": "Global Tax Hub Engine",
   "url": "https://communicationsua.avalara.net/api/v2/afc/CalcTaxes",
   "voidUrl": "https://communicationsua.avalara.net/api/v2/afc/commit",
   "authenticationType": "OAuth2",
   "vendor": "AvalaraTelco",
   "accessTokenUrl": "https://access-token.com/",
   "clientId": "clientId",
   "clientSecret": "clientSecret",
   "description": "Test",
   "requestTemplate": "mock template",
   "voidTemplate": "mock template"
}
```

> **Note**
>
> Do not include the `taxEngineType` parameter in the request body.

Response body:

```json
{
   "id": "402833ec850fae4a01850fb5d039132d",
   "name": "Global Tax Hub Engine",
   "taxEngineType": "GlobalTaxHub",
   "customFieldMetas": [],
   "vendor": "AvalaraTelco",
   "authenticationType": "OAuth2",
   "url": "https://communicationsua.avalara.net/api/v2/afc/CalcTaxes",
   "voidUrl": "https://communicationsua.avalara.net/api/v2/afc/commit",
   "accessTokenUrl": "https://access-token.com/",
   "clientId": "clientId",
   "networkOpenTimeoutInSeconds": 60,
   "networkReadTimeoutInSeconds": 60,
   "requestTemplate": "mock template",
   "voidTemplate": "mock template",
   "success": true
}
```

## Delete a Global Tax Hub Engine

To delete a specific Global Tax Hub Engine, you must include the ID of the engine as a path parameter. Here's an example of a sample request and the corresponding 200 response:

HTTP request:

`DELETE https://rest.zuora.com/settings/tax-engines/global-tax-hub/{id}`

**Request body:**

None

Response body:

None

## API Fields Description

<table>
  <tr>
    <th>
      Property Name
    </th>

    <th>
      Type
    </th>

    <th>
      Description
    </th>
  </tr>

  <tr>
    <td>
      name
    </td>

    <td>
      String
    </td>

    <td>
      The calculated tax amount that is excluded due to the exemption.
    </td>
  </tr>

  <tr>
    <td>
      vendor
    </td>

    <td>
      Enum
    </td>

    <td>
      The name of the vendor that is currently only supported by the AvalaraBrazil and Taxamo engines. The available values are `AvalaraBrazil` and `Taxamo`.
    </td>
  </tr>

  <tr>
    <td>
      authenticationType
    </td>

    <td>
      Enum
    </td>

    <td>
      The authentication types. The available options are `BasicAuth`, `OAuth2`, and `PrivateToken`.
    </td>
  </tr>

  <tr>
    <td>
      taxEngineType
    </td>

    <td>
      Enum
    </td>

    <td>
      The type of tax engine, such as `GlobalTaxHub` for `TaxHub`.
    </td>
  </tr>

  <tr>
    <td>
      url
    </td>

    <td>
      String
    </td>

    <td>
      The tax vendor URL for tax calculation.
    </td>
  </tr>

  <tr>
    <td>
      voidUrl
    </td>

    <td>
      String
    </td>

    <td>
      The tax vendor URL for tax void.
    </td>
  </tr>

  <tr>
    <td>
      username
    </td>

    <td>
      String
    </td>

    <td>
      The username for accessing the tax URL and tax void URL. This is required only when the `authenticationType` is `Basic﻿Auth`.
    </td>
  </tr>

  <tr>
    <td>
      password
    </td>

    <td>
      String
    </td>

    <td>
      The password for accessing the tax URL and tax void URL. This is required only when the `authenticationType` is `BasicAuth`.
    </td>
  </tr>

  <tr>
    <td>
      securityToken
    </td>

    <td>
      String
    </td>

    <td>
      This is required when the `authenticationType` is `PrivateToken`.
    </td>
  </tr>

  <tr>
    <td>
      accessTokenUrl
    </td>

    <td>
      String
    </td>

    <td>
      The access token URL. This is required only when the `authenticationType` is `OAuth2`.
    </td>
  </tr>

  <tr>
    <td>
      clientId
    </td>

    <td>
      String
    </td>

    <td>
      The client ID. This is required only when the `authenticationType` is `OAuth2`.
    </td>
  </tr>

  <tr>
    <td>
      clientSecret
    </td>

    <td>
      String
    </td>

    <td>
      The client secret ID. This is required only when the `authenticationType` is `OAuth2`.
    </td>
  </tr>

  <tr>
    <td>
      networkOpenTimeoutInSeconds
    </td>

    <td>
      Number
    </td>

    <td>
      The timeout duration (in seconds) for establishing a network connection.
    </td>
  </tr>

  <tr>
    <td>
      networkReadTimeoutInSeconds
    </td>

    <td>
      Number
    </td>

    <td>
      The timeout duration (in seconds) for reading responses.
    </td>
  </tr>

  <tr>
    <td>
      requestTemplate
    </td>

    <td>
      String
    </td>

    <td>
      The request template for tax calculation. If left empty, the default template will be applied.
    </td>
  </tr>

  <tr>
    <td>
      voidTemplate
    </td>

    <td>
      String
    </td>

    <td>
      The request template for tax void. If left empty, the default template will be applied.
    </td>
  </tr>

  <tr>
    <td>
      customFieldMetas
    </td>

    <td>
      Array of objects
    </td>

    <td>
      This must be defined only if the latest value of custom fields are used, for example,

      ```
      "customFieldMetas": {
         "useLatestValue": true,
         "customFieldName": "PicklistCustom__c",
         "customFieldObjectType": "Account"
      }
      ```
    </td>
  </tr>

  <tr>
    <td>
      requestHeaders
    </td>

    <td>
      Map
    </td>

    <td>
      The Request headers. Input the key-value pairs, for example,

      ```
      "requestHeaders": {
         "Accept-encoding": "gzip, deflate, br"
      }
      ```
    </td>
  </tr>

  <tr>
    <td>
      responseMappings
    </td>

    <td>
      Map
    </td>

    <td>
      The customized response mapping. Input the key-value pairs, for example,

      ```
      "responseMappings": {
         "taxRateDescription": "citation"
      }
      ```
    </td>
  </tr>
</table>