GraphQL Order Checkout ID Replacement

janklima
Tourist
7 0 4

Hey guys,

 

I am in a bit of a jam here. I am pulling orders from Shopify GraphQL and processing them a bit later. In REST Api on GET to orders.json you can get checkout_id value. Its a checkout associated with the completed order.

 

I can't find anything like that in GraphQL Orders (nor anywhere else). Am I doing something wrong?

 

Please let me know... Thanks!

0 Likes
janklima
Tourist
7 0 4

Basically - when I call order with REST I get this:

"browser_ip": "something",
"buyer_accepts_marketing": true,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": null,
"checkout_id": important_id_here,
"checkout_token": "some_token_here",
"client_details": {}

And the associated checkout_id is what I need to somehow acquire in GraphQL.

0 Likes
_JCC_
Shopify Staff
Shopify Staff
160 21 28

Hey @janklima ,

Happy to help you out with this. 

As you've already discovered the checkout id field is not an exposed field when performing order queries in GraphQL. If you don't mind me asking, what is the checkout id field being used for? Knowing what it's being used for could help in suggestion of a possible alternative, and also help in any communication I have with internal teams.

Look forward to hearing back from you.

Regards,

John

John C | Developer Support @ 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

0 Likes
janklima
Tourist
7 0 4

Hi _JCC_,

 

thanks a lot for responding Its pretty simple - I need the number thats in checkout ID because our accounting software is pairing payments from bank based on this number. So I need to somehow get the checkout ID that was associated with this order...

 

Please let me know if its possible. Thank you!

0 Likes
_JCC_
Shopify Staff
Shopify Staff
160 21 28

Hey @janklima ,

Thanks for the quick response. I suspected this might be for reconciliation purposes. Does the accounting software have the authorization code? The authorization code is exposed on the transaction list of an order query in GraphQL.

 

query {
  order(id:"gid://shopify/Order/someordernumber"){
    id    
    transactions{
      id
      authorizationCode,
      status
      kind
      accountNumber
      gateway      
      amountSet{
        shopMoney{
          amount
        }
      }
    }
  }
}

 

 If the authorization code can't be used to pair these payments let me know.

Regards,

John

John C | Developer Support @ 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

0 Likes
janklima
Tourist
7 0 4

Thank you I will check on monday and let you know. authorizationCode is returning a different number so I will have to check with our accounting guys. Thanks a lot for helping out!

0 Likes
_JCC_
Shopify Staff
Shopify Staff
160 21 28

@janklima 

Yes, the authorization code will definitely be different. I'll wait to hear what you confirm from your accounting team before taking this any further. Have a good weekend.

Regards,

John

John C | Developer Support @ 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

0 Likes
DC-Andreas
New Member
2 0 2

Hi @_JCC_ ,

We also have the same problem.
Several of our customers have already asked if we can provide the checkout ID for reconciliation purpose.

Are the any plans to add this field to the GraphQL API?

Thank you,
Andreas