#Benoît

1 messages · Page 1 of 1 (latest)

elfin pebbleBOT
drifting robin
#

Hi 👋

#

You can retrieve the Subscription Item by its ID:
https://stripe.com/docs/api/subscription_items/retrieve
Check which Subscription it belongs to via the subscription field on it:
https://stripe.com/docs/api/subscription_items/object#subscription_item_object-subscription
Then use that ID to retrieve the Subscription:
https://stripe.com/docs/api/subscriptions/retrieve
And check which customer that Subscription belongs to:
https://stripe.com/docs/api/subscriptions/object#subscription_object-customer

glad marsh
#

Of, i have to make multiple calls :/

#

Thank you

drifting robin
#

Yeah, I'm not seeing a list call that would take a Subscription Line Item ID as an input and output a Subscription object. Running a test to see if the above approach can be condensed though.

drifting robin
#

It also doesn't look like you can use expand to retrieve the Subscription inline when retrieving the Subscription Item, so I don't think this can be condensed further.