Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BigCommerce Webhook Not Triggering

I created a webhook in BigCommerce using following code:

use Bigcommerce\Api\Connection;

$connection = new Connection();

$connection->setCipher('RC4-SHA');
$connection->verifyPeer(false);
$connection->addHeader('X-Auth-Client', $clientId);
$connection->addHeader('X-Auth-Token', $token);

$response = $connection->post('https://api.bigcommerce.com/stores/' . $hash . '/v2/hooks', json_encode(array(
    'scope'=>'store/order/created',
    'destination'=>'https://bigcommerce.example.com/order'
)));

I got the response as following:

stdClass Object
(
    [id] => 568
    [client_id] => lms4gxejy2xw2bia7w30v3bal1sz5yz
    [store_hash] => xxxxxx
    [scope] => store/order/created
    [destination] => https://bigcommerce.example.com/order
    [headers] => 
    [is_active] => 1
    [created_at] => 1403762563
    [updated_at] => 1403762563
)

However, I never got any callbacks to https://bigcommerce.example.com/order from BigCommerce whenever order is placed. The website is having a valid SSL. Any ideas?

like image 288
Sei Kan Avatar asked Jun 26 '14 06:06

Sei Kan


1 Answers

ClientID & ClientSecret?

I assume you are using the standard (now old) authentication and not using OAuth for your integration? OAuth is required for webhooks (see the documentation).

I know you have HTTPS but you also need a valid cert from a trusted CA. (Only mentioned as it is commonly an issue)

like image 66
Matt The Ninja Avatar answered Oct 05 '22 08:10

Matt The Ninja