#snetsunts - Sub

1 messages ยท Page 1 of 1 (latest)

still swift
#

Hi ๐Ÿ‘‹
You cannot. We don't support such a high frequency

oblique juniper
#

Then what is the minimum frequency?

still swift
#

1 day

oblique juniper
#

I need to test failed payment charging functionality ( smart retries )

#

how would you suggest to test that?

still swift
#

Failed Payment retries are a different thing altogether

oblique juniper
#

Okay here's my case

  1. user has X subscription which invoice failed at the end of subscription ( invalid card )
  2. user updated his card later
  3. user downgraded his subscription to Y
  4. a few days later was also charged for an old subscription

How would you suggest to test this scenario?

still swift
#

I would suggest you use our webhooks feature to catch when the user updates their card
https://stripe.com/docs/webhooks
And set the new one as the default for invoices on the subscription.

oblique juniper
#

I think you did not get my point. I need to mark previous subscription invoice as uncollectible and cancel it ( because user has new subscription, no need to charge him for that )

My issue is with testing. The codebase for this is ready, I just wonder how can I test this ( it's already 4 hours I can't find the right way )

boreal solstice
#

Hi, snufkin is stepping out but I can help out. What issue are you running in to with testing this?

#

Are you running in to an error or are you blocked on figuring out how to set some of this up?

oblique juniper
#

Hi @boreal solstice
I need to have a case when user has past_due subscription which latest invoice was failed. So I can handle it's invoice.payment_succeded event after attaching valid card and changing subscription

dreamy panther
#

sounds like Test Clocks...

boreal solstice
#

Do you know how you want to set up the subscription to be past_due and all that? IIRC the easiest way would be to create a subscription with a ten second free trial on a customer that uses our "Decline after attaching" test card https://stripe.com/docs/testing

#

That will allow the subscription to start but when the first actual payment occurs the first invoice should go to past_due and you can test your recovery logic from there

#

Is that all helpful?

oblique juniper
#

I'll try.
Of course that's helpful, thank you very much for your response ๐Ÿค—

#

And one thing also. What's IIRC exactly? Could you please some document so I can figure that out?

boreal solstice
#

Whoops. That is an acronym for "if I remember correctly"

#

So I was just saying that that was the easiest way I could remember off of the top of my head

oblique juniper
#

๐Ÿ˜„

#

I though it was some stripe related rocket science thing ๐Ÿ˜„

#

okay thank you mate

boreal solstice
#

It is the secret rocket launch code but you are a couple tests away from needing that

#

Just let me know if you run in to anything else