Register Order Webhook
This endpoint stores client webhook (url) for to be called when an Order is created or altered. A successful response includes the order number and the status of the order.
Register.
POST
/webhooks/store
Headers
Name
Type
Description
secret-key*
user secret key
Authorization*
Token
{
"status": "Success",
"description": "Request successful",
"data": {
"webhook": "https://example.com",
"webhooks": [
{
"url": "https://example.com",
"type": "App\\Models\\Order",
"is_active": 1
}
]
}
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/webhooks/store',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"webhook":"https://example.com",
}',
CURLOPT_HTTPHEADER => array(
'secret-key: {{Your Secret Key}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Last updated