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.
API Endpoint: DELETE /v1/products/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.product.delete(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.product.delete(id="string")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.
API Endpoint: GET /v1/products
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.product.list()from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.product.list()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.
API Endpoint: GET /v1/products/search
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.product.search(query="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.product.search(query="string")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.
API Endpoint: GET /v1/products/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.product.get(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.product.get(id="string")Create a product
Creates a new product object.
API Endpoint: POST /v1/products
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.product.create(name="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.product.create(name="string")Update a product
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
API Endpoint: POST /v1/products/{id}
from os import getenv
from sideko_stripe import Stripe
client = Stripe(token=getenv("API_TOKEN"))
res = client.product.update(id="string")from os import getenv
from sideko_stripe import AsyncStripe
client = AsyncStripe(token=getenv("API_TOKEN"))
res = await client.product.update(id="string")