cart_token is null in majority of orders in webhook

Shashank_Kumar
Shopify Partner
5 0 6

We used cart_token in order/webhook to do connect identify carts created on customers' client side which completed in order. However, we noticed a majority of orders are not having cart_token data.

 

I understand in certain scenarios cart_token can be null, but for this store, more than 90 percent orders don't have cart_token. 

Example:

store: mrpl2.myshopify.com
order_ids: 1054936956994, 1054934007874, 1054702075970, 1054702043202, 1054689656898

Replies 4 (4)
Josh
Shopify Staff
Shopify Staff
1134 82 213

Hey there, 

 

When orders are placed using an offsite gateway, they won't have a cart_token. I would imagine that the shop you mentioned is accepting card payments via an offsite gateway and causing their orders to lose their cart_tokens - this is normal though in that case.

Josh | 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 the Shopify Help Center or the Shopify Blog

Gordon_Chan
Shopify Expert
22 0 10

Gosh.... but why does offsite checkout would have empty cart token?

I need a way to save some data for the order when the customer is still in shopping cart, and the only thing I can see is the cart_token.

If the webhook does not have cart token for offsite checkout, what else I can reference?

http://gordon-chan.net
I am a Freelance Web Engineer. Dedicated my life to e-commerce development.
seep-agency
New Member
2 0 1

Any solution to link an order to a cart when this value is missing ? 

Did not find anything and this is really important. 

For example if a user buys with paypal, we still should know the cart. Paypal is just the payment but the order is still linked to actions on this cart ...

kiran-sympiece
New Member
2 0 1

Did anyone ever find a solution to this, I am also desperately looking for a solution for this