#sejo-subscription-cancel

1 messages · Page 1 of 1 (latest)

crude locustBOT
surreal rain
#

@timber otter Let me know how I can help!

#

If this is related to the earlier thread, let me know if you're running into any issues with retrieving a subscription ID now that you have a customer ID

timber otter
#

If that's the problem, I need the subscription id to cancel the subscription

#

But as you said, I now have the customer id, but I need the subscription id

crude locustBOT
surreal rain
distant grotto
#

sejo-subscription-cancel

timber otter
#

I'm reading I try and I tell you

#

i think i got it

#

This is the real subscription id right? "id": "si_NsLUWG8hKiyMWI",

distant grotto
#

no, that is a SubscriptionItem id. See the object right below it

#

a Subscription id is sub_12345

timber otter
#

"subscription": "sub_1N6anBLfZSsw8jyeLuv0018n",

#

this is the one below

distant grotto
#

I'm sorry you're just giving me pictures with no context

#

Is this a SubscriptionSchedule? Something else? What are you trying to do and what's blocking you?

timber otter
#

I am looking for the subscription id to be able to cancel the subscription

distant grotto
#

In which context though? Where does that picture come from? What exact API are you calling, what exact API Resource are you getting back? What is your code doing?

timber otter
#

This code is the response of querying
const subscriptions = await stripe.subscriptions.list({
customer: id_cancellation,
});
res.send({subscriptions})

#

That image gives me insomnia and it's what brings me the subscription list

#

is the filtering of a single client

distant grotto
#

Okay so you are calling the List Subscriptions API, so you get a List back. That list can have 0, 1 or N elements. Each element is a Subscription object as described at https://stripe.com/docs/api/subscriptions/object and that object has an id property that is the Subscription id sub_123. So that's all you need

timber otter
#

thank you so much