#Sairony-subscription

1 messages ยท Page 1 of 1 (latest)

surreal osprey
#

Hello ๐Ÿ‘‹
Give me a moment to catch up here, thanks ๐Ÿ™‚

marsh coral
#

No problem! ๐Ÿ™‚

surreal osprey
#

Thanks for waiting. Yeah you'd likely want to poll for the status triggered by your front-end code. What have you tried already?

marsh coral
#

Yeah I could redirect the user to a page which continuously polls the backend to see if a subscription is created or not with a timeout of some sort. It's a bit clunky however & needs a lot of extra machinery to be able to fish out an eventual error which could happen somewhere between the setup intent completing & the subscription being completed. So that's why I was wondering if it would be possible to control the whole flow. But now when I'm thinking about it, it might actually be better to not use setup_intent.succeeded on the webhook side & instead redirect the user to a page which passes the setup intent id as a parameter & then create the subscription from that page.

surreal osprey
#

yeah that sounds like a better flow in my head. Ofcourse you'd need to try it out first but makes sense.

marsh coral
#

Will do, thanks for the help ๐Ÿ™‚

surreal osprey
#

NP! ๐Ÿ™‚ Good luck