requested “GET /admin/api/2020-10/orders.json?status=any” “checkout_id” return is empty

vergil
New Member
2 0 0

Hi Shopify team,

As a PSP we need all the order information to process payments, including those paid orders completed from Draft Orders. However when we requested the API “GET /admin/api/2020-10/orders.json?status=any”, the field “checkout_id” of Draft Order from the response is missing. Can you please have a look what is the problem and what is the solution?

 

InsertPic_(06-18-10-57-23).png

 

 

0 Likes
L_J_K
Shopify Staff
Shopify Staff
139 15 24

Hey @vergil 

With Orders that were originally created from Draft Orders, when there is no checkout ID on the order, the order would have actually been created from the Draft Order with a null checkout ID on the order in question. 

In this particular Order's Case, it was not passed a checkout ID after the order was marked pending payment, which would lead to null checkout ID. Null checkout ID's are possible when the order is marked as pending payment. Hope this helps!

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
0 Likes
vergil
New Member
2 0 0

Can other API interfaces get checkout_id?

@L_J_K 

0 Likes
L_J_K
Shopify Staff
Shopify Staff
139 15 24

Hey @vergil 

In REST, a get to /admin/api/2021-04/checkouts/{checkout_token}.json endpoint would retrieve the individual checkout ID.

To make this call, you'd need to request the read_checkouts scope during the Oauth process(more details here).

The GraphQL Storefront API allows retrieval of the checkout ID too.  It's well worth checking out the docs how to set that up here. Hope that helps!

 

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
0 Likes