Movatterモバイル変換


[0]ホーム

URL:


List all subscription items

Returns a list of your subscription items for a given subscription.

Parameters

  • subscriptionstringRequired

    The ID of the subscription whose items will be retrieved.

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with adata property that contains an array of up tolimit subscription items, starting after subscription itemstarting_after. Each entry in the array is a separate subscription item object. If no more subscription items are available, the resulting array will be empty.

GET /v1/subscription_items
curl -G https://api.stripe.com/v1/subscription_items \
-u"sk_test_09l3shT...CzzZZsiLl2vAsk_test_09l3shTSTKHYCzzZZsiLl2vA:" \
-d limit=3 \
-d subscription=sub_1NQH9iLkdIwHu7ixxhHui9yi
Response
{
"object":"list",
"url":"/v1/subscription_items",
"has_more":false,
"data":[
{
"id":"si_OCgWsGlqpbN4EP",
"object":"subscription_item",
"created":1688507587,
"metadata":{},
"price":{
"id":"price_1NQH9iLkdIwHu7ix3tkaSxhj",
"object":"price",
"active":true,
"billing_scheme":"per_unit",
"created":1688507586,
"currency":"usd",
"custom_unit_amount":null,
"livemode":false,
"lookup_key":null,
"metadata":{},
"nickname":null,
"product":"prod_OCgWE6cbwiSu27",
"recurring":{
"interval":"month",
"interval_count":1,
"trial_period_days":null,
"usage_type":"licensed"
},
"tax_behavior":"unspecified",
"tiers_mode":null,
"transform_quantity":null,
"type":"recurring",
"unit_amount":1000,
"unit_amount_decimal":"1000"
},
"quantity":1,
"subscription":"sub_1NQH9iLkdIwHu7ixxhHui9yi",
"tax_rates":[]
}
]
}

Delete a subscription item

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

Parameters

  • proration_behaviorenum

    Determines how to handleprorations when the billing cycle changes (e.g., when switching plans, resettingbilling_cycle_anchor=now, or starting a trial), or if an item’squantity changes. The default value iscreate_prorations.

    Possible enum values
    always_invoice

    Always invoice immediately for prorations.

    create_prorations

    Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately undercertain conditions.

    none

    Disable creating prorations in this request.

More parameters

  • clear_usageboolean

  • proration_datetimestamp

Returns

An subscription item object with a deleted flag upon success. Otherwise, this call raisesan error, such as if the subscription item has already been deleted.

DELETE /v1/subscription_items/:id
curl -X DELETE https://api.stripe.com/v1/subscription_items/si_NcLYdDxLHxlFo7 \
-u"sk_test_09l3shT...CzzZZsiLl2vAsk_test_09l3shTSTKHYCzzZZsiLl2vA:"
Response
{
"id":"si_NcLYdDxLHxlFo7",
"object":"subscription_item",
"deleted":true
}

[8]ページ先頭

©2009-2026 Movatter.jp