# RevCent MCP Guide: `RefundTax`

Brief AI/MCP-focused guide for the RevCent `RefundTax` operation.

---

## Operation Summary

Operation:

```text
RefundTax
```

Purpose:

```text
Refund a Tax record using the Tax ID.
```

Use `RefundTax` when the user specifically wants to refund the tax portion of a Sale, Product Sale, Subscription Renewal, Trial Expiration payment, or other related taxable commerce event.

---

## When to Use

Use `RefundTax` when:

- the tax amount itself is the refund target,
- the user provides or confirms the Tax ID,
- tax needs to be refunded separately from product, shipping, or full-sale refund logic,
- the business wants tax-level refund reporting and clean tax refund metrics.

Example user intent:

```text
Refund the tax on this order.
Refund only $2.15 of tax.
Refund the tax connected to this subscription renewal.
```

---

## When Not to Use

Do not use `RefundTax` when the user wants to refund a broader item.

Prefer more specific or broader refund operations when appropriate:

| Refund Intent | Preferred Operation |
|---|---|
| Void or fully refund an entire Sale | `VoidSale` |
| Refund a Product Sale line item | `RefundProductSale` |
| Refund Shipping / Shipment amount | `RefundShipment` |
| Refund a Subscription Renewal | `RefundSubscriptionRenewal` |
| Refund raw credit card funds without item context | `RefundTransaction` |
| Refund tax only | `RefundTax` |

Best practice:

```text
Use the operation that matches the item being refunded.
```

This preserves better item-specific reporting and metrics.

---

## Input Schema

| Field | Type | Required | Description |
|---|---:|---:|---|
| `tax_id` | string | Yes | 20-character Tax ID. |
| `amount` | number | No | Amount to refund. If omitted, the entire tax amount is refunded. |

---

## Full Tax Refund

If `amount` is omitted, the entire Tax amount is refunded.

Example:

```json
{
  "tax_id": "TTTTTTTTTTTTTTTTTTTT"
}
```

Use this only when the user intends to refund the full tax amount.

---

## Partial Tax Refund

If `amount` is provided, only that amount is refunded.

Example:

```json
{
  "tax_id": "TTTTTTTTTTTTTTTTTTTT",
  "amount": 2.15
}
```

Use this when the user intends to refund only part of the Tax amount.

---

## Output Schema

Successful output can include:

| Field | Description |
|---|---|
| `api_call_id` | 20-character API call ID. |
| `api_call_unix` | Unix timestamp of the API call. |
| `code` | API response code. `1` indicates success. |
| `amount` | Amount refunded. |
| `tax_id` | Tax ID that was refunded. |
| `pending_refund` | Pending Refund IDs created as a result of the refund, if applicable. |
| `result` | Result message. |

---

## Pre-Refund Checklist

Before calling `RefundTax`, confirm:

- the correct Tax ID,
- the customer/order/context if available,
- whether the refund is full or partial,
- the exact `amount` if partial,
- whether broader item-level refund operations are more appropriate,
- the user explicitly confirmed the refund.

---

## Reporting Guidance

Use `RefundTax` to perform the tax refund.

Use:

```text
BigQueryRunQuery
```

for tax refund reporting, metrics, aggregation, or analysis.

Do not use operational refund or retrieval operations to build tax refund reports.

---

## Final AI/MCP Instruction

Use `RefundTax` when the refund target is specifically a Tax record.

If `amount` is omitted, the entire tax amount is refunded. If `amount` is provided, only that amount is refunded. For broader refund scenarios, prefer the operation that matches the root item being refunded, such as `VoidSale`, `RefundProductSale`, `RefundShipment`, or `RefundSubscriptionRenewal`.


---
Document Parent Directory
* [Operations](https://revcent.com/documentation/markdown/mcp/operation/index.md) - AI/MCP details and overviews for operations available within the RevCent MCP.