Question

in demo.php

     $url='https://hooks-beta.bigcommerce.com';
      $fields = array(
     "producer"=>"store/bgf5e", 
     "scope"=>"store/order/*",
     "deliverymethod"=>"HTTP_POST",
     "destination"=>array(
     "url"=>"http://shopifywebhook.faculty.com/demo.php"
    ),
 );

I get the response When i am updating the order in big commerce manually it give following result

string(160) "{"store_id":481868,"producer":"store/bgf5e","scope":"store/product/updated","data":{"type":"product","id":85},"hash":"2ca388118ff19587b5b1ed55fd58cdb74c3186aef4"}"

which is not related to "scope"=>"store/order/*" this scope i.e Order What am doing wrong or that webhook is not working of bigcommerce? I want the response to be order id and type "Order" but above you can see that Product and Id =85

Thanks Ranjeet Gholave

Was it helpful?

Solution

Your scope is showing that you're subscribed to the wrong event: store/product/updated

Check your active webhooks using the CURL call below and confirm that you have the correct destination for the /order/updated scope- I found it was better to start with specific action scopes instead of wildcards.

curl -XGET -H 
  'X-Auth-Client: [BigCommerceAppClientId]' -H 
  'X-Auth-Token: [BigCommerceAppSecret]' 
https://hooks-beta.bigcommerce.com/producer/store/[myStoreKey]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top