#marijnvdwerf-webhooks

1 messages · Page 1 of 1 (latest)

fierce rivet
#

@leaden quiver there isn't really any guarantee no, they can come at any time

is there a chance that the user will get redirected to me, before the webhooks have fired.
entirely possible yep!

#

as such the best approach is to handle things idempotently, if the customer is redirected and you need some information that's in the webhook, you can instead grab the CheckoutSession ID from the URL, get any information you need with some synchronous API calls, and then render the page. ; or you could have the page 'spin' for a while for some preset limit like 10 seconds while you wait for a webhook to arrive and update your database — in practise that would probably work most of the time