Knox Docs Sign in

API reference

Test mode. Use your secret key on your server; live processing is currently disabled.

https://api.knoxapi.com

Send form-encoded requests with Authorization: Bearer sk_test_....

Complete OpenAPI specification · Integration guide

Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.

GET /v1/tax_rates

List all tax rates

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

Request parameters

ParameterLocationTypeDescription
activequerybooleanOptional flag to filter by tax rates that are either active or inactive (archived).
createdqueryone of multiple schemasOptional range for filtering created date.
ending_beforequerystringA cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
inclusivequerybooleanOptional flag to filter by tax rates that are inclusive (or those that are not inclusive).
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of tax_rate
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/tax_rates

Create a tax rate

Creates a new tax rate.

Request parameters

FieldTypeDescription
activebooleanFlag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
countrystringTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
descriptionstringAn arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
display_name requiredstringThe display name of the tax rate, which will be shown to users.
expandarray of stringSpecifies which fields in the response should be expanded.
inclusive requiredbooleanThis specifies if the tax rate is inclusive or exclusive.
jurisdictionstringThe jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
percentage requirednumberThis represents the tax rate percent out of 100.
statestring[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
tax_typestringThe high-level tax type, such as `vat` or `sales_tax`.

Responses

HTTP 200: Successful response.
FieldTypeDescription
active requiredbooleanDefaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
countrystringTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
descriptionstringAn arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
display_name requiredstringThe display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
effective_percentagenumberActual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction.
flat_amountone of multiple schemasThe amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
id requiredstringUnique identifier for the object.
inclusive requiredbooleanThis specifies if the tax rate is inclusive or exclusive.
jurisdictionstringThe jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
jurisdiction_levelstringThe level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
object requiredstringString representing the object's type. Objects of the same type share the same value.
percentage requirednumberTax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
rate_typestringIndicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
statestring[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
tax_typestringThe high-level tax type, such as `vat` or `sales_tax`.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/tax_rates/{tax_rate}

Retrieve a tax rate

Retrieves a tax rate with the given ID

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
tax_ratepathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
active requiredbooleanDefaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
countrystringTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
descriptionstringAn arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
display_name requiredstringThe display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
effective_percentagenumberActual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction.
flat_amountone of multiple schemasThe amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
id requiredstringUnique identifier for the object.
inclusive requiredbooleanThis specifies if the tax rate is inclusive or exclusive.
jurisdictionstringThe jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
jurisdiction_levelstringThe level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
object requiredstringString representing the object's type. Objects of the same type share the same value.
percentage requirednumberTax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
rate_typestringIndicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
statestring[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
tax_typestringThe high-level tax type, such as `vat` or `sales_tax`.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/tax_rates/{tax_rate}

Update a tax rate

Updates an existing tax rate.

Request parameters

ParameterLocationTypeDescription
tax_ratepathstring
FieldTypeDescription
activebooleanFlag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
countrystringTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
descriptionstringAn arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
display_namestringThe display name of the tax rate, which will be shown to users.
expandarray of stringSpecifies which fields in the response should be expanded.
jurisdictionstringThe jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
metadataone of multiple schemasSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
statestring[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
tax_typestringThe high-level tax type, such as `vat` or `sales_tax`.

Responses

HTTP 200: Successful response.
FieldTypeDescription
active requiredbooleanDefaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set.
countrystringTwo-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
descriptionstringAn arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
display_name requiredstringThe display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page.
effective_percentagenumberActual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage reflects the rate actually used to calculate tax based on the product's taxability and whether the user is registered to collect taxes in the corresponding jurisdiction.
flat_amountone of multiple schemasThe amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate.
id requiredstringUnique identifier for the object.
inclusive requiredbooleanThis specifies if the tax rate is inclusive or exclusive.
jurisdictionstringThe jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
jurisdiction_levelstringThe level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates.
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
object requiredstringString representing the object's type. Objects of the same type share the same value.
percentage requirednumberTax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions.
rate_typestringIndicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax.
statestring[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States.
tax_typestringThe high-level tax type, such as `vat` or `sales_tax`.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors