Implementation Of A Mandatory Webhook In Shopify For Public Apps.
By: Ankita Chauhan Category: Shopify Technologies: Shopify
In Shopify, every public app is required to subscribe to these endpoints only when the app needs to complete the app listing/submission process.
1) Endpoints and the events associated with them.
2) We need to add this endpoint to the Shopify partners’ account in our public app.
Note: This section is relevant to your Shopify public app in “ App setup.”
3) You need to create a job for each endpoint, which is mentioned below.
3.1) As an example, consider Customers_data_request.
3.2) As an example, consider customers_redact:
3.3) As an example, consider webhooks/shop_redact.
Note: If you want to add a payload for this, then refer to the reference link which is added at the end of the blog.
4) Now you can test if your webhook is working or not for “ Customers_data_request” and “ customers_redact”.
4.1) Log in to your store, select customer, select your customer’s name, and scroll down to find this section on the right side.
5) Now, if you want to set the response for these three endpoints, we need to create a controller and its routes for a custom method. An example like this:
Here, you are all set with your public app webhook. I hope this is helpful for you.
For more, you can refer to this reference link: