Skip to content

Stripe: Subscription items schemas

4 Stripe schemas with complete fields and constraints.

← Subscription items operations · All schemas

Create a subscription item — response body

FieldTypePresenceDescription and constraints
$objectRootSubscription items allow you to create customer subscriptions with more than
one plan, making it easy to represent complex billing relationships.
billed_untilJSONOptional
billed_until (anyOf 1)integerAlternativeThe time period the subscription item has been billed for.
Format: unix-time
billed_until (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
billing_thresholdsJSONOptional
billing_thresholds (anyOf 1)JSONAlternativeDefine thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
billing_thresholds (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a subscription item — response body — billing thresholds value usage gte
billing_thresholds (anyOf 2)nullAlternative
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
current_period_endJSONRequired within parent
current_period_end (anyOf 1)integerAlternativeThe end time of this subscription item's current billing period.
Format: unix-time
current_period_end (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
current_period_startJSONRequired within parent
current_period_start (anyOf 1)integerAlternativeThe start time of this subscription item's current billing period.
Format: unix-time
current_period_start (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
current_trialJSONOptional
current_trial (anyOf 1)JSONAlternativeThe current trial that is applied to this subscription item.
current_trial (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a subscription item — response body — current trial value end date, start date, trial offer
current_trial (anyOf 2)nullAlternative
discountsarrayRequired within parentThe discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
discounts[]JSONEach item
discounts[] (anyOf 1)stringAlternativeMaximum length: 5000
discounts[] (anyOf 2)ModelAlternativeExpand Get Customers Customer Discount — response body
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
metadataobjectRequired within parentSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata.*stringAdditional keysMaximum length: 500
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: subscription_item
priceModelRequired within parentExpand Create a price — response body
quantityJSONOptional
quantity (anyOf 1)integerAlternativeThe [quantity](https://docs.stripe.com/subscriptions/quantities) of the plan to which the customer should be subscribed.
quantity (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subscriptionstringRequired within parentThe `subscription` this `subscription_item` belongs to.
Maximum length: 5000
tax_ratesJSONOptional
tax_rates (anyOf 1)arrayAlternativeThe tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`.
tax_rates (anyOf 1)[]ModelEach itemExpand Create a tax rate — response body
tax_rates (anyOf 2)nullAlternative

Referenced models: Get Customers Customer Discount — response body, Create a price — response body, Create a subscription item — response body — billing thresholds value usage gte, Create a subscription item — response body — current trial value end date, start date, trial offer, Create a tax rate — response body

Create a subscription item — response body — billing thresholds value usage gte

FieldTypePresenceDescription and constraints
$objectRoot
usage_gteJSONOptional
usage_gte (anyOf 1)JSONAlternative
usage_gte (anyOf 1) (anyOf 1)integerAlternativeUsage threshold that triggers the subscription to create an invoice
usage_gte (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
usage_gte (anyOf 2)nullAlternative

Create a subscription item — response body — current trial value end date, start date, trial offer

FieldTypePresenceDescription and constraints
$objectRootThe current trial attached to the subscription item.
end_dateJSONRequired within parent
end_date (anyOf 1)integerAlternativeFormat: unix-time
end_date (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
start_dateJSONRequired within parent
start_date (anyOf 1)integerAlternativeFormat: unix-time
start_date (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
trial_offerstringRequired within parentMaximum length: 5000

Delete a subscription item — response body

FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: subscription_item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.