---
title: "POST /tax/refunds"
method: POST
path: "/tax/refunds"
---

# POST /tax/refunds

`POST /tax/refunds`

Add a refund to a transaction

## Request body

- RefundRequest
  - `transaction_id` string, required — The ID of the `transaction` to refund. This is the `transaction_id` returned from the `/transactions` creation response.
  - `type` string, required — This will be either `'full'` or `'partial'`. If `type='partial'`, you must also provide the line item(s) you wish to apply refunds against.
  - `refund_processed_at` number — Unix timestamp in **seconds** representing the date and time the refund was made. If not provided, the current date and time will be used.
  - `line_items` object[] — If the refund is `type=full`, line items aren't necessary. If the refund is `type=partial`, you must provide the line item(s) you wish to apply refunds against using a `reference_product_id`.
    - `reference_product_id` string — The ID of the product to apply refunds against. We will attempt to find the line item from the original transaction based on this `reference_product_id`.
    - `reference_line_item_id` string — This **optional** attribute is the ID of the line item from your system. It will be used only for reporting.
    - `sales_amount_refunded` number — The sale amount that was refunded to the customer on this line item, not inclusive of tax refunded.
    - `quantity` number — The quantity of this product being refunded.
    - `tax_amount_refunded` number — The amount of tax that was refunded to the customer.

## Response `200`

Refund response

- RefundResponse
  - `id` string — The ID of the `refund`. We recommend you store this value. If you need to reverse this refund, you will be required to reference this ID.
  - `object` string — The type of object: `tax.refund`.
  - `refund_type` string — This will be either `'full'` or `'partial'`.
  - `testmode` boolean — `True` if using a production API key. `False` if using a test API key.
  - `refund_processed_at` number — Unix timestamp in **seconds** representing the date and time the refund was made. If not provided, the time the `refund` was created will be used.
  - `line_items` RefundTransactionLineItem[]
    - `product` object
      - `reference_product_name` string
      - `reference_line_item_id` string
      - `reference_product_id` string
      - `product_tax_code` string
    - `tax_jurisdictions` object[]
      - `tax_rate` number — The tax rate percentage applied to this transaction.
      - `tax_due_decimal` number — Tax amount due for this jurisdiction in the currency's smallest unit.
      - `rate_type` string — Descriptive rate classification for this jurisdiction.
      - `fee_amount` number — The flat fee that is added to this transaction. Like all numeric values, this will be returned in cents and should be added directly to the tax amount independent of other percentages. For example, a $100 transaction taxed at 5% and with a `fee_amount: 50` will lead to `($100 * 5% + 0.50) = $5.50` in tax being charged
      - `tax_authority_name` string — Name of the tax authority.
      - `tax_authority_type` string — Type of tax authority (e.g., STATE, COUNTY, CITY, DISTRICT).
      - `tax_type` string — Type of tax: SALES, USE, VAT, or GST.
    - `quantity` number — The quantity of this product being refunded.
    - `tax_amount` number — The tax amount, which should be a negative number for refunds.
    - `amount_excluding_tax` number — The amount excluding tax, which should be a negative number for refunds.
    - `amount_including_tax` number — The amount including tax, which should be a negative number for refunds.

## Other responses

- `400` — Unexpected error
- `404` — Transaction not found

---

[API](https://skmtc.net/numeral-com/apis/numeral-api.md) · [All operations](https://skmtc.net/numeral-com/apis/numeral-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/numeral-com/numeral-api/versions/f0af51c3f9b9/schema)
