Tax Integration

For the cases in which Sensible is responsible for remitting taxes on the purchase of a Weather Guarantee, tools are available to easily assess and collect taxes so that the amount can be included in the charges sent to Sensible. Taxes are assessed on the Weather Guarantee quote prior to quote acceptance and require the customer's billing information. This assessment can happen either at the point of quote creation, or after quote creation but before acceptance.

πŸ’‘To learn more about who is responsible for remitting taxes on a sale, read through the How to determine responsibility for tax remittance section.

API Integration

Creating a Quote with Tax

When the customer's billing information is available at time of quote creation, taxes can be assessed during creation. In order to do this, include a billing_address field in the body of the request and populate it with, at a minimum, values for the customer's postal_code and country:

curl --request POST \
     --url https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}' \
     --header 'content-type: application/json' \
     --data '
{
  "include_plain_language": true,
  "external_attributes": {
    "name": "unique_id",
    "id": "a5691bc8-8e3e-11ee-b9d1-0242ac120002"
  },
  "product_id": "f391f698-8fa4-46b4-a6fb-0663fdf0bf1d",
  "coverage_start_date": "2025-10-01",
  "coverage_end_date": "2025-10-04",
  "coverage_start_hour_number": 8,
  "coverage_end_hour_number": 22,
  "currency": "USD",
  "lang_locale": "en-US",
  "exposure_name": "Diablo Canyon Campsite 14A",
  "exposure_latitude": 35.8048664,
  "exposure_longitude": -106.1389522,
  "exposure_total_coverage_amount": 300.51,
  "external_id": "R1294868",
  "billing_address": {
		"postal_code": "90401",
		"country": "USA"
	}
}
'
import requests
import json

url = "https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee"

payload = json.dumps({
  "include_plain_language": True,
  "external_attributes": {
    "name": "unique_id",
    "id": "a5691bc8-8e3e-11ee-b9d1-0242ac120002"
  },
  "product_id": "f391f698-8fa4-46b4-a6fb-0663fdf0bf1d",
  "coverage_start_date": "2025-10-01",
  "coverage_end_date": "2025-10-04",
  "coverage_start_hour_number": 8,
  "coverage_end_hour_number": 22,
  "currency": "USD",
  "lang_locale": "en-US",
  "exposure_name": "Diablo Canyon Campsite 14A",
  "exposure_latitude": 35.8048664,
  "exposure_longitude": -106.1389522,
  "exposure_total_coverage_amount": 300.51,
  "external_id": "R1294868",
  "billing_address": {
    "postal_code": "90401",
    "country": "USA"
  }
})

headers = {
  'accept': 'application/json',
  'authorization': 'Bearer {{token}}', # Replace {{token}} with your actual token
  'content-type': 'application/json'
}

response = requests.post(url, headers=headers, data=payload)

If the request is successful, the returned quote will include the following fields:

{
		"tax_amount": 7.24,
    "tax_rate": 0.1025,
    "tax_was_assessed": true,
}

For more on the create quote request, visit our API documentation.

Assessing Tax on an Existing Quote

If the customer's billing information is collected after quote creation, or if the tax assessment needs to be updated during checkout to reflect an update in the billing information, this can be done using the assess taxes endpoint. The endpoint expects a body containing a field called billing_address which should contain, at a minimum, values for the customer's postal_code and country:

curl --request PATCH \
     --url https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee/{{guaranteeQuoteID}}/assess-taxes \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}' \
     --header 'content-type: application/json' \
     --data '
{
		"billing_address": {
				"postal_code": "90401",
				"country": "USA"
		}
}
'


import requests
import json

# Replace {{guaranteeQuoteID}} with your actual guarantee quote ID
guarantee_quote_id = "{{guaranteeQuoteID}}"
url = f"https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee/{guarantee_quote_id}/assess-taxes"

payload = json.dumps({
  "billing_address": {
    "postal_code": "90401",
    "country": "USA"
  }
})

headers = {
  'accept': 'application/json',
  'authorization': 'Bearer {{token}}',  # Replace {{token}} with your actual token
  'content-type': 'application/json'
}

response = requests.patch(url, headers=headers, data=payload)

If the request is successful, the response will include the entire updated quote object and include the following fields:

{
		"tax_amount": 7.24,
    "tax_rate": 0.1025,
    "tax_was_assessed": true,
}

SDK Integration

Widget Integration

Addon Integration

Because the Addon fully handles the checkout process, it also handles all tax assessment and collection. Partners do not need to take any additional steps as it pertains to taxes when using the Addon integration.


How to determine responsibility for tax remittance

Responsibility for remitting taxes on the purchase of a Weather Guarantee can be determined by looking at the tax_configuration on the product being used to create quotes. The tax_configuration will either be null or contain an object with a taxable field. If taxable is false, the partner is responsible for assessing and remitting taxes on the sale. If taxable is true, Sensible is responsible for tax remittance. Bryn note: this is true right? taxable means, remitted by or not remitted by Sensible? not that something doesn't actually require any sales tax to be collected for it?

πŸ’‘Whether a product is labeled as taxable is based largely on who the MoR is for the sale, as well as the location of the partner. For partners who are based in the US and are the MoR (instead of Sensible), Sensible will not be remitting taxes. For all non-US partners, and US partners who do not act as the MoR, Sensible will be remitting taxes.

If you aren't sure who is responsible for remitting taxes on the sale of your Weather Guarantees, use the questions below to determine if it is Sensible or the partner. First, start by pulling up the product being used to create Weather Guarantees, and noting the tax_configuration field.

  1. The tax_configuration field on the product is:
    1. NULL β†’ Partner βœ”
    2. an object β†’ go to the next step
  2. The tax_configuration field has a key, taxable, which is:
    1. false β†’ Partner βœ”
    2. true β†’ go to the next step
  3. The location of the partner is:
    1. in the US β†’ go to the next step
    2. non-US β†’ Sensible βœ”
  4. The tax_configuration field has a key, merchant_of_record, which is:
    1. <TK> β†’ Partner βœ”
    2. merchant_of_record_internal β†’ Sensible βœ”

πŸ’‘If you do not yet have a product with a tax configuration established, visit out Tax Assessment and Requirements page to learn about how a product's tax configuration is determined.