I am using webhooks to record orders into my MySQL database.
After the main order form where the user enters his/her credit card details, we have a series of upsell pages on which the user can buy more products or decline. After the last upsell, the user is taken to a thank-you page which displays the order details from the MySQL databse and send a mail with the details to the user.
But there is one major issue. It seems that sending data to the webhook is not immediate. At the thank-you page, the last item bought doesn’t populate on the thank-you page. If I refresh the thank-you page after 15 seconds, it (the last item bought) shows.
What can be done to show all the items bought / ordered on the thank-you page ?