#Sadeed
1 messages · Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Sure gimme a sec
I think the issue is that the list endpoint doesn't return cancelled subscriptions by default
So you'd need to pass the status parameter too
By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.
req_oy02Lg0aw6lApo
okay
that works
thanks
what if I want both cancelled and active
@honest light
You'd need to use Search API: https://stripe.com/docs/search#query-fields-for-subscriptions
But that doesn't support customer 😦
Yea...., Maybe there is some other way of doing this.
I am trying to sync users with cancelled subscriptions in my db with stripe by checking if their last subscription was cancelled and they still have time left on that cancelled subscription.
Now if i do it using only cancelled subscriptions I wouldn't know if they have an ongoing active subscription
Which would break more things
Why would you not just track state async via a webhook?
This is for already existing users, we moved to another platform and cancelled subscriptions were overlooked when migrating data
So I have to use a script to fix that
I guess you'll need to query the API for the data you can get, and then filter in your code for the additional parameter you can't pass
Yea, i guess that is the only way