API reference
Test mode. Use your secret key on your server; live processing is currently disabled.
https://api.knoxapi.comSend 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
| Parameter | Location | Type | Description |
|---|---|---|---|
active | query | boolean | Optional flag to filter by tax rates that are either active or inactive (archived). |
created | query | one of multiple schemas | Optional range for filtering created date. |
ending_before | query | string | A 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. |
expand | query | array of string | Specifies which fields in the response should be expanded. |
inclusive | query | boolean | Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). |
limit | query | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. |
starting_after | query | string | A 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.
| Field | Type | Description |
|---|---|---|
data required | array of tax_rate | |
has_more required | boolean | True if this list has another page of items after this one that can be fetched. |
object required | string | String representing the object's type. Objects of the same type share the same value. Always has the value `list`. |
url required | string | The URL where this list can be accessed. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
POST /v1/tax_rates
Create a tax rate
Creates a new tax rate.
Request parameters
| Field | Type | Description |
|---|---|---|
active | boolean | Flag 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. |
country | string | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
description | string | An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. |
display_name required | string | The display name of the tax rate, which will be shown to users. |
expand | array of string | Specifies which fields in the response should be expanded. |
inclusive required | boolean | This specifies if the tax rate is inclusive or exclusive. |
jurisdiction | string | The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. |
metadata | object | Set 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 required | number | This represents the tax rate percent out of 100. |
state | string | [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_type | string | The high-level tax type, such as `vat` or `sales_tax`. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
active required | boolean | Defaults 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. |
country | string | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
description | string | An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. |
display_name required | string | The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. |
effective_percentage | number | Actual/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_amount | one of multiple schemas | The 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 required | string | Unique identifier for the object. |
inclusive required | boolean | This specifies if the tax rate is inclusive or exclusive. |
jurisdiction | string | The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. |
jurisdiction_level | string | The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | object | Set 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 required | string | String representing the object's type. Objects of the same type share the same value. |
percentage required | number | Tax 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_type | string | Indicates 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. |
state | string | [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_type | string | The high-level tax type, such as `vat` or `sales_tax`. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
GET /v1/tax_rates/{tax_rate}
Retrieve a tax rate
Retrieves a tax rate with the given ID
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
tax_rate | path | string |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
active required | boolean | Defaults 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. |
country | string | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
description | string | An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. |
display_name required | string | The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. |
effective_percentage | number | Actual/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_amount | one of multiple schemas | The 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 required | string | Unique identifier for the object. |
inclusive required | boolean | This specifies if the tax rate is inclusive or exclusive. |
jurisdiction | string | The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. |
jurisdiction_level | string | The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | object | Set 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 required | string | String representing the object's type. Objects of the same type share the same value. |
percentage required | number | Tax 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_type | string | Indicates 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. |
state | string | [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_type | string | The high-level tax type, such as `vat` or `sales_tax`. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |
POST /v1/tax_rates/{tax_rate}
Update a tax rate
Updates an existing tax rate.
Request parameters
| Parameter | Location | Type | Description |
|---|---|---|---|
tax_rate | path | string |
| Field | Type | Description |
|---|---|---|
active | boolean | Flag 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. |
country | string | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
description | string | An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. |
display_name | string | The display name of the tax rate, which will be shown to users. |
expand | array of string | Specifies which fields in the response should be expanded. |
jurisdiction | string | The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. |
metadata | one of multiple schemas | Set 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`. |
state | string | [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_type | string | The high-level tax type, such as `vat` or `sales_tax`. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|---|---|
active required | boolean | Defaults 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. |
country | string | Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
description | string | An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. |
display_name required | string | The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. |
effective_percentage | number | Actual/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_amount | one of multiple schemas | The 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 required | string | Unique identifier for the object. |
inclusive required | boolean | This specifies if the tax rate is inclusive or exclusive. |
jurisdiction | string | The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. |
jurisdiction_level | string | The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. |
livemode required | boolean | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | object | Set 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 required | string | String representing the object's type. Objects of the same type share the same value. |
percentage required | number | Tax 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_type | string | Indicates 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. |
state | string | [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_type | string | The high-level tax type, such as `vat` or `sales_tax`. |
HTTP default: Error response.
| Field | Type | Description |
|---|---|---|
error required | api_errors |