Managing testing orders via API is not working

Hi everyone,

I follow the manual about making test orders via API: https://shopify.dev/docs/apps/fulfillment/order-management-apps/order-testing. Here is a API calls log. It’s my development store and no sensitive information can be found below.

New order creation (test=false):
X-Request-ID: 0359c82f-70cb-470e-a3d3-45f2b40b71dc
https://flot-prod.myshopify.com/admin/api/2022-07/orders.json 201
{“order”:{“id”:5058087321731,…“test”:false,…}}

Get transaction (test=false):
X-Request-ID: d225ff4c-81f6-4868-9c22-90f099b5af9f
https://flot-prod.myshopify.com/admin/api/2022-07/orders/5058087321731/transactions.json 200
{“transactions”:[{“id”:5969479401603,“order_id”:5058087321731,“kind”:“authorization”,“gateway”:“”,“status”:“success”,“message”:null,“created_at”:“2023-03-01T10:33:32-05:00”,“test”:false,“authorization”:null,“location_id”:null,“user_id”:null,“parent_id”:null,“processed_at”:“2023-03-01T10:33:32-05:00”,“device_id”:null,“error_code”:null,“source_name”:“6026651”,“receipt”:{},“amount”:“22.00”,“currency”:“USD”,“admin_graphql_api_id”:“gid://shopify/OrderTransaction/5969479401603”}]}

Capture transaction (test=true):
X-Request-ID: 21dbe2fe-4519-49fa-8c03-7ff06973b44a
https://flot-prod.myshopify.com/admin/api/2022-07/orders/5058087321731/transactions.json 201
{“transaction”:{“id”:5969479434371,“order_id”:5058087321731,“kind”:“capture”,“gateway”:“”,“status”:“success”,“message”:“Marked the payment as received”,“created_at”:“2023-03-01T10:33:33-05:00”,“test”:true,“authorization”:null,“location_id”:null,“user_id”:null,“parent_id”:5969479401603,“processed_at”:“2023-03-01T10:33:33-05:00”,“device_id”:null,“error_code”:null,“source_name”:“6026651”,“receipt”:{},“amount”:“22.00”,“currency”:“USD”,“admin_graphql_api_id”:“gid://shopify/OrderTransaction/5969479434371”}}

Check that order test is true:
X-Request-ID: 5bf947a0-7fd9-4153-a16c-f3b5e6448b76
https://flot-prod.myshopify.com/admin/api/2022-07/orders/5058087321731.json 200
{“order”:{“id”:5058087321731,…“test”:false,…}}

As you may notice, test parameter is still false after all the sequence of requests required is done. This issue is very important for me because I receive constant checkout ban from Shopify. The support time is very responsive but they can’t help with API issues and just continue to manually unban my Shopify store.

Does anybody have the same issue? Can someone from Shopify dev team take a look at the issue.

Any help is appreciated. Thanks

1 Like

Hi @tikhon :waving_hand:

Thanks for flagging this! We are currently investigating this behaviour, and will update you as soon as we have more details. In the meantime, even with the checkout locked, are you able to continue creating orders with the same workflow?

Hi @ShopifyDevSup . I’m so happy you are here. Looking forward to any news from you.

Yes, I can create orders via API

Great, thanks for confirming that!

In step 1, setting test: true when creating the order should help resolve this. It would look something like the below:

{
  "order": {
    ...
    "test": true,
    "financial_status": "pending",
    ...
    "transactions": [
      {
        "kind": "authorization",
        "status": "success",
        "amount": ...
      }
    ]
  }
}

We’ll be sure to get this updated in the docs as well!

Indeed! Thank you very much!

Could you also fix the manual? https://shopify.dev/docs/apps/fulfillment/order-management-apps/order-testing There is no such instruction