Hi all,
Does anyone have any thoughts about how to generally push a webhook to the front-end? This would be the perfect use case for websockets for real-time updates, which Xano doesn’t support.
My use case: we’ve built a Stripe physical reader and can successfully pass off payment intents to the device to accept payment. I need a way to let the employee know on our web app that the payment has been received successfully (they may not always be able to see the screen as it may be many feet away).
My idea is to hand the payment intent off to the reader, and then create a loop (circled in screenshot but not built yet) that lasts 2 minutes or so. Every few seconds, it calls Stripe’s GET payment intent endpoint to check on the status of the intent that was sent to the reader. Another option is that my backend catches the Stripe webhook, saves it, then this loop calls my backend for this data. Should be the same either way. Then, if its successful, we should the employee a success screen and exit the loop. If the loop makes it way through all the items, it will cancel the reader action and payment intent automatically.
Can’t help but think there is a better way here to allow the employee to stay on the same page and receive an update upon successful payment. I wish i could send Stripe webhooks right to WeWeb. I know the goat @dorilama helped me on the other stripe thread so would love your thoughts here in particular .