Shopify App, Create Google Pub/Sub Webhook Subscription

Shopify App, Create Google Pub/Sub Webhook Subscription

faisalirfan361
Shopify Partner
2 0 0

Hi, 

    I am working on an app, and I am fairly new. I am trying to register for ORDERS_CREATE webhook using node js app. Here is what I am doing

 

await Shopify.Webhooks.Registry.register({ 
        shop: session.shop, 
        accessToken: session.accessToken, 
        path: "pubsub://projectdev:TOPIC_NAME", 
        topic: "ORDERS_CREATE",
        deliveryMethod: DeliveryMethod.PubSub
});

 

and I get following response from shopify:

 

 

{
	"ORDERS_CREATE": {
		"success": true,
		"result": {
			"data": {
				"pubSubWebhookSubscriptionCreate": {
					"userErrors": [],
					"webhookSubscription": {
						"id": "gid://shopify/WebhookSubscription/1105878417548"
					}
				}
			},
			"extensions": {
				"cost": {
					"requestedQueryCost": 10,
					"actualQueryCost": 10,
					"throttleStatus": {
						"maximumAvailable": 1000,
						"currentlyAvailable": 990,
						"restoreRate": 50
					}
				}
			}
		}
	}
}

 

but when I create orders from my test store I do not get anything on the topic, 

 

Am I missing something?

 

 

Thank you for all the help.

 

FI

Replies 2 (2)

faisalirfan361
Shopify Partner
2 0 0

Just to add to that, I tried the same thing with AWS Event Bridge, and I got a success message but not data on Event Bridge; I have verified that the accessToken has both write_orders and read_orders.

 

  
Paaber
Shopify Partner
5 0 4

I am pretty much stuck on this as well, Hopefully there is some help somewhere, I have followed the docs and tutorial video's of shopify dev diligently and carefully I cant figure out what i am doing wrong, but still to no avail