I have a problem with Shopify webhook! Urgent! Please help me!

New Member
2 0 1

I have a problem related to webhook.

I have a third party website built with Laravel.

As you can see, on my laravel site, there is a buy button to purchase the token.

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.

I already set up the webhook on the shopify store admin setting.

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.

How can I do it?