#Sairony-subscription
1 messages ยท Page 1 of 1 (latest)
No problem! ๐
Thanks for waiting. Yeah you'd likely want to poll for the status triggered by your front-end code. What have you tried already?
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.
yeah that sounds like a better flow in my head. Ofcourse you'd need to try it out first but makes sense.
Will do, thanks for the help ๐
NP! ๐ Good luck