close

Retrieve a product

GET /v1/products/:id

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.

Parameters

No parameters.

Returns

Returns a product object if a valid identifier was provided.

curl https://api.stripe.com/v1/products/ \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"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
}

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

  • activeboolean

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

More parameters

  • createdobject

  • 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.

curl -G https://api.stripe.com/v1/products \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d limit=3
Response
{
"object": "list",
"url": "/v1/products",
"has_more": false,
"data": [
{
"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.

curl -X DELETE https://api.stripe.com/v1/products/ \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"object": "product",
"deleted": true
}