#hnanon_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1294011920839610370
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐ we do typically recommend using webhooks for this, as they're resistant to problems like customers losing network connectivity or closing their browser that can prevent scripts on your return URL from fully executing.
You could put logic on your return URL page to also check the state of the Payment Method and update your database accordingly. But you'll want to be sure to include logic to avoid any race conditions or chance of duplicate entries if you do so.
I thought about logic on the return url page, but since the redirect happens immediately, Iโm not sure the event would be processed in time to show the updated data.
It might not be. If you want it to happen quickly client-side, you should also trigger your flow client-side to get the details you want to show. But I wouldn't recommend on relying on the client-side flow to be the only way your db gets updated.
I see. Ok, Toby. I think, then, processing webhook events is the ideal way to do it. I appreciate your help.
Any time!