POST
/
tax
/
calculations
curl --request POST \
  --url https://api.numeralhq.com/tax/calculations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer": {
    "id": "cus_123456789",
    "address": {
      "address_line_1": "3990 N County Rd 300 E",
      "address_line_2": "Unit 2",
      "address_city": "Danville",
      "address_province": "IN",
      "address_postal_code": "46122",
      "address_country": "US",
      "address_type": "shipping"
    }
  },
  "origin_address": {
    "address_line_1": "3990 N County Rd 300 E",
    "address_line_2": "Unit 2",
    "address_city": "Danville",
    "address_province": "IN",
    "address_postal_code": "46122",
    "address_country": "US"
  },
  "order_details": {
    "customer_currency_code": "USD",
    "tax_included_in_amount": false,
    "line_items": [
      {
        "reference_line_item_id": "line_123456789",
        "reference_product_id": "p-1233543",
        "product_category": "GENERAL_MERCHANDISE",
        "amount": 200,
        "quantity": 2
      }
    ]
  },
  "metadata": {
    "example_key": "example_value"
  }
}'
{
  "id": "calc_123456789",
  "object": "tax.calculation",
  "customer_currency_code": "USD",
  "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
    }
  ],
  "tax_included_in_amount": false,
  "total_tax_amount": 14,
  "total_amount_excluding_tax": 200,
  "total_amount_including_tax": 214,
  "expires_at": 1714787673,
  "testmode": "false",
  "metadata": {
    "example_key": "example_value"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Response

200
application/json

Calculate response

The response is of type object.