SubscriptionItems
Represents the items on a subscription, including the associated plan, price, quantity, tax rates, and billing period details.
Table-Specific Information
SELECT
The component uses the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the component.
| Column | Supported Operators |
| Id | = |
| SubscriptionId | = |
| AccountId | = |
To query the SubscriptionItems table, the SubscriptionId column is required:
SELECT * FROM SubscriptionItems WHERE SubscriptionId = 'sub_A9WZGVTbvgBJ4t'
INSERT
The SubscriptionId and PlanId columns are required to create a new subscription item:
INSERT INTO SubscriptionItems (SubscriptionId, PlanId, ProrationDate, Quantity) VALUES ('sub_1OMqdl2eZvKYlo2CIci8bOT8', 'price_1OPjac2eZvKYlo2Cm8XeR5YQ', '2014-12-12', 10)
UPDATE
To update a subscription item, specify its Id:
UPDATE SubscriptionItems SET PlanId = 'price_1OPjac2eZvKYlo2Cm8XeR5YQ', ProrationDate = '2014-12-12', Quantity = 12 WHERE Id = 'si_PDakKMQHunYX0k'
DELETE
To delete a subscription item, specify its Id:
DELETE FROM SubscriptionItems WHERE Id = 'sit_A9WZGVTbvgBJ4t'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the subscription item. | |
| SubscriptionId | String | False |
The Id of the subscription. | |
| PlanId | String | False |
Plans.Id |
The Id of the plan. |
| PlanActive | Boolean | True |
Indicates whether the plan can be used for new purchases. | |
| PlanAggregateUsage | String | True |
DEPRECATED. Specifies a usage aggregation strategy for plans of usage_type=metered. | |
| PlanAmount | Integer | True |
The unit amount in cents to be charged, represented as a whole integer if possible. | |
| PlanAmountDecimal | String | True |
The unit amount in cents to be charged, represented as a decimal string with at most 12 decimal places. | |
| PlanBillingScheme | String | True |
Describes how to compute the price per period. | |
| PlanCreated | Datetime | True |
The time at which the plan was created, measured in seconds since the Unix epoch. | |
| PlanCurrency | String | True |
The three-letter ISO currency code, in lowercase. Must be a supported currency. | |
| PlanInterval | String | True |
The frequency at which a subscription is billed, such as day, week, month, or year. | |
| PlanIntervalCount | Integer | True |
The number of intervals, specified in the interval attribute, between subscription billings. | |
| PlanLivemode | Boolean | True |
Indicates whether the object exists in live mode. Has the value true if the object exists in live mode, or the value false if the object exists in test mode. | |
| PlanMetadata | String | True |
The set of key-value pairs that you can attach to the plan. | |
| PlanMeter | String | True |
The meter tracking the usage of a metered price. | |
| PlanNickname | String | True |
A brief description of the plan, hidden from customers. | |
| PlanObject | String | True |
The string representing the object's type. Objects of the same type share the same value. | |
| PlanProduct | String | True |
The product whose pricing this plan determines. | |
| PlanTiersMode | String | True |
Defines whether the tiering price is graduated or volume-based. | |
| PlanTransformUsage | String | True |
The transformation applied to the reported usage or set quantity before computing the amount billed. | |
| PlanTrialPeriodDays | Integer | True |
The default number of trial days applied when subscribing a customer to this plan using trial_from_plan=true. | |
| PlanUsageType | String | True |
Configures how the quantity per period should be determined. | |
| Quantity | Double | False |
The quantity of the plan to which the customer should be subscribed. | |
| Created | Datetime | True |
The time at which the subscription item was created, measured in seconds since the Unix epoch. | |
| MetadataAggregate | String | False |
The set of key-value pairs that you can attach to the subscription item. This is useful for storing additional information about the item in a structured format. | |
| PriceId | String | False |
Prices.Id |
The unique identifier for the price. |
| PriceActive | Boolean | True |
Indicates whether the price can be used for new purchases. | |
| PriceBillingScheme | String | True |
Describes how to compute the price per period. | |
| PriceCreated | Datetime | True |
The time at which the price was created, measured in seconds since the Unix epoch. | |
| PriceCurrency | String | True |
The currency in which the subscription is charged. | |
| PriceCustomUnitAmount | String | True |
The custom unit amount configuration for the price. | |
| PriceLivemode | Boolean | True |
Indicates whether the object exists in live mode. Has the value true if the object exists in live mode, or the value false if the object exists in test mode. | |
| PriceLookupKey | String | True |
A lookup key used to retrieve prices dynamically from a static string. | |
| PriceMetadata | String | True |
The set of key-value pairs that you can attach to the price. | |
| PriceNickname | String | True |
A brief description of the price, hidden from customers. | |
| PriceObject | String | True |
The string representing the object's type. Objects of the same type share the same value. | |
| PriceProduct | String | True |
The Id of the product this price is associated with. | |
| PriceRecurringAggregateUsage | String | True |
DEPRECATED. The usage aggregation strategy for the recurring price. | |
| PriceRecurringInterval | String | True |
The frequency at which the recurring price is billed, such as day, week, month, or year. | |
| PriceRecurringIntervalCount | Integer | True |
The number of intervals between billings for the recurring price. | |
| PriceRecurringMeter | String | True |
The meter tracking the usage of the recurring metered price. | |
| PriceRecurringTrialPeriodDays | Integer | True |
The default number of trial days for the recurring price. | |
| PriceRecurringUsageType | String | True |
The usage type that determines how the quantity per period is measured for the recurring price. | |
| PriceTaxBehaviour | String | True |
Indicates whether the price is considered inclusive or exclusive of taxes. | |
| PriceTiersMode | String | True |
Defines whether the tiering price is graduated or volume-based. | |
| PriceTransformQuantity | String | True |
The transformation applied to the quantity before computing the amount billed for the price. | |
| PriceType | String | True |
The type of the price, indicating whether it is a one-time or recurring price. | |
| PriceUnitAmount | Integer | True |
The unit amount, in cents, to be charged for the price. | |
| PriceUnitAmountDecimal | String | True |
The unit amount, in cents, to be charged for the price, represented as a decimal string with at most 12 decimal places. | |
| Object | String | True |
The string representing the object's type. Objects of the same type share the same value. | |
| TaxRatesAggregate | String | False |
The tax rates that apply to this subscription item. When set, the default tax rates on the subscription do not apply to this subscription item. | |
| Discounts | String | False |
The coupons to redeem into discounts for the subscription item. | |
| CurrentPeriodStart | Datetime | True |
The start time of the current billing period for the subscription item. | |
| CurrentPeriodEnd | Datetime | True |
The end time of the current billing period for the subscription item. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| IsProrate | Boolean |
Indicates whether to prorate when switching plans during a billing cycle. |
| ProrationDate | Date |
The time used to calculate prorations. If set, the proration is calculated as though the subscription was updated at the given time. |
| PaymentBehavior | String |
Determines how Stripe handles payments when a subscription change creates an invoice. Valid for INSERT, DELETE, and UPDATE. The allowed values are allow_incomplete, default_incomplete, error_if_incomplete, pending_if_incomplete. |
| ProrationBehavior | String |
Determines how to handle prorations when the billing cycle changes. Valid for INSERT, DELETE, and UPDATE. The allowed values are always_invoice, create_prorations, none. |
| AccountId | String |
The Id of the connected account to get subscription items for. |