Add a refund to a transaction

post/tax/refunds

Request

  • Base URL
    https://api.numeralhq.com
  • URL
    https://api.numeralhq.com/tax/refunds
  • Auth
    HTTP bearer

Request body

transaction_idstring required

The ID of the transaction to refund. This is the transaction_id returned from the /transactions creation response.

type'full' | 'partial' 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_atnumber

Unix timestamp in seconds representing the date and time the refund was made. If not provided, the current date and time will be used.

Example request

{
  "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
    }
  ]
}

Response

Refund response

idstring

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.

objectstring

The type of object: tax.refund.

refund_typestring

This will be either 'full' or 'partial'.

testmodeboolean

True if using a production API key. False if using a test API key.

refund_processed_atnumber

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.

Example response

{
  "id": "ref_tr_123456789",
  "object": "tax.refund",
  "refund_type": "partial",
  "refund_processed_at": 1714787673,
  "line_items": [
    {
      "line_item_id": "li_1783369661107e97b4af5-b61a-487d-aa31-ecee6e616f7f",
      "product": {
        "reference_product_name": "Red Shoes",
        "reference_line_item_id": "line_123456789",
        "reference_product_id": "p-1233543",
        "product_tax_code": "GENERAL_MERCHANDISE"
      },
      "tax_jurisdictions": [
        {
          "tax_rate": 0.07,
          "tax_due_decimal": 724.9275,
          "rate_type": "GENERAL STATE SALES TAX",
          "tax_authority_name": "Tennessee",
          "tax_type": "SALES"
        }
      ],
      "quantity": 2,
      "tax_amount": 14,
      "amount_excluding_tax": 200,
      "amount_including_tax": 214
    }
  ]
}

Changes

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the / request property type changed from no type to object

    • breaking

      the ////// response's property format changed from int32 to no format for status

    • breaking

      the ////// response's property format changed from int32 to no format for status

    • breaking

      the ////// response's property format changed from int32 to no format for status

    • breaking

      the ////// response's property format changed from int32 to no format for status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      api operation id createRefund_v20260301 was added

    • info

      added the new full enum value to the request property

    • info

      added the new partial enum value to the request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      removed subschema #2 from the / response property allOf list for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status