Product
Products describe the specific goods or services you offer to your customers. For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. They can be used in conjunction with Prices to configure pricing in Payment Links, Checkout, and Subscriptions.
Related guides: Set up a subscription, share a Payment Link, accept payments with Checkout, and more about Products and Prices
Summary
Functions
Create a product
Delete a product
List all products
Retrieve a product
Search products
Update a product
Functions
@spec create(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Create a product
Creates a new product object.
@spec delete(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
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.
@spec list(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
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.
@spec retrieve(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
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.
@spec search(StripeElixir.Client.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
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.
@spec update(StripeElixir.Client.t(), String.t(), map(), keyword()) :: {:ok, term()} | {:error, StripeElixir.Error.t()}
Update a product
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.