#daniel-nissenbaum_best-practices

1 messages ¡ Page 1 of 1 (latest)

frigid boltBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1313961415219875971

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

proper ivy
#

Hi there, unfortunately we don't really know anything about Sigma here as we just focus on the API. This is going to be a better question for our Support team via https://support.stripe.com/contact/login

frigid boltBOT
chrome shore
#

hmm ok, will they have people/resources that can help us at the query level?

normal minnow
#

I am honestly not 100% sure how deep their support goes there but they are the team that handles Sigma so they will know who to direct you to if we do have that kind of resource.

chrome shore
#

hmm ok, i guess at the api level, is there a good way to achieve the above in code/with a script?

#

like would you iterate over every customer or subscription?

normal minnow
#

Can you tell me more about the data you are trying to retrieve with the API here? Definitely happy to look in to how to get the data, though applying that analysis is out of my wheelhouse

#

To see which payments have a specific price involved basically?

chrome shore
#

im basically trying to get this

#

but with different "filters"

#

so like for a specifc price id

#

or over a longer time period (since most of our users are on annual, we want to know how it looks 13+ months down the line

normal minnow
#

Looking in to this, basically trying to find out how long each subscriber for a certain price was subscribed?

chrome shore
#

basically looking to get exactly that kind of retention table

#

each row represents users that joined in a certain month

#

and each column is how many of those users still had active subscriptions after 1, 2, 3m, etc

normal minnow
#

Gotcha, as best as I can tell, you would need to iterate through a list of subscriptions and tally data as you go. You could use our list subscriptions API filtering on price, setting created.gt to twelve months ago, and setting limit=100 to get the most subscriptions back at once.
https://docs.stripe.com/api/subscriptions/list
You could then check each subscription's canceled_at property. If it is unset, the customer is still subscribed, it it is set you know how long they were subscribed for.