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 A cursor for use in pagination.
ending_
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting withbefore obj_
, your subsequent call can includebar ending_
in order to fetch the previous page of the list.before=obj_ bar - limitinteger
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
- starting_
afterstring A cursor for use in pagination.
starting_
is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending withafter obj_
, your subsequent call can includefoo starting_
in order to fetch the next page of the list.after=obj_ foo
Returns
A dictionary with a data
property that contains an array of up to limit
subscription items, starting after subscription item starting_
. Each entry in the array is a separate subscription item object. If no more subscription items are available, the resulting array will be empty.
{ "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": [] } ]}