Users can log in as a normal user and they can buy the token. When user clicks the buy button, it creates a new modal window of shopify store to fill in the payment information such as mail, address and so on. If user make the payment, it will send webhook request.
So in my laravel side, if the user clicks the buy button and make the payment, it is connected to the Shopify store, and Shopify webhook is sent to my laravel site containing payment JSON data.
I am able to get the webhook from Shopify and extract the data(purchased quantity) that I want from the JSON.
The problem is next. I can get data from JSON and I want to save it to the database of current user's field. But I can not find the way how can I know the sent webhook is from whom? I mean....if userA log in to my laravel website and click the buy button and purchase the goods from shopify. Then how can I confirm the webhook is from userA?
So totally what I want is... I want to send userID together when clicking buy button. After the payment succeed, I want to get userID I sent to the buy signal from webhook JSON data.