List all products
GET / v1 / products
Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
Parameters
- active boolean Only return products that are active or inactive (e.g., pass
falseto list all inactive products).
More parameters
- created object
- ending _ before string
- ids array of strings
- limit integer
- shippable boolean
- starting _ after string
- url string
Returns
A dictionary with a data property that contains an array of up to limit products, starting after product starting_after. Each entry in the array is a separate product object. If no more products are available, the resulting array will be empty.
Response
{ "object": "list", "url": "/v1/products", "has_more": false, "data": [ { "id": "prod_NWjs8kKbJWmuuc", "object": "product", "active": true, "created": 1678833149, "default_price": null, "description": null, "images": [], "marketing_features": [], "livemode": false, "metadata": {}, "name": "Gold Plan", "package_dimensions": null, "shippable": null, "statement_descriptor": null, "tax_code": null, "unit_label": null, "updated": 1678833149, "url": null } ]}
Delete a product
DELETE / v1 / products /:id
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.
Parameters
No parameters.
Returns
Returns a deleted object on success. Otherwise, this call raises an error.
Response
{ "id": "prod_NWjs8kKbJWmuuc", "object": "product", "deleted": true}
Search products
GET / v1 / products / search
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.
Parameters
- query string Required The search query string. See search query language and the list of supported query fields for products.
- limit integer A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- page 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.
Returns
A dictionary with a data property that contains an array of up to limit products. If no objects match the query, the resulting array will be empty. See the related guide on expanding properties in lists.
Response
