> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tax Preview

> Preview the tax rule and rate that will be applied for a product and buyer context.

## Method

`POST` `/v1/verify/tax-preview`

## Body Parameters

<ParamField name="productId" type="uuid" required>Product identifier.</ParamField>
<ParamField name="buyerType" type="string">`B2C` (default) or `B2B`.</ParamField>
<ParamField name="buyerVatId" type="string">Optional VAT identifier. Influences B2B reverse-charge logic.</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/verify/tax-preview \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "productId": "d0a6b9c0-5e4f-4f29-93c9-5f55bd6d2a20",
      "buyerType": "B2B",
      "buyerVatId": "RO12345678"
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/verify/tax-preview", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ productId, buyerType: "B2C" }),
  })
  const preview = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  payload = {
    "productId": "d0a6b9c0-5e4f-4f29-93c9-5f55bd6d2a20",
    "buyerType": "B2C"
  }

  resp = requests.post(
    "https://api.voyantcloud.com/v1/verify/tax-preview",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  result = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "marketId": null,
    "jurisdiction": "RO",
    "buyerType": "B2B",
    "hasBuyerVatId": true,
    "rule": {
      "jurisdiction": "RO",
      "buyerType": "B2B",
      "requiresBuyerVatId": true,
      "taxRate": 0,
      "reverseCharge": true,
      "taxIncluded": false,
      "priority": 10
    },
    "taxRate": 0
  }
  ```

  ```json 404 Not Found theme={null}
  { "error": "Unknown product" }
  ```

  ```json 400 Bad Request theme={null}
  { "error": "Invalid request" }
  ```
</ResponseExample>

<Tip>Use the preview in admin tooling to explain price breakdowns. The <code>rule</code> block mirrors the structure returned by the pricing engine and can be displayed to finance teams for auditing.</Tip>
