Hello, I made a shopify plugin for my company, but there are problems with the listing due to webhooks.
I put all the details in the App dashboard, but there are still problems with webhooks.
app.post(
shopify.config.webhooks.path,
shopify.processWebhooks({ webhookHandlers: GDPRWebhookHandlers })
);
export default {
/**
* Customers can request their data from a store owner. When this happens,
* Shopify invokes this webhook.
*
* https://shopify.dev/docs/apps/webhooks/configuration/mandatory-webhooks#customers-data_request
*/
CUSTOMERS_DATA_REQUEST: {
deliveryMethod: DeliveryMethod.Http,
callbackUrl: "/api/webhooks/customer-data-request",
callback: async (topic, shop, body, webhookId) => {
const payload = JSON.parse(body);
},
},
/**
* 48 hours after a store owner uninstalls your app, Shopify invokes this
* webhook.
*
* https://shopify.dev/docs/apps/webhooks/configuration/mandatory-webhooks#shop-redact
*/
SHOP_REDACT: {
deliveryMethod: DeliveryMethod.Http,
callbackUrl: "/api/webhooks/shop-data-redact",
callback: async (topic, shop, body, webhookId) => {
const payload = JSON.parse(body);
},
},
};