#Robert-find-old-requests

1 messages ยท Page 1 of 1 (latest)

rustic ledgeBOT
bleak trench
carmine ridge
#

Hey @bleak trench ๐Ÿ‘‹
That looks promising!

Any way we can do it via API call as well? (We're using Ruby version of the API if that matters).

bleak trench
carmine ridge
#

I see.

List events, going back up to 30 days.
Stripe documentation says that there's access for up to 30 days back via API, while we need the data for the last 12 months.

How can we do that?

bleak trench
#

Yes, there is a retentials of 30 days for events, that's why I suggest you to filter by request

carmine ridge
#

Hm... Let me experiment with that and get back to you.
To clarify, do I understand correctly that if we filter the list by request in this manner:

Stripe::Event.list type: 'customer.subscription.updated'

it will fetch events going back as 12 months in the past (i.e. bypass 30 days limitation)?

bleak trench
bleak trench
carmine ridge
#

I see. Thanks for clarification. Unfortunately we have thousands of subscriptions, so searching through the dashboard wouldn't be an option.

Returning to the original question (and keeping in mind that the changes occurred in last 12 months):

We want to find out the date when Subscription was changed to new Product. How do we do that?

What approaches could we take to get this information in an automated manner?

heavy kayak
#

Hi ๐Ÿ‘‹ taking over as my teammate needs to step away. It's not easy to retrieve when a request was made to update a Subscription from the API, using the dashboard is going to be the better approach for that.

carmine ridge
#

Hey @heavy kayak ๐Ÿ‘‹

#

Thanks for stepping in.

Going through thousands of subscriptions manually via dashboard doesn't seem to be an option.

What other alternatives do we have?

heavy kayak
#

There aren't any from our end. You could try going back through your outbound request logs to find the request that was made to update the Subscription (assuming it was made from an integration rather than manual action via the dashboard) and see when that request was made.

carmine ridge
#

Hm... That's unfortunate.

I wonder if we can look at it under other angle somehow:

  • we have a Subscription id
  • we want to know when it was changed (within last 12 months)

Do I understand correctly that Stripe provides no way to do that via API?

heavy kayak
#

That is correct.

carmine ridge
#

Trying to think outside the box here and solve the actual problem...

We have a list of subscriptions that we need to check.
We could write a scraper on our end which will go through subscriptions one by one, open them via dashboard page, i.e.

GET https://dashboard.stripe.com/logs?object=sub_001
GET https://dashboard.stripe.com/logs?object=sub_002
GET https://dashboard.stripe.com/logs?object=sub_003

and fetch the date that way. It shouldn't be more than a couple of thousands requests.

Would that be treated as any violation from our end? i.e. would that cause any inconvenience to Stripe servers, could our IP get banned, etc?

heavy kayak
#

I do not know off-hand.

carmine ridge
#

Is there someone this could be transferred to?

Greatly appreciate prompt answers and willingness to help btw. ๐Ÿ‘

heavy kayak
#

Happy to help, but dashboard questions do get a bit outside of our wheelhouse as we focus on the API in this forum. Our Support team may have more insight on these matters:
https://support.stripe.com/?contact=true

carmine ridge
#

Roger. The question seems to be of a "dev nature" as we're trying to fetch the data for thousands of entities, hence pinged here first. Will try my luck with https://support.stripe.com/?contact=true

If we don't get an answer there/won't come up with a solution in the nearest time - would it be ok to re-ask this question in the #dev-help again? Or would that violate any rules?

heavy kayak
#

About the dashboard question or about using the API to retrieve changes made within the last year?

#

Robert-find-old-requests

carmine ridge
#

Tbh. not sure.

About finding an automated way to figure out when a number of subscriptions changed their products (within last 12 months).

heavy kayak
#

I would expect that my teammates would provide the same resposne.

carmine ridge
#

I see...
In case there's no scenario on how this could be fetched via API and assuming dashboard does provide access to this data. Whom can I consult if scraping this data in automated manner from the dashboard (as suggested here) #1065627009461518386 message violate any Stripe rules?

Is Support team on https://support.stripe.com/?contact=true the best contact to reach?
Also - what topic would you suggest to pick up "API Integration", "Subscriptions & Invoices" or "Other"?

heavy kayak
#

Yes, and "Other" seems like it would be the best fit.