#SuperMagicCow

1 messages · Page 1 of 1 (latest)

rugged coralBOT
torn kiln
#

Hi, that is correct.

fresh trail
#

I used to use attempt_count = 4 as a final because i think stripe used to make 4 attempts

#

but I think the spec has changed and Im missing some stuff now

torn kiln
#

What do you mean? Can you add more details?

fresh trail
#

well we have a subscription product

#

and basically it autorenews every month

#

if the charge fails (final fail) then the user's subscription needs to be cancelled.

#

the way i was doing it, was i set up a webhook on invoice.payment_failed

#

and if object.attempt_count = 4, then boot them out

#

which obviously is a bad way of doing it now

#

but many years ago, stripe specs said they would try 4 times

#

and then it meant it failed permanently

#

but i have no idea when that changed over so now i have a bunch of freeriders in my system i need to boot out

#

Is there a way to download retroactively all the invoice.payment_failed webhooks so i can identify who needs to be kicked out

#

using next_payment_attempt = null (the right way) instead of attempt_count = 4 (the wrong way)

#

it's been a very long time so I'm not sure why i was using attempt count to find out if it was a final fail

#

but thats clearly wrong

torn kiln
#

I see, so essentially, you're trying to cancel any subscription that has a failed payment on the final retry. I think there is a Setting on your Dashboard that handles this. Let me confirm this

fresh trail
#

yes, but the problem is that i don't really need stripe to cancel it, i need to know the list of user ids it applies to because that was how i was cancelling it in the app

#

stripe has a combination of "outstanding invoice" and "cancelled"

#

for these folks

torn kiln
fresh trail
#

unfortunately we have 16k failed payments (most are not final attempts) I downloaded the excel file for that but there's no indication which are final

#

on that

torn kiln
#

However, you're wanting to do this on your end so let me confirm how you'd do this

fresh trail
#

Yeah, really I just need a way to export all final failed payments to date

#

i think going forward, i can use all of the solutions you've provided

torn kiln
fresh trail
#

Okay thank you. I appreciate it

#

I'll give it a shot, looks exactly like what i need

torn kiln
#

Happy to help, have a great weekend!

fresh trail
#

the problem is that it only returns 10 at a time

#

is there a way to mass export all of them?

#

with a max of 100

#

if there's not then don't worry about it

#

because I can write some code to iterate over all customers and do them one by one to verify

#

but if there's some way where i can jsut dump the whole thing, would be easier

torn kiln
fresh trail
#

hmm okay I can try that