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.

Parameters

  • activeboolean

    Only return products that are active or inactive (e.g., pass false to list all inactive products).

More parameters

  • createdDictionary

  • ending_beforestring

  • idsarray of strings

  • limitinteger

  • shippableboolean

  • starting_afterstring

  • urlstring

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.

GET /v1/products
StripeConfiguration.ApiKey = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2";
var options = new ProductListOptions { Limit = 3 };
var service = new ProductService();
StripeList<Product> products = service.List(options);
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 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 throws an error.

DELETE /v1/products/:id
StripeConfiguration.ApiKey = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2";
var service = new ProductService();
Product deleted = service.Delete("prod_NWjs8kKbJWmuuc");
Response
{
"id": "prod_NWjs8kKbJWmuuc",
"object": "product",
"deleted": true
}

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.

Parameters

  • querystringRequired

    The search query string. See search query language and the list of supported query fields for products.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • pagestring

    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.

GET /v1/products/search
StripeConfiguration.ApiKey = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2";
var options = new ProductSearchOptions
{
Query = "active:'true' AND metadata['order_id']:'6735'",
};
var service = new ProductService();
StripeSearchResult<Product> products = service.Search(options);
Response
{
"object": "search_result",
"url": "/v1/products/search",
"has_more": false,
"data": [
{
"id": "prod_NZOkxQ8eTZEHwN",
"object": "product",
"active": true,
"created": 1679446501,
"default_price": null,
"description": null,
"images": [],
"livemode": false,
"metadata": {
"order_id": "6735"
},
"name": "Gold Plan",
"package_dimensions": null,
"shippable": null,
"statement_descriptor": null,
"tax_code": null,
"unit_label": null,
"updated": 1679446501,
"url": null
}
]
}

Prices 

Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. Products help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.

For example, you might have a single “gold” product that has prices for $10/month, $100/year, and €9 once.

Related guides: Set up a subscription, create an invoice, and more about products and prices.

Coupons 

A coupon contains information about a percent-off or amount-off discount you might want to apply to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional one-off charges or payment intents.