Sending in an order via API orders.json, creates a duplicate order

We are creating orders via the API. We make 1 call but we get 2 orders. 1 is a duplicate. The json being sent is 1 order, not 2. Our logs show only 1 call being made.

No reason why we’re getting 2 orders but yet we are.

We are using a private app for API access if that matters. Storefront API access is disabled.

Are you really, really sure that your app isn’t firing twice? A good test here is to use something like Postman to push an order into Shopify. If only one is made when doing that, it points to your stack/code as being a more likely cause. What are you able to do to generate logs on your end for that?

If you do that test and it still creates 2 orders consider posting the request ID here (found in the response header).

Yep. I triple checked. We log every call from shopify made or received. Only show one call being made in our DB. Server logs show the same. Singled out the code to only the call being made, same result. It’s gotta be on shopify’s end.

We update thousands of products, and create products using this same code, it never duplicates the products or anything like this.

Order being duplicated everytime.

Request ID: c3ac57df-a92e-4455-9a11-c4feca65acca

Tested one more time. Same result. Duplicated order.

Went and sent two different requests. One to make an order and one to update a part. Both show only 1 request made to shopify’s servers. But the order one creates a duplicate.

We’re using PHP and it’s a curl call. I set verbose mode on the curl call and everytime it’s showing 1 call being made. Same with our server logs and our DB logging.

There has got to be away to get support here on this. Chatted with general support but got no where. They said they forwarded the information to the API team but it’s been a few days and no word.

Issue was in the code, curl was being executed twice.