Create a Calculation
POST/v1/tax/calculations
Calculates tax based on the input and returns a Tax Calculation object.
Body parameters
currencystringRequiredThree-letter ISO currency code, in lowercase. Must be a supported currency.
line_itemsarray of objectsRequiredA list of items the customer is purchasing. You can pass up to 100 line items, or 1,000 if your account has an increased limit.
Show 7 child parameters
amountintegerRequiredmetadataobjectproductstringquantityintegerreferencestringtax_behaviorstringPossible valuesexclusiveinclusive
tax_codestring
customerstringThe ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to
customer_details.customer_detailsobjectDetails about the customer, including address and tax IDs.
Show 5 child parameters
addressobjectShow 6 child parameters
countrystringRequiredcitystringline1stringline2stringpostal_codestringstatestring
address_sourcestringPossible valuesbillingshipping
ip_addressstringtax_idsarray of objectsShow 2 child parameters
typestringRequiredPossible valuesad_nrtae_trnal_tinam_tinao_tinar_cuitau_abnau_arnaw_tinaz_tinba_tinbb_tinbd_binbf_ifubg_uicbh_vat- and 101 more
valuestringRequired
taxability_overridestringPossible valuescustomer_exemptnonereverse_charge
expandarray of stringsSpecifies which fields in the response should be expanded.
ship_from_detailsobjectDetails about the address from which the goods are being shipped.
Show 1 child parameter
addressobjectRequiredShow 6 child parameters
countrystringRequiredcitystringline1stringline2stringpostal_codestringstatestring
shipping_costobjectShipping cost details to be used for the calculation.
Show 4 child parameters
amountintegershipping_ratestringtax_behaviorstringPossible valuesexclusiveinclusive
tax_codestring
tax_dateintegerThe calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window.
Returns
The tax.calculation object.
curl https://api.knoxapi.com/v1/tax/calculations \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d currency=usd \
-d "line_items[0][amount]=1000"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/tax/calculations', {
currency: 'usd',
line_items: [{
amount: 1000,
}],
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/tax/calculations", currency="usd", line_items=[{
"amount": 1000,
}])require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/tax/calculations', {
currency: 'usd',
line_items: [{
amount: 1000,
}],
}){
"amount_total": 1947,
"currency": "usd",
"customer": null,
"customer_details": {
"address": {
"city": "South San Francisco",
"country": "US",
"line1": "354 Oyster Point Blvd",
"line2": "",
"postal_code": "94080",
"state": "CA"
},
"address_source": "shipping",
"ip_address": null,
"tax_ids": [],
"taxability_override": "none"
},
"expires_at": 1234567890,
"id": "taxcalc_1Pgc7HB7WZ01zgkW0snEQbxy",
"livemode": false,
"object": "tax.calculation",
"ship_from_details": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": "75001",
"state": "TX"
}
},
"shipping_cost": {
"amount": 300,
"amount_tax": 0,
"tax_behavior": "exclusive",
"tax_code": "txcd_92010001"
},
"tax_amount_exclusive": 148,
"tax_amount_inclusive": 0,
"tax_breakdown": [
{
"amount": 148,
"inclusive": false,
"tax_rate_details": {
"country": "US",
"percentage_decimal": "9.875",
"state": "CA",
"tax_type": "sales_tax",
"flat_amount": {
"amount": 1413853096,
"currency": "currency"
},
"rate_type": null
},
"taxability_reason": "standard_rated",
"taxable_amount": 1499
},
{
"amount": 0,
"inclusive": false,
"tax_rate_details": {
"country": "US",
"percentage_decimal": "0.0",
"state": "CA",
"tax_type": "sales_tax",
"flat_amount": {
"amount": 1413853096,
"currency": "currency"
},
"rate_type": null
},
"taxability_reason": "product_exempt",
"taxable_amount": 0
}
],
"tax_date": 1234567890
}Create a registration
POST/v1/tax/registrations
Creates a new Tax Registration object.
Body parameters
active_fromstring | integerRequiredTime at which the Tax Registration becomes active. It can be either
nowto indicate the current time, or a future timestamp measured in seconds since the Unix epoch.Possible valuesnow
countrystringRequiredTwo-letter country code (ISO 3166-1 alpha-2).
country_optionsobjectRequiredSpecific options for a registration in the specified
country.Show 101 child parameters
aeobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
alobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
amobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
aoobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
atobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
auobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
awobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
azobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
baobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
bbobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
bdobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
beobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
bfobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
bgobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
bhobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
bjobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
bsobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
byobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
caobjectShow 2 child parameters
typestringRequiredPossible valuesprovince_standardsimplifiedstandard
province_standardobjectChild parameters are listed in the OpenAPI document.
cdobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
chobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
clobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
cmobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
coobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
crobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
cvobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
cyobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
czobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
deobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
dkobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
ecobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
eeobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
egobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
esobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
etobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
fiobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
frobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
gbobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
geobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
gnobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
grobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
hrobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
huobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
idobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
ieobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
inobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
isobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
itobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
jpobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
keobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
kgobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
khobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
krobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
kzobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
laobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
lkobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
ltobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
luobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
lvobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
maobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
mdobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
meobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
mkobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
mrobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
mtobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
mxobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
myobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
ngobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
nlobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
noobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
npobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
nzobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
omobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
peobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
phobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
plobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
ptobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
roobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
rsobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
ruobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
saobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
seobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
sgobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
siobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
skobjectShow 3 child parameters
typestringRequiredPossible valuesiossoss_non_unionoss_unionstandard
igicobjectChild parameters are listed in the OpenAPI document.
standardobjectChild parameters are listed in the OpenAPI document.
snobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
srobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
thobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
tjobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
trobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
twobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
tzobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
uaobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
ugobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
usobjectShow 7 child parameters
statestringRequiredtypestringRequiredPossible valueslocal_amusement_taxlocal_lease_taxmass_transit_parking_taxparking_taxstate_communications_taxstate_retail_delivery_feestate_sales_tax
local_amusement_taxobjectChild parameters are listed in the OpenAPI document.
local_lease_taxobjectChild parameters are listed in the OpenAPI document.
mass_transit_parking_taxobjectChild parameters are listed in the OpenAPI document.
parking_taxobjectChild parameters are listed in the OpenAPI document.
state_sales_taxobjectChild parameters are listed in the OpenAPI document.
uyobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
uzobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
vnobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
zaobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
zmobjectShow 1 child parameter
typestringRequiredPossible valuessimplified
zwobjectShow 2 child parameters
typestringRequiredPossible valuesstandard
standardobjectChild parameters are listed in the OpenAPI document.
expandarray of stringsSpecifies which fields in the response should be expanded.
expires_atintegerIf set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch.
Returns
The tax.registration object.
curl https://api.knoxapi.com/v1/tax/registrations \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-d active_from=1234567890 \
-d country=US \
-d country_options=const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/tax/registrations', {
active_from: 1234567890,
country: 'US',
country_options: {},
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/tax/registrations", active_from=1234567890, country="US", country_options={})require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/tax/registrations', {
active_from: 1234567890,
country: 'US',
country_options: {},
}){
"active_from": 1234567890,
"country": "US",
"country_options": {
"us": {
"state": "CA",
"type": "state_sales_tax"
}
},
"created": 1234567890,
"expires_at": 1234567890,
"id": "taxreg_QXhWPxHxRGhVsh",
"livemode": false,
"object": "tax.registration",
"status": "active"
}List registrations
GET/v1/tax/registrations
Returns a list of Tax Registration objects.
Query parameters
ending_beforestringA cursor for use in pagination.
ending_beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withobj_bar, your subsequent call can includeending_before=obj_barin order to fetch the previous page of the list.expandarray of stringsSpecifies which fields in the response should be expanded.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterstringA cursor for use in pagination.
starting_afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withobj_foo, your subsequent call can includestarting_after=obj_fooin order to fetch the next page of the list.statusstringThe status of the Tax Registration.
Possible valuesactiveallexpiredscheduled
Returns
A list of tax.registration objects.
curl -G https://api.knoxapi.com/v1/tax/registrations \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
--data-urlencode limit=3const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/tax/registrations', {
limit: 3,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/tax/registrations", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/tax/registrations', {
limit: 3,
}){
"object": "list",
"url": "/v1/tax/registrations",
"has_more": false,
"data": [
{
"active_from": 1234567890,
"country": "US",
"country_options": {
"us": {
"state": "CA",
"type": "state_sales_tax"
}
},
"created": 1234567890,
"expires_at": 1234567890,
"id": "taxreg_QXhWPxHxRGhVsh",
"livemode": false,
"object": "tax.registration",
"status": "active"
}
]
}Update settings
POST/v1/tax/settings
Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set.
Body parameters
defaultsobjectDefault configuration to be used on Stripe Tax calculations.
Show 2 child parameters
tax_behaviorstringPossible valuesexclusiveinclusiveinferred_by_currency
tax_codestring
expandarray of stringsSpecifies which fields in the response should be expanded.
head_officeobjectThe place where your business is located.
Show 1 child parameter
addressobjectRequiredShow 6 child parameters
citystringcountrystringline1stringline2stringpostal_codestringstatestring
Returns
The tax.settings object.
curl -X POST https://api.knoxapi.com/v1/tax/settings \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/tax/settings');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/tax/settings")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/tax/settings'){
"defaults": {
"tax_behavior": null,
"tax_code": "txcd_10000000",
"provider": "stripe"
},
"head_office": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": "CA"
}
},
"livemode": false,
"object": "tax.settings",
"status": "active",
"status_details": {
"active": {}
}
}Retrieve settings
GET/v1/tax/settings
Retrieves Tax Settings for a merchant.
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The tax.settings object.
curl https://api.knoxapi.com/v1/tax/settings \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/tax/settings');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/tax/settings")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/tax/settings'){
"defaults": {
"tax_behavior": null,
"tax_code": "txcd_10000000",
"provider": "stripe"
},
"head_office": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": null,
"state": "CA"
}
},
"livemode": false,
"object": "tax.settings",
"status": "active",
"status_details": {
"active": {}
}
}Retrieve a Calculation
GET/v1/tax/calculations/{calculation}
Retrieves a Tax Calculation object, if the calculation hasn’t expired.
Path parameters
calculationstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The tax.calculation object.
curl https://api.knoxapi.com/v1/tax/calculations/taxcalc_1Pgc7HB7WZ01zgkW0snEQbxy \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/tax/calculations/taxcalc_1Pgc7HB7WZ01zgkW0snEQbxy');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/tax/calculations/taxcalc_1Pgc7HB7WZ01zgkW0snEQbxy")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/tax/calculations/taxcalc_1Pgc7HB7WZ01zgkW0snEQbxy'){
"amount_total": 1947,
"currency": "usd",
"customer": null,
"customer_details": {
"address": {
"city": "South San Francisco",
"country": "US",
"line1": "354 Oyster Point Blvd",
"line2": "",
"postal_code": "94080",
"state": "CA"
},
"address_source": "shipping",
"ip_address": null,
"tax_ids": [],
"taxability_override": "none"
},
"expires_at": 1234567890,
"id": "taxcalc_1Pgc7HB7WZ01zgkW0snEQbxy",
"livemode": false,
"object": "tax.calculation",
"ship_from_details": {
"address": {
"city": null,
"country": "US",
"line1": null,
"line2": null,
"postal_code": "75001",
"state": "TX"
}
},
"shipping_cost": {
"amount": 300,
"amount_tax": 0,
"tax_behavior": "exclusive",
"tax_code": "txcd_92010001"
},
"tax_amount_exclusive": 148,
"tax_amount_inclusive": 0,
"tax_breakdown": [
{
"amount": 148,
"inclusive": false,
"tax_rate_details": {
"country": "US",
"percentage_decimal": "9.875",
"state": "CA",
"tax_type": "sales_tax",
"flat_amount": {
"amount": 1413853096,
"currency": "currency"
},
"rate_type": null
},
"taxability_reason": "standard_rated",
"taxable_amount": 1499
},
{
"amount": 0,
"inclusive": false,
"tax_rate_details": {
"country": "US",
"percentage_decimal": "0.0",
"state": "CA",
"tax_type": "sales_tax",
"flat_amount": {
"amount": 1413853096,
"currency": "currency"
},
"rate_type": null
},
"taxability_reason": "product_exempt",
"taxable_amount": 0
}
],
"tax_date": 1234567890
}Update a registration
POST/v1/tax/registrations/{id}
Updates an existing Tax Registration object. A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at.
Path parameters
idstringRequired
Body parameters
active_fromstring | integerTime at which the registration becomes active. It can be either
nowto indicate the current time, or a timestamp measured in seconds since the Unix epoch.Possible valuesnow
expandarray of stringsSpecifies which fields in the response should be expanded.
expires_atstring | integerIf set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either
nowto indicate the current time, or a timestamp measured in seconds since the Unix epoch.Possible valuesnow
Returns
The tax.registration object.
curl -X POST https://api.knoxapi.com/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('POST', '/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("post", "/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:post, '/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh'){
"active_from": 1234567890,
"country": "US",
"country_options": {
"us": {
"state": "CA",
"type": "state_sales_tax"
}
},
"created": 1234567890,
"expires_at": 1234567890,
"id": "taxreg_QXhWPxHxRGhVsh",
"livemode": false,
"object": "tax.registration",
"status": "active"
}Retrieve a registration
GET/v1/tax/registrations/{id}
Returns a Tax Registration object.
Path parameters
idstringRequired
Query parameters
expandarray of stringsSpecifies which fields in the response should be expanded.
Returns
The tax.registration object.
curl https://api.knoxapi.com/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh \
-H "Authorization: Bearer $KNOX_SECRET_KEY"const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh');import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh")require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/tax/registrations/taxreg_QXhWPxHxRGhVsh'){
"active_from": 1234567890,
"country": "US",
"country_options": {
"us": {
"state": "CA",
"type": "state_sales_tax"
}
},
"created": 1234567890,
"expires_at": 1234567890,
"id": "taxreg_QXhWPxHxRGhVsh",
"livemode": false,
"object": "tax.registration",
"status": "active"
}Retrieve a Calculation's line items
GET/v1/tax/calculations/{calculation}/line_items
Retrieves the line items of a tax calculation as a collection, if the calculation hasn’t expired.
Path parameters
calculationstringRequired
Query parameters
ending_beforestringA cursor for use in pagination.
ending_beforeis an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withobj_bar, your subsequent call can includeending_before=obj_barin order to fetch the previous page of the list.expandarray of stringsSpecifies which fields in the response should be expanded.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterstringA cursor for use in pagination.
starting_afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withobj_foo, your subsequent call can includestarting_after=obj_fooin order to fetch the next page of the list.
Returns
A list of tax.calculation_line_item objects.
curl -G https://api.knoxapi.com/v1/tax/calculations/calculation_123/line_items \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
--data-urlencode limit=3const Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const response = await stripe.rawRequest('GET', '/v1/tax/calculations/calculation_123/line_items', {
limit: 3,
});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
response = client.raw_request("get", "/v1/tax/calculations/calculation_123/line_items", limit=3)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
response = Stripe.raw_request(:get, '/v1/tax/calculations/calculation_123/line_items', {
limit: 3,
}){
"object": "list",
"url": "/v1/tax/calculations",
"has_more": false,
"data": [
{
"amount": 1499,
"amount_tax": 148,
"id": "tax_li_QXhWXb3MbhgP1Q",
"livemode": false,
"object": "tax.calculation_line_item",
"product": null,
"quantity": 1,
"reference": "Pepperoni Pizza",
"tax_behavior": "exclusive",
"tax_code": "txcd_40060003",
"metadata": null
}
]
}Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.