Skip to content

Stripe: Retrieve a subscription item

Stripe subscriptionItems.getSubscriptionItemsItem: arguments, response, policy and SDK examples.

← Subscription items operations · Get started

Operation stripe.getsubscriptionitemsitem

Provider route: GET /v1/subscription_items/{item}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["subscriptionItems"]["getSubscriptionItemsItem"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.subscriptionItems.getSubscriptionItemsItem(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.subscription_items.get_subscription_items_item(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.itemstringRequired within parentMaximum length: 5000
queryobjectOptionalAdditional keys: not allowed
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create a subscription item — response body

Referenced models: Create a subscription item — response body

706 more schemas are linked from the tables above, on the schema pages.

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

Get Customers Customer Discount — response body
FieldTypePresenceDescription and constraints
$objectRootA discount represents the actual application of a [coupon](https://docs.stripe.com/api#coupons) or [promotion code](https://docs.stripe.com/api#promotion_codes).
It contains information about when the discount began, when it will end, and what it is applied to.

Related guide: [Applying discounts to subscriptions](https://docs.stripe.com/billing/subscriptions/discounts)
checkout_sessionJSONOptional
checkout_session (anyOf 1)stringAlternativeThe Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Not present for subscription mode.
Maximum length: 5000
checkout_session (anyOf 2)nullAlternative
customerJSONOptional
customer (anyOf 1)JSONAlternativeThe ID of the customer associated with this discount.
customer (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer (anyOf 1) (anyOf 3)ModelAlternativeExpand Delete a customer — response body
customer (anyOf 2)nullAlternative
customer_accountJSONOptional
customer_account (anyOf 1)stringAlternativeThe ID of the account representing the customer associated with this discount.
Maximum length: 5000
customer_account (anyOf 2)nullAlternative
endJSONOptional
end (anyOf 1)JSONAlternative
end (anyOf 1) (anyOf 1)integerAlternativeIf the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
Format: unix-time
end (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
end (anyOf 2)nullAlternative
idstringRequired within parentThe ID of the discount object. Discounts can't be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
Maximum length: 5000
invoiceJSONOptional
invoice (anyOf 1)stringAlternativeThe invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
Maximum length: 5000
invoice (anyOf 2)nullAlternative
invoice_itemJSONOptional
invoice_item (anyOf 1)stringAlternativeThe invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
Maximum length: 5000
invoice_item (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: discount
promotion_codeJSONOptional
promotion_code (anyOf 1)JSONAlternativeThe promotion code applied to create this discount.
promotion_code (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
promotion_code (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a promotion code — response body
promotion_code (anyOf 2)nullAlternative
sourceModelRequired within parentExpand Get Customers Customer Discount — response body — source
startJSONRequired within parent
start (anyOf 1)integerAlternativeDate that the coupon was applied.
Format: unix-time
start (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subscriptionJSONOptional
subscription (anyOf 1)stringAlternativeThe subscription that this coupon is applied to, if it is applied to a particular subscription.
Maximum length: 5000
subscription (anyOf 2)nullAlternative
subscription_itemJSONOptional
subscription_item (anyOf 1)stringAlternativeThe subscription item that this coupon is applied to, if it is applied to a particular subscription item.
Maximum length: 5000
subscription_item (anyOf 2)nullAlternative

Referenced models: Create a customer — response body, Delete a customer — response body, Get Customers Customer Discount — response body — source, Create a promotion code — response body

Create a product — response body — marketing features item
FieldTypePresenceDescription and constraints
$objectRoot
namestringOptionalThe marketing feature name. Up to 80 characters long.
Maximum length: 5000

SDK function policy ID: stripe.getsubscriptionitemsitem. Catalog operation: GetSubscriptionItemsItem. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

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.