#SusanP-checkout-success
1 messages · Page 1 of 1 (latest)
I'm not sure I fully understand. So the payment is successful, which triggers your webhook endpoint, and your webhook handler then should be the one handling order creation. Is that not the case here?
No, the success_url actually creates the order
otherwise the success_url ends up showing "order already created"
I would advise against doing that, if you can help it. There's an edge-case where the customer navigates away from the payments page right after the payment succeeds, but before being redirected. I would rely on the checkout.session.success webhook Event for fulfillment
i don't believe there is a way to do tht with this cart, but I'll ask
i was hoping just to use the webhook for backup, in the case you described
That's not really the best approach and there isn't a good workaround, for the reason I mentioned.
ok. i'll see what i can figure out. i'm guessing there's no way to delay the webhook in case I can't find a better solution
or can it be guaranteed that the webhook will always reach me before the success_url is called? so that it's at least consistent?
There's no way to guarantee the timing of the webhook, so you shouldn't be relying on the redirect at all
thanks for your help. i've hit up their developer support to try and see what I can do
@timid echo one more thing, the webhook doesn't seem to include the client_reference_id. Is there a way to get it in there? If not, I'm not sure how I can even tell which basket to convert to an order. Thank you.
the webhook payload, I mean
Which webhook payload are you looking at?
checkout.session.succeeded should have that
ok great. i was using payment_intent.succeeded (i might not have done that exactly)