openapi: 3.0.0
info:
title: Stripe Products API
description: Needs description.
contact:
email: [email protected]
name: Stripe Dev Platform Team
url: https://stripe.com
termsOfService: https://stripe.com/us/terms/
version: '2023-10-16'
x-stripeSpecFilename: spec3
security:
- basicAuth: []
- bearerAuth: []
servers:
- url: https://api.stripe.com/
paths:
/v1/products:
get:
description: >-
<p>Returns a list of your products. The products are returned sorted by
creation date, with the most recently created products appearing
first.</p>
operationId: GetProducts
parameters:
- description: >-
Only return products that are active or inactive (e.g., pass `false`
to list all inactive products).
in: query
name: active
required: false
schema:
type: boolean
style: form
- description: >-
Only return products that were created during the given date
interval.
explode: true
in: query
name: created
required: false
schema:
anyOf:
- properties:
gt:
type: integer
gte:
type: integer
lt:
type: integer
lte:
type: integer
title: range_query_specs
type: object
- type: integer
style: deepObject
- description: >-
A cursor for use in pagination. `ending_before` is an object ID that
defines your place in the list. For instance, if you make a list
request and receive 100 objects, starting with `obj_bar`, your
subsequent call can include `ending_before=obj_bar` in order to
fetch the previous page of the list.
in: query
name: ending_before
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: >-
Only return products with the given IDs. Cannot be used with
[starting_after](https://stripe.com/docs/api#list_products-starting_after)
or
[ending_before](https://stripe.com/docs/api#list_products-ending_before).
explode: true
in: query
name: ids
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: >-
A limit on the number of objects to be returned. Limit can range
between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: >-
Only return products that can be shipped (i.e., physical, not
digital products).
in: query
name: shippable
required: false
schema:
type: boolean
style: form
- description: >-
A cursor for use in pagination. `starting_after` is an object ID
that defines your place in the list. For instance, if you make a
list request and receive 100 objects, ending with `obj_foo`, your
subsequent call can include `starting_after=obj_foo` in order to
fetch the next page of the list.
in: query
name: starting_after
required: false
schema:
maxLength: 5000
type: string
style: form
- description: Only return products with the given url.
in: query
name: url
required: false
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetProductsRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/ProductList'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
tags:
- Products
post:
description: <p>Creates a new product object.</p>
operationId: PostProducts
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
default_price_data:
explode: true
style: deepObject
expand:
explode: true
style: deepObject
features:
explode: true
style: deepObject
images:
explode: true
style: deepObject
metadata:
explode: true
style: deepObject
package_dimensions:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostProductsRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
tags:
- Products
/v1/products/search:
get:
description: >-
<p>Search for products you’ve previously created using Stripe’s <a
href="/docs/search#search-query-language">Search Query Language</a>.
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.</p>
operationId: GetProductsSearch
parameters:
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- description: >-
A limit on the number of objects to be returned. Limit can range
between 1 and 100, and the default is 10.
in: query
name: limit
required: false
schema:
type: integer
style: form
- description: >-
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.
in: query
name: page
required: false
schema:
maxLength: 5000
type: string
style: form
- description: >-
The search query string. See [search query
language](https://stripe.com/docs/search#search-query-language) and
the list of supported [query fields for
products](https://stripe.com/docs/search#query-fields-for-products).
in: query
name: query
required: true
schema:
maxLength: 5000
type: string
style: form
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetProductsSearchRequest'
required: false
responses:
'200':
content:
application/json:
schema:
description: ''
x-expandableFields:
- data
$ref: '#/components/schemas/SearchResult'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
tags:
- Products
/v1/products/{id}:
delete:
description: >-
<p>Delete a product. Deleting a product is only possible if it has no
prices associated with it. Additionally, deleting a product with
<code>type=good</code> is only possible if it has no SKUs associated
with it.</p>
operationId: DeleteProductsId
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/DeleteProductsIdRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/deleted_product'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
tags:
- Products
get:
description: >-
<p>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.</p>
operationId: GetProductsId
parameters:
- description: Specifies which fields in the response should be expanded.
explode: true
in: query
name: expand
required: false
schema:
items:
maxLength: 5000
type: string
type: array
style: deepObject
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding: {}
schema:
additionalProperties: false
$ref: '#/components/schemas/GetProductsIdRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
tags:
- Products
post:
description: >-
<p>Updates the specific product by setting the values of the parameters
passed. Any parameters not provided will be left unchanged.</p>
operationId: PostProductsId
parameters:
- in: path
name: id
required: true
schema:
maxLength: 5000
type: string
style: simple
requestBody:
content:
application/x-www-form-urlencoded:
encoding:
description:
explode: true
style: deepObject
expand:
explode: true
style: deepObject
features:
explode: true
style: deepObject
images:
explode: true
style: deepObject
metadata:
explode: true
style: deepObject
package_dimensions:
explode: true
style: deepObject
tax_code:
explode: true
style: deepObject
unit_label:
explode: true
style: deepObject
url:
explode: true
style: deepObject
schema:
additionalProperties: false
$ref: '#/components/schemas/PostProductsIdRequest'
required: false
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/product'
description: Successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Error response.
tags:
- Products
components:
schemas:
error:
description: An error response from the Stripe API
properties:
error:
$ref: '#/components/schemas/api_errors'
required:
- error
type: object
product:
description: >-
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](https://stripe.com/docs/api#prices) to configure pricing in
Payment Links, Checkout, and Subscriptions.
Related guides: [Set up a
subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription),
[share a Payment Link](https://stripe.com/docs/payment-links),
[accept payments with
Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront),
and more about [Products and
Prices](https://stripe.com/docs/products-prices/overview)
properties:
active:
description: Whether the product is currently available for purchase.
type: boolean
created:
description: >-
Time at which the object was created. Measured in seconds since the
Unix epoch.
format: unix-time
type: integer
default_price:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/price'
description: >-
The ID of the [Price](https://stripe.com/docs/api/prices) object
that is the default price for this product.
nullable: true
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/price'
description:
description: >-
The product's description, meant to be displayable to the customer.
Use this field to optionally store a long form explanation of the
product being sold for your own rendering purposes.
maxLength: 5000
nullable: true
type: string
features:
description: >-
A list of up to 15 features for this product. These are displayed in
[pricing
tables](https://stripe.com/docs/payments/checkout/pricing-table).
items:
$ref: '#/components/schemas/product_feature'
type: array
id:
description: Unique identifier for the object.
maxLength: 5000
type: string
images:
description: >-
A list of up to 8 URLs of images for this product, meant to be
displayable to the customer.
items:
maxLength: 5000
type: string
type: array
livemode:
description: >-
Has the value `true` if the object exists in live mode or the value
`false` if the object exists in test mode.
type: boolean
metadata:
additionalProperties:
maxLength: 500
type: string
description: >-
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that
you can attach to an object. This can be useful for storing
additional information about the object in a structured format.
type: object
name:
description: The product's name, meant to be displayable to the customer.
maxLength: 5000
type: string
object:
description: >-
String representing the object's type. Objects of the same type
share the same value.
enum:
- product
type: string
package_dimensions:
anyOf:
- $ref: '#/components/schemas/package_dimensions'
description: The dimensions of this product for shipping purposes.
nullable: true
shippable:
description: Whether this product is shipped (i.e., physical goods).
nullable: true
type: boolean
statement_descriptor:
description: >-
Extra information about a product which will appear on your
customer's credit card statement. In the case that multiple products
are billed at once, the first statement descriptor will be used.
maxLength: 5000
nullable: true
type: string
tax_code:
anyOf:
- maxLength: 5000
type: string
- $ref: '#/components/schemas/tax_code'
description: A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
nullable: true
x-expansionResources:
oneOf:
- $ref: '#/components/schemas/tax_code'
unit_label:
description: >-
A label that represents units of this product. When set, this will
be included in customers' receipts, invoices, Checkout, and the
customer portal.
maxLength: 5000
nullable: true
type: string
updated:
description: >-
Time at which the object was last updated. Measured in seconds since
the Unix epoch.
format: unix-time
type: integer
url:
description: A URL of a publicly-accessible webpage for this product.
maxLength: 2048
nullable: true
type: string
required:
- active
- created
- features
- id
- images
- livemode
- metadata
- name
- object
- updated
title: Product
type: object
x-expandableFields:
- default_price
- features
- package_dimensions
- tax_code
x-resourceId: product
deleted_product:
description: ''
properties:
deleted:
description: Always true for a deleted object
enum:
- true
type: boolean
id:
description: Unique identifier for the object.
maxLength: 5000
type: string
object:
description: >-
String representing the object's type. Objects of the same type
share the same value.
enum:
- product
type: string
required:
- deleted
- id
- object
title: DeletedProduct
type: object
x-expandableFields: []
x-resourceId: deleted_product
GetProductsRequest:
type: object
properties: {}
ProductList:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
description: Details about each object.
items:
$ref: '#/components/schemas/product'
type: array
has_more:
description: >-
True if this list has another page of items after this one that can
be fetched.
type: boolean
object:
description: >-
String representing the object's type. Objects of the same type
share the same value. Always has the value `list`.
enum:
- list
type: string
url:
description: The URL where this list can be accessed.
maxLength: 5000
pattern: ^/v1/products
type: string
PostProductsRequest:
type: object
required:
- name
properties:
active:
description: >-
Whether the product is currently available for purchase. Defaults to
`true`.
type: boolean
default_price_data:
description: >-
Data used to generate a new
[Price](https://stripe.com/docs/api/prices) object. This Price will
be set as the default price for this product.
properties:
currency:
type: string
currency_options:
additionalProperties:
properties:
custom_unit_amount:
properties:
enabled:
type: boolean
maximum:
type: integer
minimum:
type: integer
preset:
type: integer
required:
- enabled
title: custom_unit_amount
type: object
tax_behavior:
enum:
- exclusive
- inclusive
- unspecified
type: string
tiers:
items:
properties:
flat_amount:
type: integer
flat_amount_decimal:
format: decimal
type: string
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
up_to:
anyOf:
- enum:
- inf
maxLength: 5000
type: string
- type: integer
required:
- up_to
title: tier
type: object
type: array
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
title: currency_option
type: object
type: object
recurring:
properties:
interval:
enum:
- day
- month
- week
- year
type: string
interval_count:
type: integer
required:
- interval
title: recurring_adhoc
type: object
tax_behavior:
enum:
- exclusive
- inclusive
- unspecified
type: string
unit_amount:
type: integer
unit_amount_decimal:
format: decimal
type: string
required:
- currency
title: price_data_without_product
type: object
description:
description: >-
The product's description, meant to be displayable to the customer.
Use this field to optionally store a long form explanation of the
product being sold for your own rendering purposes.
maxLength: 40000
type: string
expand:
description: Specifies which fields in the response should be expanded.
items:
maxLength: 5000
type: string
type: array
features:
description: >-
A list of up to 15 features for this product. These are displayed in
[pricing
tables](https://stripe.com/docs/payments/checkout/pricing-table).
items:
properties:
name:
maxLength: 5000
type: string
required:
- name
title: features
type: object
type: array
id:
description: >-
An identifier will be randomly generated by Stripe. You can
optionally override this ID, but the ID must be unique across all
products in your Stripe account.
maxLength: 5000
type: string
images:
description: >-
A list of up to 8 URLs of images for this product, meant to be
displayable to the customer.
items:
type: string
type: array
metadata:
additionalProperties:
type: string
description: >-
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that
you can attach to an object. This can be useful for storing
additional information about the object in a structured format.
Individual keys can be unset by posting an empty value to them. All
keys can be unset by posting an empty value to `metadata`.
type: object
name:
description: The product's name, meant to be displayable to the customer.
maxLength: 5000
type: string
package_dimensions:
description: The dimensions of this product for shipping purposes.
properties:
height:
type: number
length:
type: number
weight:
type: number
width:
type: number
required:
- height
- length
- weight
- width
title: package_dimensions_specs
type: object
shippable:
description: Whether this product is shipped (i.e., physical goods).
type: boolean
statement_descriptor:
description: >-
An arbitrary string to be displayed on your customer's credit card
or bank statement. While most banks display this information
consistently, some may display it incorrectly or not at all.
This may be up to 22 characters. The statement description may not
include `<`, `>`, `\`, `"`, `'` characters, and will appear on your
customer's statement in capital letters. Non-ASCII characters are
automatically stripped.
It must contain at least one letter.
maxLength: 22
type: string
tax_code:
description: A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
type: string
unit_label:
description: >-
A label that represents units of this product. When set, this will
be included in customers' receipts, invoices, Checkout, and the
customer portal.
maxLength: 12
type: string
url:
description: A URL of a publicly-accessible webpage for this product.
maxLength: 5000
type: string
GetProductsSearchRequest:
type: object
properties: {}
SearchResult:
type: object
required:
- data
- has_more
- object
- url
properties:
data:
items:
$ref: '#/components/schemas/product'
type: array
has_more:
type: boolean
next_page:
maxLength: 5000
nullable: true
type: string
object:
description: >-
String representing the object's type. Objects of the same type
share the same value.
enum:
- search_result
type: string
total_count:
description: >-
The total number of objects that match the query, only accurate up
to 10,000.
type: integer
url:
maxLength: 5000
type: string
DeleteProductsIdRequest:
type: object
properties: {}
GetProductsIdRequest:
type: object
properties: {}
PostProductsIdRequest:
type: object
properties:
active:
description: Whether the product is available for purchase.
type: boolean
default_price:
description: >-
The ID of the [Price](https://stripe.com/docs/api/prices) object
that is the default price for this product.
maxLength: 5000
type: string
description:
anyOf:
- maxLength: 40000
type: string
- enum:
- ''
type: string
description: >-
The product's description, meant to be displayable to the customer.
Use this field to optionally store a long form explanation of the
product being sold for your own rendering purposes.
expand:
description: Specifies which fields in the response should be expanded.
items:
maxLength: 5000
type: string
type: array
features:
anyOf:
- items:
properties:
name:
maxLength: 5000
type: string
required:
- name
title: features
type: object
type: array
- enum:
- ''
type: string
description: >-
A list of up to 15 features for this product. These are displayed in
[pricing
tables](https://stripe.com/docs/payments/checkout/pricing-table).
images:
anyOf:
- items:
type: string
type: array
- enum:
- ''
type: string
description: >-
A list of up to 8 URLs of images for this product, meant to be
displayable to the customer.
metadata:
anyOf:
- additionalProperties:
type: string
type: object
- enum:
- ''
type: string
description: >-
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that
you can attach to an object. This can be useful for storing
additional information about the object in a structured format.
Individual keys can be unset by posting an empty value to them. All
keys can be unset by posting an empty value to `metadata`.
name:
description: The product's name, meant to be displayable to the customer.
maxLength: 5000
type: string
package_dimensions:
anyOf:
- properties:
height:
type: number
length:
type: number
weight:
type: number
width:
type: number
required:
- height
- length
- weight
- width
title: pac
# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/stripe/refs/heads/main/openapi/stripe-products-api-openapi.yml