POST /v1/tax/calculations

Calculates tax based on the input and returns a Tax Calculation object.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
customer String No

The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to customer_details.

line_items[] Array Yes

A list of items the customer is purchasing.

line_items[].tax_code String No
line_items[].amount Integer Yes
line_items[].quantity Integer No
line_items[].metadata Object No
line_items[].product String No
line_items[].reference String No
line_items[].tax_behavior String No

Possible values:

  • "inclusive"
  • "exclusive"
tax_date Integer No

Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future.

customer_details Object No

Details about the customer, including address and tax IDs.

customer_details.ip_address String No
customer_details.address_source String No

Possible values:

  • "shipping"
  • "billing"
customer_details.tax_ids[] Array No
customer_details.tax_ids[].type String Yes

Possible values:

  • "br_cnpj"
  • "ng_tin"
  • "my_sst"
  • "bj_ifu"
  • "ca_gst_hst"
  • "tz_vat"
  • "eu_oss_vat"
  • "aw_tin"
  • "ad_nrt"
  • "my_frp"
  • "bo_tin"
  • "kg_tin"
  • "au_arn"
  • "mx_rfc"
  • "pe_ruc"
  • "hk_br"
  • "nz_gst"
  • "sg_uen"
  • "zw_tin"
  • "me_pib"
  • "br_cpf"
  • "au_abn"
  • "ge_vat"
  • "kr_brn"
  • "cd_nif"
  • "eu_vat"
  • "bg_uic"
  • "eg_tin"
  • "al_tin"
  • "sv_nit"
  • "il_vat"
  • "ro_tin"
  • "sg_gst"
  • "jp_rn"
  • "np_pan"
  • "vn_tin"
  • "sa_vat"
  • "ba_tin"
  • "ao_tin"
  • "az_tin"
  • "ca_qst"
  • "ca_pst_mb"
  • "tw_vat"
  • "mk_vat"
  • "bb_tin"
  • "li_uid"
  • "om_vat"
  • "za_vat"
  • "md_vat"
  • "ec_ruc"
  • "tr_tin"
  • "uz_tin"
  • "si_tin"
  • "ma_vat"
  • "bf_ifu"
  • "hr_oib"
  • "bd_bin"
  • "co_nit"
  • "ru_kpp"
  • "no_voec"
  • "ke_pin"
  • "us_ein"
  • "ug_tin"
  • "do_rcn"
  • "th_vat"
  • "mr_nif"
  • "ch_vat"
  • "ar_cuit"
  • "jp_cn"
  • "cn_tin"
  • "rs_pib"
  • "ca_bn"
  • "de_stn"
  • "es_cif"
  • "ua_vat"
  • "ca_pst_bc"
  • "li_vat"
  • "ae_trn"
  • "ph_tin"
  • "id_npwp"
  • "jp_trn"
  • "is_vat"
  • "gb_vat"
  • "hu_tin"
  • "sr_fin"
  • "gn_nif"
  • "zm_tin"
  • "cm_niu"
  • "no_vat"
  • "bs_tin"
  • "ch_uid"
  • "la_tin"
  • "kz_bin"
  • "uz_vat"
  • "ca_pst_sk"
  • "by_tin"
  • "cv_nif"
  • "kh_tin"
  • "bh_vat"
  • "in_gst"
  • "my_itn"
  • "am_tin"
  • "cl_tin"
  • "uy_ruc"
  • "ve_rif"
  • "ru_inn"
  • "sn_ninea"
  • "et_tin"
  • "cr_tin"
  • "tj_tin"
customer_details.tax_ids[].value String Yes
customer_details.taxability_override String No

Possible values:

  • "customer_exempt"
  • "reverse_charge"
  • "none"
customer_details.address Object No
customer_details.address.line2 No
customer_details.address.line1 No
customer_details.address.postal_code No
customer_details.address.country String Yes
customer_details.address.state No
customer_details.address.city No
expand[] Array No

Specifies which fields in the response should be expanded.

shipping_cost Object No

Shipping cost details to be used for the calculation.

shipping_cost.shipping_rate String No
shipping_cost.tax_code String No
shipping_cost.amount Integer No
shipping_cost.tax_behavior String No

Possible values:

  • "inclusive"
  • "exclusive"
currency String Yes

Three-letter ISO currency code, in lowercase. Must be a supported currency.

ship_from_details Object No

Details about the address from which the goods are being shipped.

ship_from_details.address Object Yes
ship_from_details.address.line2 No
ship_from_details.address.line1 No
ship_from_details.address.postal_code No
ship_from_details.address.country String Yes
ship_from_details.address.state No
ship_from_details.address.city No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.