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/products
List all products
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
Request parameters
| Parameter | Location | Type | Description |
|---|
active | query | boolean | Only return products that are active or inactive (e.g., pass `false` to list all inactive products). |
created | query | one of multiple schemas | Only return products that were created during the given date interval. |
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. |
ids | query | array of string | Only return products with the given IDs. Cannot be used with [starting_after](https://api.stripe.com#list_products-starting_after) or [ending_before](https://api.stripe.com#list_products-ending_before). |
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. |
shippable | query | boolean | Only return products that can be shipped (i.e., physical, not digital products). |
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. |
url | query | string | Only return products with the given url. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
data required | array of product | Details about each object. |
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/products
Create a product
Creates a new product object.
Request parameters
| Field | Type | Description |
|---|
active | boolean | Whether the product is currently available for purchase. Defaults to `true`. |
default_price_data | object | Data used to generate a new [Price](https://docs.stripe.com/api/prices) object. This Price will be set as the default price for this product. |
description | string | The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. |
expand | array of string | Specifies which fields in the response should be expanded. |
id | string | An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. |
images | array of string | A list of up to 8 URLs of images for this product, meant to be displayable to the customer. |
marketing_features | array of object | A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table). |
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`. |
name required | string | The product's name, meant to be displayable to the customer. |
package_dimensions | object | The dimensions of this product for shipping purposes. |
shippable | boolean | Whether this product is shipped (i.e., physical goods). |
statement_descriptor | string | An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
It must contain at least one letter. Only used for subscription payments. |
tax_code | string | A [tax code](https://docs.stripe.com/tax/tax-categories) ID. |
unit_label | string | A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. |
url | string | A URL of a publicly-accessible webpage for this product. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
active required | boolean | Whether the product is currently available for purchase. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
default_price | one of multiple schemas | The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product. |
description | string | The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. |
id required | string | Unique identifier for the object. |
images required | array of string | A list of up to 8 URLs of images for this product, meant to be displayable to the customer. |
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`. |
marketing_features required | array of product_marketing_feature | A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table). |
metadata required | 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. |
name required | string | The product's name, meant to be displayable to the customer. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
package_dimensions | one of multiple schemas | The dimensions of this product for shipping purposes. |
shippable | boolean | Whether this product is shipped (i.e., physical goods). |
statement_descriptor | string | Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. |
tax_code | one of multiple schemas | A [tax code](https://docs.stripe.com/tax/tax-categories) ID. |
unit_label | string | A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. |
updated required | integer | Time at which the object was last updated. Measured in seconds since the Unix epoch. |
url | string | A URL of a publicly-accessible webpage for this product. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
GET /v1/products/search
Search products
Search for products you’ve previously created using Stripe’s Search Query Language.
Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating
conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
to an hour behind during outages. Search functionality is not available to merchants in India.
Request parameters
| Parameter | Location | Type | Description |
|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
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. |
page | query | string | A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. |
query | query | string | The search query string. See [search query language](https://docs.stripe.com/search#search-query-language) and the list of supported [query fields for products](https://docs.stripe.com/search#query-fields-for-products). |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
data required | array of product | |
has_more required | boolean | |
next_page | string | |
object required | string | String representing the object's type. Objects of the same type share the same value. |
total_count | integer | The total number of objects that match the query, only accurate up to 10,000. |
url required | string | |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
DELETE /v1/products/{id}
Delete a product
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
Request parameters
| Parameter | Location | Type | Description |
|---|
id | path | string | |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
deleted required | boolean | Always true for a deleted object |
id required | string | Unique identifier for the object. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
GET /v1/products/{id}
Retrieve a product
Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
Request parameters
| Parameter | Location | Type | Description |
|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
id | path | string | |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
active required | boolean | Whether the product is currently available for purchase. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
default_price | one of multiple schemas | The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product. |
description | string | The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. |
id required | string | Unique identifier for the object. |
images required | array of string | A list of up to 8 URLs of images for this product, meant to be displayable to the customer. |
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`. |
marketing_features required | array of product_marketing_feature | A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table). |
metadata required | 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. |
name required | string | The product's name, meant to be displayable to the customer. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
package_dimensions | one of multiple schemas | The dimensions of this product for shipping purposes. |
shippable | boolean | Whether this product is shipped (i.e., physical goods). |
statement_descriptor | string | Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. |
tax_code | one of multiple schemas | A [tax code](https://docs.stripe.com/tax/tax-categories) ID. |
unit_label | string | A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. |
updated required | integer | Time at which the object was last updated. Measured in seconds since the Unix epoch. |
url | string | A URL of a publicly-accessible webpage for this product. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
POST /v1/products/{id}
Update a product
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Request parameters
| Parameter | Location | Type | Description |
|---|
id | path | string | |
| Field | Type | Description |
|---|
active | boolean | Whether the product is available for purchase. |
default_price | string | The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product. |
description | one of multiple schemas | The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. |
expand | array of string | Specifies which fields in the response should be expanded. |
images | one of multiple schemas | A list of up to 8 URLs of images for this product, meant to be displayable to the customer. |
marketing_features | one of multiple schemas | A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table). |
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`. |
name | string | The product's name, meant to be displayable to the customer. |
package_dimensions | one of multiple schemas | The dimensions of this product for shipping purposes. |
shippable | boolean | Whether this product is shipped (i.e., physical goods). |
statement_descriptor | string | An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped.
It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. |
tax_code | one of multiple schemas | A [tax code](https://docs.stripe.com/tax/tax-categories) ID. |
unit_label | one of multiple schemas | A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. |
url | one of multiple schemas | A URL of a publicly-accessible webpage for this product. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
active required | boolean | Whether the product is currently available for purchase. |
created required | integer | Time at which the object was created. Measured in seconds since the Unix epoch. |
default_price | one of multiple schemas | The ID of the [Price](https://docs.stripe.com/api/prices) object that is the default price for this product. |
description | string | The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. |
id required | string | Unique identifier for the object. |
images required | array of string | A list of up to 8 URLs of images for this product, meant to be displayable to the customer. |
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`. |
marketing_features required | array of product_marketing_feature | A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://docs.stripe.com/payments/checkout/pricing-table). |
metadata required | 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. |
name required | string | The product's name, meant to be displayable to the customer. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
package_dimensions | one of multiple schemas | The dimensions of this product for shipping purposes. |
shippable | boolean | Whether this product is shipped (i.e., physical goods). |
statement_descriptor | string | Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. |
tax_code | one of multiple schemas | A [tax code](https://docs.stripe.com/tax/tax-categories) ID. |
unit_label | string | A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. |
updated required | integer | Time at which the object was last updated. Measured in seconds since the Unix epoch. |
url | string | A URL of a publicly-accessible webpage for this product. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
GET /v1/products/{product}/features
List all features attached to a product
Retrieve a list of features for a product
Request parameters
| Parameter | Location | Type | Description |
|---|
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. |
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. |
product | path | string | |
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 product_feature | |
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/products/{product}/features
Attach a feature to a product
Creates a product_feature, which represents a feature attachment to a product
Request parameters
| Parameter | Location | Type | Description |
|---|
product | path | string | |
| Field | Type | Description |
|---|
entitlement_feature required | string | The ID of the [Feature](https://docs.stripe.com/api/entitlements/feature) object attached to this product. |
expand | array of string | Specifies which fields in the response should be expanded. |
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
entitlement_feature required | entitlements.feature | |
id required | string | Unique identifier for the object. |
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`. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
DELETE /v1/products/{product}/features/{id}
Remove a feature from a product
Deletes the feature attachment to a product
Request parameters
| Parameter | Location | Type | Description |
|---|
id | path | string | |
product | path | string | |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
deleted required | boolean | Always true for a deleted object |
id required | string | Unique identifier for the object. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |
GET /v1/products/{product}/features/{id}
Retrieve a product_feature
Retrieves a product_feature, which represents a feature attachment to a product
Request parameters
| Parameter | Location | Type | Description |
|---|
expand | query | array of string | Specifies which fields in the response should be expanded. |
id | path | string | The ID of the product_feature. |
product | path | string | The ID of the product. |
object. See the OpenAPI specification for the complete schema.
Responses
HTTP 200: Successful response.
| Field | Type | Description |
|---|
entitlement_feature required | entitlements.feature | |
id required | string | Unique identifier for the object. |
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`. |
object required | string | String representing the object's type. Objects of the same type share the same value. |
HTTP default: Error response.
| Field | Type | Description |
|---|
error required | api_errors | |