POST
/
tax
/
refunds
curl --request POST \
  --url https://api.numeralhq.com/tax/refunds \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "transaction_id": "tr_123456789",
  "type": "partial",
  "refund_processed_at": 1714787673,
  "line_items": [
    {
      "reference_product_id": "p-1233543",
      "reference_line_item_id": "line_123456789",
      "sales_amount_refunded": -200,
      "quantity": 2,
      "tax_amount_refunded": -14
    }
  ]
}'
{
  "id": "ref_tr_123456789",
  "object": "tax.refund",
  "refund_type": "partial",
  "testmode": "false",
  "refund_processed_at": 1714787673,
  "line_items": [
    {
      "product": {
        "reference_product_name": "Widget",
        "reference_line_item_id": "line_987654321",
        "reference_product_id": "p-1233543",
        "product_tax_code": "GENERAL_MERCHANDISE"
      },
      "tax_jurisdictions": [
        {
          "tax_rate": 0.07,
          "rate_type": "STATE SALES TAX",
          "jurisdiction_name": "Indiana",
          "fee_amount": 0
        }
      ],
      "quantity": 2,
      "tax_amount": -14,
      "amount_excluding_tax": -200,
      "amount_including_tax": -214
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
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.

Response

200
application/json
Refund response
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
object[]