Webhook failure email and triggered multiple times

user072319
Shopify Partner
128 0 15

Hello there,

I need help with two things.
1) I've created order create webhook. But its getting triggered multiple times.

$order_webhook_rray = array( "webhook" => 
	array(
		"topic" => $topic,
		"address" => "https://mydomain.com/test.php",
		"format" => "json"
	)
);

I've created only one order/create webhook for the store. Why its getting triggered multiple times?

2) I'm sending 200 OK success header from webhook address file. I'm getting webhook response correctly. But I'm getting email saying "Your webhook is failing".

 

Recent failures:
February 21, 2020 at 8:08 am
Error: read tcp 10.228.165.30:34108->52.26.196.140:443: i/o timeout

What can be issue with webhook getting failied?

 

Can anyone help me to fix these issues? Thanks in advance.

Reply 1 (1)

SBD_
Shopify Staff
1829 269 407

Hey @user072319,

 

Could the script be taking more than five seconds to respond?

 

Shopify waits five seconds for a response to each request to a webhook. If there is no response, or an error is returned, then Shopify retries the connection 19 times over the next 48 hours.

If so, try responding with a 200 immediately and processing later.

Scott | Developer Advocate @ Shopify