Bug: orders/paid webhook returns status pending

Shopify Partner
1 0 1

We are a logistics company that maintain our own application which integrates Shopify shops so that our customers can insert orders directly into our backend for fulfillment.

 

The application registers an orders/paid (and created and updated) webhook. The webhook payload is validated based on the financial status among other things. Our ERP only accepts orders with financial status "paid".

 

Recently we've noticed that we aren't receiving certain orders because the orders/paid webhook is firing with the financial_status value set to "pending" in stead of "paid" as we expect it to be. This doesn't happen consistently, and there does not seem to be any relation between the different orders that this happens to, but if this happens we never receive another webhook call with the "paid" status, so we are never able to process and fulfill this order. When the order is checked in the back-end, it DOES have the status paid, but we have never received a webhook payload to let us know about that.

 

Below two of the payloads (anonymized) retrieved from Shopify, one with "pending", one with "paid".

 

"Pending" webhook

{
"id":"xxxx",
"email":"xxxxx",
"closed_at":null,
"created_at":"2019-09-13T20:09:11+02:00",
"updated_at":"2019-09-13T20:09:16+02:00",
"number":"36765",
"note":"",
"token":"xxx",
"gateway":"paypal_multisafepay_",
"test":"false",
"total_price":"164.74",
"subtotal_price":"153.96",
"total_weight":"268",
"total_tax":"10.78",
"taxes_included":"false",
"currency":"EUR",
"financial_status":"pending",
"confirmed":"true",
"total_discounts":"0.00",
"total_line_items_price":"153.96",
"cart_token":"",
"buyer_accepts_marketing":"false",
"name":"xxxx",
"referring_site":"",
"landing_site":"xxxx",
"cancelled_at":null,
"cancel_reason":null,
"total_price_usd":"182.14",
"checkout_token":"xxxxx",
"reference":null,
"user_id":null,
"location_id":null,
"source_identifier":null,
"source_url":null,
"processed_at":"2019-09-13T20:09:11+02:00",
"device_id":null,
"browser_ip":"xxxx",
"landing_site_ref":null,
"order_number":"xxx",
"processing_method":"offsite",
"checkout_id":"xxxx",
"source_name":"web",
"fulfillment_status":null,
"contact_email":"xxxx",
"order_status_url":"xxxx",
"tags":""
}

"Paid" webhook

{
"id":"xxxx",
"email":"xxxx",
"closed_at":null,
"created_at":"2019-09-13T20:10:08+02:00",
"updated_at":"2019-09-13T20:10:20+02:00",
"number":"2017",
"note":null,
"token":"xxxx",
"gateway":"ideal_mollie_",
"test":"false",
"total_price":"29.50",
"subtotal_price":"29.50",
"total_weight":"13607",
"total_tax":"5.12",
"taxes_included":"true",
"currency":"EUR",
"financial_status":"paid",
"confirmed":"true",
"total_discounts":"0.00",
"total_line_items_price":"29.50",
"cart_token":"",
"buyer_accepts_marketing":"false",
"name":"xxxx",
"referring_site":"xxxx",
"landing_site":"/",
"cancelled_at":null,
"cancel_reason":null,
"total_price_usd":"32.62",
"checkout_token":"xxxxx",
"reference":null,
"user_id":null,
"location_id":null,
"source_identifier":null,
"source_url":null,
"processed_at":"2019-09-13T20:10:08+02:00",
"device_id":null,
"browser_ip":"xxxxx",
"landing_site_ref":null,
"order_number":"xxxxx",
"processing_method":"offsite",
"checkout_id":"xxxxx",
"source_name":"web",
"fulfillment_status":null,
"contact_email":"xxxxx",
"order_status_url":"xxxxx",
"tags":"Exported,
Invoiced"
}

 

When we at a later point trigger orders/updated by adding a note to the order in the shopify backend, the new webhook payload will always have the correct "paid" status.

 

This seems to be a pretty bad bug, as we never receive an update telling us the order has been paid, even though we are subscribed to Paid, Created AND Updated. It seems the webhook is firing before the status has been properly updated?

 

Hope to hear from you soon.

1 Like
Shopify Staff
Shopify Staff
469 36 92

Hi @Active_Ants,

 

Thank you for the detailed report of this issue.  This is definitely a bug, and the team is investigating.  I don't currently have a timeline to share, but I think in the meantime you would be able to implement some small logic to handle this use case.  I think it would be beneficial to add a catch for any of the webhooks with "pending" and perform a fetch on that order afterward to get the updated data to ensure you are in sync with all of the orders.

 

Best Regards,

Ryan

 

Developer Experience @ Shopify
1 Like
Highlighted
Tourist
6 0 1

Hi Ryan,

 

do you have any idea when this will be solved?

I think it should be a high priority bug. We experiencing this problem and it's annoying the heck out of us.

And it has cost us a lot of time trying to figure out what was going on, trying to see a pattern (which there is not).

 

Thanks,

Paul

1 Like
Tourist
5 0 4

We are experiencing a similar issue with the REST API where the financial status does not get updated for some orders (a request on these orders or their transactions via browser shows that these orders' financial_status is "paid" but we keep receiving the orders as "authorized")

1 Like
Tourist
5 0 4
It does sound like a very high priority bug. Is there something being done about it??
1 Like
Tourist
6 0 1

Do you think this might be a more common problem in Shopify?

I mean: the systems starts 2 tasks at the same time, but then there is the risk that the 1st task has not been completed at the moment that the 2nd task needs the first task to be completed?

 

I experience another problem that might be like this:

When I send an invite to an emailaddress, an activation-token is created. When the receiver opens the activation-link really quick sometimes it does not work yet!

Possibly the token is not yet ready for use when the receiver of the email wants to use it.

I can imagine that the token is 1st created but not immediately available for use. To process to make it available for use might be slower than the process to send the email with the activation-link. It depends on the availability of the Shopify-servers (how busy are they?) how quick the token is available for use.

I cannot recreate this problem whenever I want..... which might be caused by the changing speed/availability of the servers.

 

Doe sit work like this, is my theory correct?

 

And: does Shopify Plus have the same weaknesses?

0 Likes