Solved

Is the orders/create webhook triggered even if the payment is not successful?

Klopp
Shopify Partner
17 1 2

Hi guys,

I developed a Shopify app for one of my customers that uses the orders/create webhook to save data into a database through some APIs. It's very important to save that data even if the payment process failed. 

So, I have two questions.

1. Is the orders/create webhook triggered even if that payment fails or should I use another webhook?
2. When is the orders/create webhook triggered? When the user submits the order, before the actual payment happens or after the order is submitted and the payment is successfully processed?

Thanks.

Accepted Solution (1)

mrad
Shopify Staff (Retired)
63 10 15

This is an accepted solution.

Hi Klopp, the orders/create webhook is fired when the order is created and before the payment is processed. So if the payment processing fails, the webhook will still be delivered.

mrad | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

mrad
Shopify Staff (Retired)
63 10 15

This is an accepted solution.

Hi Klopp, the orders/create webhook is fired when the order is created and before the payment is processed. So if the payment processing fails, the webhook will still be delivered.

mrad | Developer @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Klopp
Shopify Partner
17 1 2

Thank you, @mrad!

Akhil_Thakur
Shopify Partner
3 0 0

Hello Marcus,

Can you help to understand how can payment status be updated if  the payment is marked awaited by the bank to gateway and later updated as successful.  How this new response from the Payment gateway can be updated for shopify order.