I am creating/registering "orders/create" hook in shopify but I am getting bellow error
Fatal error: Uncaught exception 'ShopifyApiException' with message 'Unprocessable Entity' in /var/www/wicked_report/shopify.php:70 Stack trace: #0 /var/www/wicked_report/shopifyapp.php(143): ShopifyClient->call('POST', '/admin/webhooks...', Array) #1 {main} thrown in /var/www/wicked_report/shopify.php on line 70
As I am able to create "customers/create" hook.
Here is the code I am using to create hooks
$customerhook = array("webhook"=>array(
"topic"=>"customers/create",
"address"=>"filepath/customer.php",
"format"=>"json"
)
);
$hook1 = $sc->call('POST', '/admin/webhooks.json', $customerhook);
$orderhook = array("webhook"=>array(
"topic"=>"orders/create",
"address"=>"filepath/order.php",
"format"=>"json"
)
);
$hook2 = $sc->call('POST', '/admin/webhooks.json', $orderhook);