Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
Hi,
I'm trying to create a webhook for this topic: SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS, and I'm getting the "InternalServerError: Cannot read property 'webhookSubscriptions' of null".
This is my code:
const subscriptionBillingSuccessWh = await Shopify.Webhooks.Registry.register({
shop,
accessToken,
path: "/webhooks",
topic: "SUBSCRIPTION_BILLING_ATTEMPTS_SUCCESS",
webhookHandler: async (topic, shop, body) => {
console.log("subsbody", body)
}
})
Does someone had a similar issue? I've searched the forums and I can't find the solution.
I came across this question after getting the error "InternalServerError: Cannot read property 'webhookSubscriptions' of null", and after some time working through the issue I realized that I didn't have the proper scope set. For anyone else who finds this, double-check that you have your SHOPIFY_APP_SCOPES environment variable set to include the scope needed for the webhook you are trying to register.